Hi,
My first objective was achived. I manage to load and display images.
My next objective is to get an byte array from a database blob and
display it from time to time
I know this is sdljava but maybe the error is somehow related with the
way i’m doing this.
public void changeImage(byte[] data) throws SDLException {
try {
System.out.println(“Loading image…”);
try {
System.out.println(“Image loaded”);
SDLSurface image = SDLImage.load(data);
image.blitSurface(null,fb,null);
fb.updateRect();
Thread.currentThread().sleep(2000);
}
catch (SDLException e) {
System.out.println(“Error: Couln’t load image”);
System.out.println(e.getMessage());
}
}
catch (Exception e) {
e.printStackTrace();
}
}
I have this function which receives the byte array and displays it in
the framebuffer.
Something strange happens because the program crashes. Sometime i can
even see the image for a fraction of time and then the following error
happens:#
An unexpected error has been detected by HotSpot Virtual Machine:
SIGSEGV (0xb) at pc=0x4c87d4ff, pid=7957, tid=262153
Java VM: Java HotSpot™ Client VM (Blackdown-1.4.2-03 mixed mode)
Problematic frame:
C [libSDL-1.2.so.0+0x334ff] SDL_UpdateRects+0x1f
An error report file with more information is saved as hs_err_pid7957.log
If you would like to submit a bug report, please visit:
http://www.blackdown.org/cgi-bin/jdk
Can anybody tell me what is this?
Many thx,
Nuno