ochafik/nativelibs4java — Issue #194: JVM Crash on Windows XP (32 bit) and possible Windows7 (64bit)
Author: AndreiSochirca
Created: 2011-10-30 16:12:38+00:00
State: open

Hi Olivier,

I get JVM crash with the following stack trace:
C [bridj.dll5454542070522373406.dll+0x7f3a]
C [bridj.dll5454542070522373406.dll+0x547a]
j org.bridj.Pointer$FreeReleaser.release(Lorg/bridj/Pointer;)V+126
j org.bridj.Pointer$2.release()V+19

Please download the http://download.smaxe.com/bridj_test-111030.zip sources that reproduce the crash in 100% launches.
The example enumerates available visible windows and retrieves window icon image (in TestEnumWindows#loadIcon()).

If the following lines in TestEnumWindows#loadIcon() are commented then JVM doesn't crash
Pointer ptrData = Pointer.allocateBytes(bi.bmiHeader.biSizeImage);
Gdi32.GetDIBits(hdc, iconinfo.hbmColor, 0, height, ptrData, ptrBitmapInfo, Gdi32.DIB_RGB_COLORS);

Regards, Andrei.