Under Solaris I have a problem with this function.which appears to protect a section of the DIB giving a portion of it no access at all and when the application tries to blit from it later, a segfault results.
Anyone had any similar experiences/know of this problem ?
The offending application was little fighter II
ntdll.dll.so`VIRTUAL_SetProt() ntdll.dll.so`VirtualProtectEx+0x27() ntdll.dll.so`VirtualProtect+0x23() x11drv.dll.so`X11DRV_DIB_DoProtectDIBSection+0x43() x11drv.dll.so`X11DRV_DIB_CreateDIBSection+0x32d() gdi32.dll.so`DIB_CreateDIBSection+0x4b() ddraw.dll.so`create_dib+0x14e() ddraw.dll.so`DIB_DirectDrawSurface_Construct+0xe3(dd5c2da0, dd5c16c8, dd532648) ddraw.dll.so`DIB_DirectDrawSurface_Create+0x6c() ddraw.dll.so`Main_create_offscreen+0x42() ddraw.dll.so`create_offscreen+0x105() ddraw.dll.so`Main_DirectDraw_CreateSurface+0xed() ddraw.dll.so`IDirectDrawImpl_CreateSurface+0x2f() 0x439a00()
Robert Lunnon wrote:
Under Solaris I have a problem with this function.which appears to protect a section of the DIB giving a portion of it no access at all and when the application tries to blit from it later, a segfault results.
That's how it is supposed to be. The segfault handler should then call the handler installed by the X11 driver (via VIRTUAL_HandleFault), which should mark the DIB as user-accessed, mark the DIB memory as readable, and return to the app.
If this doesn't work correctly, there is most likely a problem with the sparc segfault handler not calling VIRTUAL_HandleFault properly (i.e. not called at all, called with incorrect fault address, ...).
Bye, Ulrich