http://bugs.winehq.org/show_bug.cgi?id=24421
Summary: MJ's Help Diagnostics - wine: Unhandled page fault on read access Product: Wine Version: 1.3.2 Platform: x86 URL: http://helpware.net/downloads/MJsDiag.zip OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: hhctrl.ocx AssignedTo: wine-bugs@winehq.org ReportedBy: saturn_systems@yahoo.com
Trying to run MJ's Help Diagnostics in a default wine gives an Unhandled page fault on read access (see attachment)
http://bugs.winehq.org/show_bug.cgi?id=24421
--- Comment #1 from nathan.n saturn_systems@yahoo.com 2010-09-16 02:47:03 CDT --- Created an attachment (id=30788) --> (http://bugs.winehq.org/attachment.cgi?id=30788) Unhandled page fault
http://bugs.winehq.org/show_bug.cgi?id=24421
nathan.n saturn_systems@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|hhctrl.ocx |-unknown
http://bugs.winehq.org/show_bug.cgi?id=24421
nathan.n saturn_systems@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download
http://bugs.winehq.org/show_bug.cgi?id=24421
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #30788|application/octet-stream |text/plain mime type| |
http://bugs.winehq.org/show_bug.cgi?id=24421
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dank@kegel.com
--- Comment #2 from Dan Kegel dank@kegel.com 2010-09-16 08:46:25 CDT --- Please do wine winemine & then run the app with WINEDEBUG=+relay and attach the log
http://bugs.winehq.org/show_bug.cgi?id=24421
--- Comment #3 from nathan.n saturn_systems@yahoo.com 2010-09-16 16:46:13 CDT --- Created an attachment (id=30808) --> (http://bugs.winehq.org/attachment.cgi?id=30808) WINEDEBUG=+relay wine MJsDiag.exe
As requested
http://bugs.winehq.org/show_bug.cgi?id=24421
--- Comment #4 from nathan.n saturn_systems@yahoo.com 2010-10-02 21:37:30 CDT --- present in wine 1.3.4
http://bugs.winehq.org/show_bug.cgi?id=24421
nathan.n saturn_systems@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|MJ's Help Diagnostics - |[MJ's Help Diagnostics] |wine: Unhandled page fault |wine: Unhandled page fault |on read access |on read access Alias| |mjhelpdiag
http://bugs.winehq.org/show_bug.cgi?id=24421
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Alias|mjhelpdiag |
http://bugs.winehq.org/show_bug.cgi?id=24421
--- Comment #5 from nathan.n saturn_systems@yahoo.com 2011-09-21 23:05:43 CDT --- Present in Wine 1.3.28
-- Terminal output
wine: Unhandled page fault on read access to 0x004f4560 at address 0x0000:0x00403a8e (thread 0009), starting debugger..
http://bugs.winehq.org/show_bug.cgi?id=24421
--- Comment #6 from nathan.n saturn_systems@yahoo.com 2011-11-09 02:19:38 CST --- Present in Wine 1.3.32
-- Terminal output
wine: Unhandled page fault on read access to 0x004f2564 at address 0x0000:0x00403a8e (thread 0009), starting debugger...
http://bugs.winehq.org/show_bug.cgi?id=24421
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1
--- Comment #7 from Austin English austinenglish@gmail.com --- Still present.
austin@aw25 ~ $ wine --version wine-1.7.11-206-g82b3813 austin@aw25 ~ $ sha1sum MJsDiag.zip 8f825884806790df536f588b476d862623f76703 MJsDiag.zip austin@aw25 ~ $ du -h MJsDiag.zip 324K MJsDiag.zip
the backtrace never shows up, until CTRL+C is pressed. Disabling the crash dialog doesn't help.
http://bugs.winehq.org/show_bug.cgi?id=24421
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #30788|0 |1 is obsolete| | Attachment #30808|0 |1 is obsolete| |
--- Comment #8 from Austin English austinenglish@gmail.com --- Created attachment 47389 --> http://bugs.winehq.org/attachment.cgi?id=47389 relay,seh,tid trace
http://bugs.winehq.org/show_bug.cgi?id=24421
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net Summary|[MJ's Help Diagnostics] |MJ's Help Diagnostics |wine: Unhandled page fault |crashes on startup |on read access |
--- Comment #9 from Anastasius Focht focht@gmx.net --- Hello folks,
can't reproduce this, runs all diagnostics fine for me.
@austin:
Your crash log indicates a page fault within application provided MonitorEnumProc callback.
--- snip --- ... 0024:Call user32.EnumDisplayMonitors(00000000,00000000,00492d9c,00000000) ret=00492e26 0024:Call winex11.drv.EnumDisplayMonitors(00000000,00000000,00492d9c,00000000) ret=7ebcdce9 0024:trace:seh:raise_exception code=c0000005 flags=0 addr=0x492de3 ip=00492de3 tid=0024 0024:trace:seh:raise_exception info[0]=00000000 0024:trace:seh:raise_exception info[1]=00000001 0024:trace:seh:raise_exception eax=00000005 ebx=00000001 ecx=00000001 edx=004f3448 esi=00000001 edi=004f3460 0024:trace:seh:raise_exception ebp=0033fcbc esp=0033fca8 cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00010206 0024:trace:seh:call_stack_handlers calling handler at 0x492f55 code=c0000005 flags=0 0024:trace:seh:call_stack_handlers handler at 0x492f55 returned 1 0024:trace:seh:call_stack_handlers calling handler at 0x404546 code=c0000005 flags=0 ... --- snip ---
What distro and compiler do you use to compile Wine?
Can you send me a copy of your 'winex11.drv.so' from the Wine installation you are starting the app with via email.
I'm interested in the compiler generated prolog code/register setup of X11DRV_EnumDisplayMonitors.
Regards
http://bugs.winehq.org/show_bug.cgi?id=24421
--- Comment #10 from Austin English austinenglish@gmail.com --- (In reply to comment #9)
Hello folks,
can't reproduce this, runs all diagnostics fine for me.
@austin:
Your crash log indicates a page fault within application provided MonitorEnumProc callback.
--- snip --- ... 0024:Call user32.EnumDisplayMonitors(00000000,00000000,00492d9c,00000000) ret=00492e26 0024:Call winex11.drv.EnumDisplayMonitors(00000000,00000000,00492d9c,00000000) ret=7ebcdce9 0024:trace:seh:raise_exception code=c0000005 flags=0 addr=0x492de3 ip=00492de3 tid=0024 0024:trace:seh:raise_exception info[0]=00000000 0024:trace:seh:raise_exception info[1]=00000001 0024:trace:seh:raise_exception eax=00000005 ebx=00000001 ecx=00000001 edx=004f3448 esi=00000001 edi=004f3460 0024:trace:seh:raise_exception ebp=0033fcbc esp=0033fca8 cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00010206 0024:trace:seh:call_stack_handlers calling handler at 0x492f55 code=c0000005 flags=0 0024:trace:seh:call_stack_handlers handler at 0x492f55 returned 1 0024:trace:seh:call_stack_handlers calling handler at 0x404546 code=c0000005 flags=0 ... --- snip ---
What distro and compiler do you use to compile Wine?
This was on gentoo x86_64. Most of the 32-bit libraries are now available (via overlays).
austin@aw25 ~ $ gcc -v Using built-in specs. COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.2/gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.8.2/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /var/tmp/portage/sys-devel/gcc-4.8.2/work/gcc-4.8.2/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.2 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.2 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.2/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.2/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/include/g++-v4 --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.8.2/python --enable-languages=c,c++,java,go --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --disable-nls --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.8.2 p1.3r1, pie-0.5.8r1' --enable-libstdcxx-time --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64 --disable-altivec --disable-fixed-point --enable-targets=all --enable-libgomp --enable-libmudflap --disable-libssp --disable-libquadmath --enable-lto --without-cloog Thread model: posix gcc version 4.8.2 (Gentoo 4.8.2 p1.3r1, pie-0.5.8r1)
Can you send me a copy of your 'winex11.drv.so' from the Wine installation you are starting the app with via email.
I'm interested in the compiler generated prolog code/register setup of X11DRV_EnumDisplayMonitors.
Sure. It could be a gentoo issue, so don't feel the need to spend too much time on it.
http://bugs.winehq.org/show_bug.cgi?id=24421
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |winex11.drv Summary|MJ's Help Diagnostics |MJ's Help Diagnostics |crashes on startup |crashes on startup (app | |provided MonitorEnumProc | |callback relies on ECX = | |lprcMonitor)
--- Comment #11 from Anastasius Focht focht@gmx.net --- Hello Austin,
thanks for the binaries and additional effort to recreate it on Fedora 19.
It seems the app provided MonitorEnumProc callback relies on register ECX pointing to monitor RECT ... that is certainly broken behaviour.
--- snip --- 00492D9C 55 PUSH EBP 00492D9D 8BEC MOV EBP,ESP 00492D9F 51 PUSH ECX 00492DA0 53 PUSH EBX 00492DA1 56 PUSH ESI 00492DA2 57 PUSH EDI 00492DA3 894D FC MOV DWORD PTR SS:[EBP-4],ECX ; LPRECT lprcMonitor 00492DA6 8BF0 MOV ESI,EAX 00492DA8 A1 34DD4B00 MOV EAX,DWORD PTR DS:[4BDD34] 00492DAD E8 E22EF7FF CALL 00405C94 00492DB2 8BD8 MOV EBX,EAX 00492DB4 8D43 01 LEA EAX,[EBX+1] 00492DB7 50 PUSH EAX 00492DB8 B8 34DD4B00 MOV EAX,004BDD34 00492DBD B9 01000000 MOV ECX,1 00492DC2 8B15 7C2D4900 MOV EDX,DWORD PTR DS:[492D7C] 00492DC8 E8 8330F7FF CALL 00405E50 00492DCD 83C4 04 ADD ESP,4 00492DD0 8D049B LEA EAX,[EBX*4+EBX] 00492DD3 8B15 34DD4B00 MOV EDX,DWORD PTR DS:[4BDD34] 00492DD9 8B4D FC MOV ECX,DWORD PTR SS:[EBP-4] ; LPRECT lprcMonitor 00492DDC 56 PUSH ESI 00492DDD 8D7C82 04 LEA EDI,[EAX*4+EDX+4] 00492DE1 8BF1 MOV ESI,ECX ; LPRECT lprcMonitor 00492DE3 A5 MOVS DWORD PTR ES:[EDI],DWORD PTR DS:[ESI] ; left 00492DE4 A5 MOVS DWORD PTR ES:[EDI],DWORD PTR DS:[ESI] ; top 00492DE5 A5 MOVS DWORD PTR ES:[EDI],DWORD PTR DS:[ESI] ; right 00492DE6 A5 MOVS DWORD PTR ES:[EDI],DWORD PTR DS:[ESI] ; bottom 00492DE7 5E POP ESI 00492DE8 8B15 34DD4B00 MOV EDX,DWORD PTR DS:[4BDD34] 00492DEE 893482 MOV DWORD PTR DS:[EAX*4+EDX],ESI 00492DF1 B0 01 MOV AL,1 00492DF3 5F POP EDI 00492DF4 5E POP ESI 00492DF5 5B POP EBX 00492DF6 59 POP ECX 00492DF7 5D POP EBP 00492DF8 C2 0400 RETN 4 --- snip ---
In your case (default gcc '-O2' optimization setting) register ECX was (re)used as index within X11DRV_EnumDisplayMonitors() hence it was clobbered at the time the callback was called.
I have optimizations disabled by default because my standard use-case is debugging Wine ;-) ECX ended up pointing to 'rcMonitor'.
Try to annotate only X11DRV_EnumDisplayMonitors() with optimize 'disable' hint:
http://source.winehq.org/git/wine.git/blob/0f03f264b772e8638d4f1311a2cbdfc51...
--- snip --- BOOL CDECL __attribute__((optimize("-O0"))) X11DRV_EnumDisplayMonitors( HDC hdc, LPRECT rect, MONITORENUMPROC proc, LPARAM lp ) --- snip ---
Regards
https://bugs.winehq.org/show_bug.cgi?id=24421
--- Comment #12 from Austin English austinenglish@gmail.com --- (In reply to comment #11)
Try to annotate only X11DRV_EnumDisplayMonitors() with optimize 'disable' hint:
http://source.winehq.org/git/wine.git/blob/ 0f03f264b772e8638d4f1311a2cbdfc515b7faa5:/dlls/winex11.drv/xinerama.c#l250
--- snip --- BOOL CDECL __attribute__((optimize("-O0"))) X11DRV_EnumDisplayMonitors( HDC hdc, LPRECT rect, MONITORENUMPROC proc, LPARAM lp ) --- snip ---
That works for me with wine-1.7.11-272-gc7a11f9 on Gentoo.
https://bugs.winehq.org/show_bug.cgi?id=24421
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |STAGED CC| |dmitry@baikal.ru, | |erich.e.hoover@wine-staging | |.com, michael@fds-team.de, | |sebastian@fds-team.de Staged patchset| |https://github.com/wine-com | |pholio/wine-staging/tree/ma | |ster/patches/winex11-MONITO | |RENUMPROC
https://bugs.winehq.org/show_bug.cgi?id=24421
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Staged patchset|https://github.com/wine-com |https://github.com/wine-com |pholio/wine-staging/tree/ma |pholio/wine-staging/tree/ma |ster/patches/winex11-MONITO |ster/patches/user32-EnumDis |RENUMPROC |playMonitors
https://bugs.winehq.org/show_bug.cgi?id=24421
super_man@post.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |super_man@post.com
--- Comment #13 from super_man@post.com --- Should be fixed with 11f6df13eb23260331d9ca8412b9323dbe942885
https://bugs.winehq.org/show_bug.cgi?id=24421
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |11f6df13eb23260331d9ca8412b | |9323dbe942885 Resolution|--- |FIXED Status|STAGED |RESOLVED
--- Comment #14 from Sebastian Lackner sebastian@fds-team.de --- Fixed with 11f6df13eb23260331d9ca8412b9323dbe942885.
https://bugs.winehq.org/show_bug.cgi?id=24421
Michael Stefaniuc mstefani@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |1.8.x CC| |mstefani@redhat.com
https://bugs.winehq.org/show_bug.cgi?id=24421
Ken Thomases ken@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.winehq.org/sho | |w_bug.cgi?id=40297
https://bugs.winehq.org/show_bug.cgi?id=24421
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #15 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.9.8.
https://bugs.winehq.org/show_bug.cgi?id=24421
Michael Stefaniuc mstefani@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|1.8.x |---
--- Comment #16 from Michael Stefaniuc mstefani@redhat.com --- Removing 1.8.x milestone from bugs included in 1.8.3.