https://bugs.winehq.org/show_bug.cgi?id=53946
Bug ID: 53946 Summary: Some applications produced with Delphi crash on Wine before WinMain Product: Wine Version: 7.21 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: mterrisse@free.fr Distribution: ---
Created attachment 73522 --> https://bugs.winehq.org/attachment.cgi?id=73522 'Hello from Wine' compiled with Delphi and source code
Wine 7.21 on Ubuntu 22.10
Hello,
I attach a very small program built with Delphi 11.2 and source code (TestWine.dpr). It is a console application that says 'Hello from Wine' but it crashes on Wine, page fault. It works fine on Windows.
I tried with winedbg and got this ========= 0084:fixme:wineusb:query_id Unhandled ID query type 0x5. 0084:fixme:wineusb:query_id Unhandled ID query type 0x5. 0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005 0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005 0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005 0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005 WineDbg starting on pid 0120 0x000001700570a5 ntdll+0x570a5: ret Wine-dbg>0044:fixme:imm:ImeSetActiveContext (0000000000010026, 0): stub 0044:fixme:imm:ImmReleaseContext (0000000000010020, 0000000000010026): stub 012c:fixme:imm:ImeSetActiveContext (0000000000010052, 1): stub 012c:fixme:imm:ImmReleaseContext (0000000000030046, 0000000000010052): stub c Unhandled exception: page fault on execute access to 0x0000000000447000 in 64-bit code (0x00000000447000). Register dump: rip:0000000000447000 rsp:000000000057fe38 rbp:0000000000000000 eflags:00010a82 ( R- --O I S - - - ) rax:0000000170088050 rbx:0000000000000000 rcx:00000000003f0000 rdx:00000000004424c0 rsi:0000000000000000 rdi:0000000000000000 r8:00000000003f0000 r9:000000017007bca8 r10:0000000000000000 r11:0000000000000000 r12:0000000000000000 r13:0000000000000000 r14:0000000000000000 r15:0000000000000000 Stack dump: 0x0000000057fe38: 000000007b6291b9 0000000000000000 0x0000000057fe48: 000000000057fe90 0000000000000000 0x0000000057fe58: 0000000000000000 0000000000000000 0x0000000057fe68: 000000017005f8f3 0000000000000000 0x0000000057fe78: 0000000000000000 0000000000000000 0x0000000057fe88: 0000000000000000 00000000004424c0 0x0000000057fe98: 00000000003f0000 ffffffffffffffff 0x0000000057fea8: 000000017006ab30 0000000170027380 0x0000000057feb8: 0000000000000000 000000000057fea0 0x0000000057fec8: 0000000000000000 000000000057fe70 0x0000000057fed8: 0000000000000000 0000000000000000 0x0000000057fee8: 0000000000000000 0000000000000000 Backtrace: =>0 0x00000000447000 in testwine (+0x47000) (0000000000000000) 1 0x0000007b6291b9 BaseThreadInitThunk+0x9(unknown=<internal error>, entry=<internal error>, arg=<internal error>) [Z:\usr\src\packages\BUILD\dlls\kernel32\thread.c:61] in kernel32 (0000000000000000) 2 0x0000017005f8f3 __wine_pop_frame(entry=00000000004424C0, arg=00000000003F0000) [Z:\usr\src\packages\BUILD\include\wine\exception.h:277] in ntdll (0000000000000000) 3 0x0000017005f8f3 RtlUserThreadStart+0x83(entry=[<register RSP not accessible in this frame>, arg=[<register RSP not accessible in this frame>) [Z:\usr\src\packages\BUILD\dlls\ntdll\thread.c:285] in ntdll (0000000000000000) 0x00000000447000 testwine+0x47000: addb %al,(%rax) =========
I tried step by step but it seams that the code in WinMain function is never executed. Can you see what is wrong with this executable?
Regards,
Michel Terrisse
https://bugs.winehq.org/show_bug.cgi?id=53946
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4@web.de
--- Comment #1 from Fabian Maurer dark.shadow4@web.de --- Weird, seems to work just fine for me.
https://bugs.winehq.org/show_bug.cgi?id=53946
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, source, testcase
https://bugs.winehq.org/show_bug.cgi?id=53946
--- Comment #2 from Artem S. Tashkinov aros@gmx.com --- Can't test this, I've only got a 32bit Wine installation.
https://bugs.winehq.org/show_bug.cgi?id=53946
Damjan Jovanovic damjan.jov@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |damjan.jov@gmail.com
--- Comment #3 from Damjan Jovanovic damjan.jov@gmail.com --- Works fine here too, FreeBSD 13.1, Wine 7.21.
https://bugs.winehq.org/show_bug.cgi?id=53946
--- Comment #4 from Michel Terrisse mterrisse@free.fr --- Hello,
I just discovered that I can run TestWine.exe on C: but not on Z: I still don't know what is wrong but I have a workaround.
Regards,
Michel Terrisse
https://bugs.winehq.org/show_bug.cgi?id=53946
--- Comment #5 from Fabian Maurer dark.shadow4@web.de --- FWIW, also works on z: for me
https://bugs.winehq.org/show_bug.cgi?id=53946
Joerg Schiermeier mywine@schiermeier-it.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mywine@schiermeier-it.de
--- Comment #6 from Joerg Schiermeier mywine@schiermeier-it.de --- Created attachment 73709 --> https://bugs.winehq.org/attachment.cgi?id=73709 stdout: Result of wine ./TestWine.exe
https://bugs.winehq.org/show_bug.cgi?id=53946
--- Comment #7 from Joerg Schiermeier mywine@schiermeier-it.de --- Created attachment 73710 --> https://bugs.winehq.org/attachment.cgi?id=73710 stderr: Result of wine ./TestWine.exe
https://bugs.winehq.org/show_bug.cgi?id=53946
--- Comment #8 from Joerg Schiermeier mywine@schiermeier-it.de --- Just tried stdout: wine ./TestWine.exe with wine v8.0-rc1 64bit.
Result: works.
This bug should be set to "NEEDINFO".
https://bugs.winehq.org/show_bug.cgi?id=53946
--- Comment #9 from Michel Terrisse mterrisse@free.fr --- Hello,
Three new elements: 1/ I note that this happens with 64 bit executables but not with 32 bit executables
2/ I have installed another machine with Ubuntu and Wine and I can't reproduce the problem with this new machine. I have the problem systematically with the first machine, but I can't find what is different
3/ I looked at the .map file: the address where there is the crash 0x0000000000447000 is not in the code segment (.text) but is the beginning of the data segment (.data) Start Length Name Class 0001:0000000000401000 00045564H .text CODE 0002:0000000000447000 00007450H .data DATA 0003:000000000044F000 00018870H .bss BSS 0004:0000000000400000 00000230H .tls TLS 0005:0000000000470000 00003D74H .pdata PDATA It looks like a problem when computing the adress of the entry point of the program.
I hope this can help.
Regards,
Michel Terrisse
https://bugs.winehq.org/show_bug.cgi?id=53946
Vitaly Lipatov lav@etersoft.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |lav@etersoft.ru