Hello, I've yet another problem with the OpenGL patches from April 28: Star Wars Jedi Knight: Jedi Academy crashes during startup.
The problematic commit is http://www.winehq.org/hypermail/wine-cvs/2005/04/0308.html, it's not the same problem as with Half-life. The crash happens in ntdll in HEAP_CreateFreeBlock. The call trace shows EDIT_MakeFit on wine/dlls/user/edit.c as the function which calls the heap functions. The crash only occurs if the game's configuration file exists, so the first start succeeds, but the following calls fail.
I've attached 3 +opengl,+edit traces: before.out: Game start with config file and without the mentioned wine patch after.out: Game start with config file and with the patch applied(crash) nocfg.out: Game start without config file and with the patch(no crash)
Any ideas? The whole thing looks quite strange as the crash is not directly related to OpenGL.
Stefan
The crash dump is: wine: Unhandled exception (thread 0009), starting debugger... WineDbg starting on pid 0x8 Unhandled exception: page fault on read access to 0x77cfff70 in 32-bit code (0x77ec1139). In 32 bit mode. Register dump: CS:0073 SS:007b DS:007b ES:007b FS:003b GS:0033 EIP:77ec1139 ESP:77a7e588 EBP:77a7e5a8 EFLAGS:00010283( - 00 -RIS1C) EAX:77d00000 EBX:77ef6d8c ECX:77efdb1c EDX:00110000 ESI:77cfff70 EDI:77c3bcb0 Stack dump: 0x77a7e588: 77a7e5c4 77ec198f 77bf0000 77efdb1c 0x77a7e598: 77ec221d 77ef6d8c 00000848 77c3b460 0x77a7e5a8: 77a7e5c4 77ec14a6 77bf0000 77c3bcb0 0x77a7e5b8: 000c42c0 77c3b460 77c3b468 77a7e61c 0x77a7e5c8: 77ec2c3e 77bf0000 77c3b460 00000848 0x77a7e5d8: 00000001 77a7e5ec 77ec2e40 77bf001c Backtrace: =>1 0x77ec1139 HEAP_CreateFreeBlock+0x69(subheap=0x77bf0000, ptr=0x77c3bcb0, size=0xc42c0) [heap.c:447] in ntdll (0x77a7e5a8) 2 0x77ec14a6 HEAP_ShrinkBlock+0x56(subheap=0x77bf0000, pArena=0x77c3b460, size=0x848) [heap.c:543] in ntdll (0x77a7e5c4) 3 0x77ec2c3e RtlReAllocateHeap(heap=0x77bf0000, flags=0xa, ptr=0x77c3a5a8, size=0x848) [heap.c:1348] in ntdll (0x77a7e61c) 4 0x77b33774 HeapReAlloc(heap=0x77bf0000, flags=0x8, ptr=0x77c3a5a8, size=0x848) [/windows/c/sonstiges/wine/dlls/kernel/heap.c:280] in kernel32 (0x77a7e638) 5 0x77b33f76 GlobalReAlloc+0x1b6(hmem=0x77c3641a, size=0x840, flags=0x42) [/windows/c/sonstiges/wine/dlls/kernel/heap.c:617] in kernel32 (0x77a7e668) 6 0x77b3457d LocalReAlloc+0x2d(handle=0x77c3641a, size=0x840, flags=0x42) [/windows/c/sonstiges/wine/dlls/kernel/heap.c:926] in kernel32 (0x77a7e680) 7 0x77148793 EDIT_MakeFit+0x1a3(es=0x77c36368, size=0x41e) [/windows/c/sonstiges/wine/dlls/user/edit.c:1787] in user32 (0x77a7e6b0) 8 0x7714b24f EDIT_EM_ReplaceSel+0x17f(es=0x77c36368, can_undo=0x0, lpsz_replace=0x77c38a58, send_update=0x1, honor_limit=0x1) [/windows/c/sonstiges/wine/dlls/user/edit.c:3045] in user32 (0x77a7e718) 9 0x77145e84 EditWndProc_common+0x634(hwnd=0x1002c, msg=0xc2, wParam=0x0, lParam=0x77a7e958, unicode=0x0) [/windows/c/sonstiges/wine/dlls/user/edit.c:617] in user32 (0x77a7e794) 10 0x77146c1c EditWndProcA(hWnd=0x1002c, uMsg=0xc2, wParam=0x0, lParam=0x77a7e958) [/windows/c/sonstiges/wine/dlls/user/edit.c:1016] in user32 (0x77a7e7b0) 11 0x7719ecef WINPROC_wrapper+0x17 in user32 (0x77a7e7d4) 12 0x7719f056 WINPROC_CallWndProc+0x76(proc=0x77146bf0, hwnd=0x1002c, msg=0xc2, wParam=0x0, lParam=0x77a7e958) [/windows/c/sonstiges/wine/dlls/user/winproc.c:419] in user32 (0x77a7e80c) 13 0x771a5fe7 CallWindowProcA(func=0x77146bf0, hwnd=0x1002c, msg=0xc2, wParam=0x0, lParam=0x77a7e958) [/windows/c/sonstiges/wine/dlls/user/winproc.c:3216] in user32 (0x77a7e840) 14 0x77170c61 call_window_proc+0x171(hwnd=0x1002c, msg=0xc2, wparam=0x0, lparam=0x77a7e958, unicode=0x0, same_thread=0x1) [/windows/c/sonstiges/wine/dlls/user/message.c:1521] in user32 (0x77a7e89c) 15 0x77172cbf SendMessageTimeoutA+0x1ff(hwnd=0x1002c, msg=0xc2, wparam=0x0, lparam=0x77a7e958, flags=0x0, timeout=0xffffffff, res_ptr=0x77a7e92c) [/windows/c/sonstiges/wine/dlls/user/message.c:2399] in user32 (0x77a7e908) 16 0x77172db1 SendMessageA+0x51(hwnd=0x1002c, msg=0xc2, wparam=0x0, lparam=0x77a7e958) [/windows/c/sonstiges/wine/dlls/user/message.c:2443] in user32 (0x77a7e934) 17 0x00454613 in jamp (+0x54613) (0x0000001f) 18 0x00000000 (0x00000000) 0x77ec1139 HEAP_CreateFreeBlock+0x69 [heap.c:447] in ntdll: movl 0x0 (%esi),%ecx Unable to open file 'heap.c' Modules: Module Address Debug info Name (70 modules) PE 0x00400000-01327000 Export jamp PE 0x10000000-100f2000 Deferred openal32 ELF 0x712fc000-71376000 Deferred libglu.so.1 ELF 0x71376000-71410000 Deferred opengl32<elf> -PE 0x713b0000-71410000 \ opengl32 ELF 0x71a5b000-71a70000 Deferred midimap.drv<elf> -PE 0x71a60000-71a70000 \ midimap.drv ELF 0x71b8c000-71bb0000 Deferred msacm32<elf> -PE 0x71b90000-71bb0000 \ msacm32 ELF 0x71bb0000-71bc9000 Deferred msacm.drv<elf> -PE 0x71bc0000-71bc9000 \ msacm.drv ELF 0x71bc9000-71c0e000 Deferred wineoss.drv<elf> -PE 0x71be0000-71c0e000 \ wineoss.drv ELF 0x71c5b000-71c7a000 Deferred imm32<elf> -PE 0x71c60000-71c7a000 \ imm32 ELF 0x71c7a000-71c7e000 Deferred iso8859-1.so ELF 0x71c85000-71ca2000 Deferred ximcp.so.2 ELF 0x71ca2000-71ca5000 Deferred xlcdef.so.2 ELF 0x71ca5000-71cae000 Deferred libxcursor.so.1.0.2 ELF 0x71cae000-71cb6000 Deferred libxrender.so.1 ELF 0x761e5000-761ed000 Deferred libgcc_s.so.1 ELF 0x761ed000-76201000 Deferred librt.so.1 ELF 0x762d5000-76b65000 Deferred fglrx_dri.so ELF 0x76b65000-76c09000 Deferred libgl.so.1 ELF 0x76c09000-76cd4000 Deferred libx11.so.6 ELF 0x76dd4000-76df6000 Deferred libexpat.so.0 ELF 0x76df6000-76e20000 Deferred libfontconfig.so.1 ELF 0x76e20000-76e34000 Deferred libz.so.1 ELF 0x76e4e000-76ecf000 Deferred libfreetype.so.6 ELF 0x76ecf000-76ef9000 Deferred ws2_32<elf> -PE 0x76ee0000-76ef9000 \ ws2_32 ELF 0x76ef9000-76f16000 Deferred wsock32<elf> -PE 0x76f00000-76f16000 \ wsock32 ELF 0x76f16000-76f36000 Deferred iphlpapi<elf> -PE 0x76f20000-76f36000 \ iphlpapi ELF 0x76f36000-76f80000 Deferred rpcrt4<elf> -PE 0x76f50000-76f80000 \ rpcrt4 ELF 0x76f80000-7700e000 Deferred ole32<elf> -PE 0x76fa0000-7700e000 \ ole32 ELF 0x7700e000-7704e000 Deferred advapi32<elf> -PE 0x77020000-7704e000 \ advapi32 ELF 0x7704e000-770dd000 Deferred gdi32<elf> -PE 0x77060000-770dd000 \ gdi32 ELF 0x770dd000-7720f000 Stabs user32<elf> -PE 0x77100000-7720f000 \ user32 ELF 0x7720f000-77290000 Deferred winmm<elf> -PE 0x77220000-77290000 \ winmm ELF 0x77ad8000-77bf0000 Stabs kernel32<elf> -PE 0x77b00000-77bf0000 \ kernel32 ELF 0x77d09000-77d13000 Deferred libnss_files.so.2 ELF 0x77d13000-77d1d000 Deferred libnss_nis.so.2 ELF 0x77d1d000-77d32000 Deferred libnsl.so.1 ELF 0x77d32000-77d3b000 Deferred libnss_compat.so.2 ELF 0x77d55000-77d78000 Deferred libm.so.6 ELF 0x77d78000-77e6d000 Deferred libwine_unicode.so.1 ELF 0x77e87000-77f00000 Stabs ntdll<elf> -PE 0x77ea0000-77f00000 \ ntdll ELF 0x77f00000-77f03000 Deferred <wine-loader> ELF 0x77f41000-77f4f000 Deferred libxext.so.6 ELF 0x77f4f000-77f54000 Deferred libxxf86vm.so.1 ELF 0x77f54000-77f5a000 Deferred libxxf86dga.so.1 ELF 0x77f5a000-77f72000 Deferred libice.so.6 ELF 0x77f72000-77f7b000 Deferred libsm.so.6 ELF 0x77f7b000-78000000 Deferred x11drv<elf> -PE 0x77f90000-78000000 \ x11drv ELF 0xb7e47000-b7e4b000 Deferred libdl.so.2 ELF 0xb7e4b000-b7f62000 Deferred libc.so.6 ELF 0xb7f62000-b7fb4000 Deferred libpthread.so.0 ELF 0xb7fb4000-b7fcd000 Deferred libwine.so.1 ELF 0xb7fe8000-b8000000 Deferred ld-linux.so.2 Threads: process tid prio (all id:s are in hex) 00000008 (D) G:\jedi academy\GameData\jamp.exe 00000009 0 <== WineDbg terminated on pid 0x8
On Sunday 08 May 2005 18:26, Stefan Dösinger wrote:
Hello, I've yet another problem with the OpenGL patches from April 28: Star Wars Jedi Knight: Jedi Academy crashes during startup.
The problematic commit is http://www.winehq.org/hypermail/wine-cvs/2005/04/0308.html, it's not the same problem as with Half-life. The crash happens in ntdll in HEAP_CreateFreeBlock. The call trace shows EDIT_MakeFit on wine/dlls/user/edit.c as the function which calls the heap functions. The crash only occurs if the game's configuration file exists, so the first start succeeds, but the following calls fail.
I've attached 3 +opengl,+edit traces: before.out: Game start with config file and without the mentioned wine patch after.out: Game start with config file and with the patch applied(crash) nocfg.out: Game start without config file and with the patch(no crash)
Any ideas? The whole thing looks quite strange as the crash is not directly related to OpenGL.
Stefan
Strange behavior to see alocations problems after my patch :(
can you try to edit dlls/opengl32/wgl.c
and change internal_glGetString to something like (see below) to try
const GLubyte * internal_glGetString(GLenum name) { return glGetString(name); }
Regards, Raphael
Strange behavior to see alocations problems after my patch :(
can you try to edit dlls/opengl32/wgl.c
and change internal_glGetString to something like (see below) to try
const GLubyte * internal_glGetString(GLenum name) { return glGetString(name); }
Yes, that fixes the problem, the game starts up as normal. If I can assist you in fixing this, just tell me.
I'll test a few other OpenGL games and tell you if I encounter any other problems.
Stefan
On Monday 09 May 2005 15:34, Stefan Dösinger wrote:
Strange behavior to see alocations problems after my patch :(
can you try to edit dlls/opengl32/wgl.c
and change internal_glGetString to something like (see below) to try
const GLubyte * internal_glGetString(GLenum name) { return glGetString(name); }
Yes, that fixes the problem, the game starts up as normal. If I can assist you in fixing this, just tell me.
I'll test a few other OpenGL games and tell you if I encounter any other problems.
Stefan
Yuk :(
I have done a full review of internal_glGetString to see where i have a problem, i think i have found.
can you change this line: internal_gl_extensions = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
into: internal_gl_extensions = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len + 2);
Regards, Raphael
Am Montag, 9. Mai 2005 19:27 schrieb Raphael:
On Monday 09 May 2005 15:34, Stefan Dösinger wrote:
Strange behavior to see alocations problems after my patch :(
can you try to edit dlls/opengl32/wgl.c
and change internal_glGetString to something like (see below) to try
const GLubyte * internal_glGetString(GLenum name) { return glGetString(name); }
Yes, that fixes the problem, the game starts up as normal. If I can assist you in fixing this, just tell me.
I'll test a few other OpenGL games and tell you if I encounter any other problems.
Stefan
Yuk :(
I have done a full review of internal_glGetString to see where i have a problem, i think i have found.
can you change this line: internal_gl_extensions = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
into: internal_gl_extensions = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len + 2);
Seems to work!
Thanks, Stefan
On Sun, 08 May 2005 16:26:21 +0000, Stefan Dösinger wrote:
The problematic commit is http://www.winehq.org/hypermail/wine-cvs/2005/04/0308.html, it's not the same problem as with Half-life. The crash happens in ntdll in HEAP_CreateFreeBlock.
Try doing a +heap trace. That switches on extra checking so it's more likely to crash or show up errors nearer the problem area.
thanks -mike
Am Montag, 9. Mai 2005 11:24 schrieb Mike Hearn:
On Sun, 08 May 2005 16:26:21 +0000, Stefan Dösinger wrote:
The problematic commit is http://www.winehq.org/hypermail/wine-cvs/2005/04/0308.html, it's not the same problem as with Half-life. The crash happens in ntdll in HEAP_CreateFreeBlock.
Try doing a +heap trace. That switches on extra checking so it's more likely to crash or show up errors nearer the problem area.
I did so, and indeed the crash changed, it happens earlier in the edit code. The last part of the log is attached, if anyone's interested in the full 10MB log, I can send it.
Stefan