http://bugs.winehq.org/show_bug.cgi?id=34868
Bug #: 34868 Summary: FEMMx64bit does not start. Deficiency in Wine Product: Wine Version: 1.7.4 Platform: x86-64 OS/Version: Linux Status: UNCONFIRMED Severity: major Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: ichbinpablo@gmail.com Classification: Unclassified
Created attachment 46476 --> http://bugs.winehq.org/attachment.cgi?id=46476 backtrace after trying to execute the program
With a fresh installation of debian/wheezy and the Wine 1.7.4 from the SID (Jessie) sources. I installed the "x64-bit" version of FEMM42. The version of this program can be downloaded from http://www.femm.info/Archives/bin/femm42bin_x64.exe
Installation works perfectly, but after that the FEMM42-x64bit cannot be started. A error message like: "The program femm.exe hast encountered a serious problem and needs to close...."
The 32bit version of FEMM42 doesn't have problems. Only the x64-bit version!
http://bugs.winehq.org/show_bug.cgi?id=34868
Dr. Pablo Aguirre ichbinpablo@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |ichbinpablo@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=34868
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW URL| |http://www.femm.info/Archiv | |es/bin/femm42bin_x64.exe Keywords| |download, win64 Component|-unknown |ntdll CC| |focht@gmx.net Ever Confirmed|0 |1 Summary|FEMMx64bit does not start. |64-bit FEMM 4.2 (finite |Deficiency in Wine |element solver app) crashes | |on startup | |(SetWindowLong/winproc | |pointer truncation due to | |image base address > 4 GiB) Severity|major |normal
--- Comment #1 from Anastasius Focht focht@gmx.net 2013-11-06 18:01:36 CST --- Hello folks,
confirming.
The 64-bit PE has an image load base address of 0x0000000140000000 (> 32-bit address space range). It sets window proc using SetWindowLong() which only supports 32-bit (long) value leading to pointer truncation for 64-bit addresses. Because the window proc lives in 64-bit range it crashes as soon as the windows proc gets called.
There is no app code for calling SetWindowLongPtr() in main executable so I assume this is just another not-really-fit-for-win64 app which just gets away on Win64 because it's still loaded in 32-bit range despite the 64-bit load address in PE header.
See bug 30329 ("Total Commander 8.0 64-bit installer crashes due to LB_INSERTSTRING pointer truncation (image base address > 4 GiB)") for a similar issue with 64-bit.
Another case where Wine is actually useful for verifying Win64 standards :-)
Windows just plays dirty by employing lots of workarounds under the hood to support all kinds of broken 64-bit apps.
--- snip --- $ pwd /home/focht/.wine/drive_c/femm42/bin ... $ WINEDEBUG=+tid,+seh,+relay wine ./femm.exe >>log.txt 2>&1 ... 0026:Starting process L"C:\femm42\bin\femm.exe" (entryproc=0x1401d3fc0) ... 0026:Call user32.SetWindowLongA(0001015c,fffffffc,1401d2970) ret=1401d2d22 0026:Ret user32.SetWindowLongA() retval=786e0538 ret=1401d2d22 0026:Call user32.GetClientRect(000a0156,0023d520) ret=1401d2b11 0026:Ret user32.GetClientRect() retval=00000001 ret=1401d2b11 0026:Call user32.SetWindowPos(0001015c,00000001,000001be,000000be,00000000,00000000,00000211) ret=78723b58 0026:Call window proc 0x401d2970 (hwnd=0x1015c,msg=WM_WINDOWPOSCHANGING,wp=00000000,lp=0023d300) 0026:trace:seh:raise_exception code=c0000005 flags=0 addr=0x401d2970 ip=401d2970 tid=0026 0026:trace:seh:raise_exception info[0]=0000000000000000 0026:trace:seh:raise_exception info[1]=00000000401d2970 0026:trace:seh:raise_exception rax=00000000401d2970 rbx=00000000000ed200 rcx=000000000001015c rdx=0000000000000046 0026:trace:seh:raise_exception rsi=0000000000000000 rdi=000000000023d300 rbp=000000000023c870 rsp=000000000023c818 0026:trace:seh:raise_exception r8=0000000000000000 r9=000000000023d300 r10=0000000000000000 r11=00000030b85814e0 0026:trace:seh:raise_exception r12=0000000000000001 r13=00000001401eeda0 r14=0000000000000110 r15=0000000000000001 --- snip ---
Dump of PE optional header:
--- snip --- Magic: 0x020B (HDR64_MAGIC) MajorLinkerVersion: 0x09 MinorLinkerVersion: 0x00 -> 9.00 SizeOfCode: 0x001E6800 SizeOfInitializedData: 0x000A9400 SizeOfUninitializedData: 0x00000000 AddressOfEntryPoint: 0x001D3FC0 BaseOfCode: 0x00001000 ImageBase: 0x0000000140000000 SectionAlignment: 0x00001000 FileAlignment: 0x00000200 MajorOperatingSystemVersion: 0x0005 MinorOperatingSystemVersion: 0x0002 -> 5.02 MajorImageVersion: 0x0000 MinorImageVersion: 0x0000 -> 0.00 MajorSubsystemVersion: 0x0005 MinorSubsystemVersion: 0x0002 -> 5.02 Win32VersionValue: 0x00000000 SizeOfImage: 0x00296850 SizeOfHeaders: 0x00000400 CheckSum: 0x0029D33F Subsystem: 0x0002 (WINDOWS_GUI) DllCharacteristics: 0x8000 (TERMINAL_SERVER_AWARE) SizeOfStackReserve: 0x0000000000100000 SizeOfStackCommit: 0x0000000000001000 SizeOfHeapReserve: 0x0000000000100000 SizeOfHeapCommit: 0x0000000000001000 LoaderFlags: 0x00000000 NumberOfRvaAndSizes: 0x00000010 --- snip ---
I'd rather force the developers of the app to fix their code (making use of SetWindowLongPtr)...
Regards
http://bugs.winehq.org/show_bug.cgi?id=34868
Dmitry Timoshkov dmitry@baikal.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- CC|ichbinpablo@gmail.com | Component|ntdll |-unknown
--- Comment #2 from Dmitry Timoshkov dmitry@baikal.ru 2013-11-06 19:05:08 CST --- Most likely invalid or wontfix.
http://bugs.winehq.org/show_bug.cgi?id=34868
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dank@kegel.com
--- Comment #3 from Dan Kegel dank@kegel.com 2013-11-07 08:24:44 CST --- The author replies
"Thanks for pointing this out to me. I guess that I'd only tested the 32-bit build in Wine--whoops.
Anyhow, the offending call is in a third party library, ResizableLib (http://sourceforge.net/projects/resizablelib/). It looks like I have been using an old version of the library. There's a newer version that's been patched to run in x64 and appears to have removed the SetWindowLong issue. If it tests out OK, I'll update the release with this modification."
http://bugs.winehq.org/show_bug.cgi?id=34868
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID
--- Comment #4 from Dan Kegel dank@kegel.com 2013-11-07 12:05:08 CST --- Further reply from author: "There isn't a version that's particularly new, just new to me. I'd been using version 1.1 for a long time--I'd never had any problems with it before now. The 1.3 version doesn't use SetWindowLong, and there's an x64 patch noted at http://sourceforge.net/p/resizablelib/patches/1 "
http://bugs.winehq.org/show_bug.cgi?id=34868
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|INVALID |WONTFIX
--- Comment #5 from Anastasius Focht focht@gmx.net 2013-11-07 15:06:37 CST --- Hello folks,
I'd rather resolve this bug WONTFIX.
Although the app is broken it stills runs on Win64. It would be INVALID if it crashes the same way on Windows.
Wine has the option to either implement/mimic Windows behaviour for such broken apps or to refuse, forcing the authors/developers to fix their apps.
We chose the latter -> WONTFIX.
Regards
http://bugs.winehq.org/show_bug.cgi?id=34868
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #6 from Dan Kegel dank@kegel.com 2013-11-07 15:21:51 CST --- Closing WONTFIX.
We can reopen if multiple apps need this.
http://bugs.winehq.org/show_bug.cgi?id=34868
Dr. Pablo Aguirre ichbinpablo@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |RESOLVED Resolution|WONTFIX |INVALID
--- Comment #7 from Dr. Pablo Aguirre ichbinpablo@gmail.com 2013-11-07 16:12:45 CST --- Yes there are mo applications with the same issue. I would not recommend to be happy by leaving the solution because this error is not to often reported! Unfortunately the way to solve it requires experts as you! Please, give it a chance!
Greetings,
Dr. Aguirre
http://bugs.winehq.org/show_bug.cgi?id=34868
--- Comment #8 from Dan Kegel dank@kegel.com 2013-11-07 16:16:47 CST --- Can you give an example of another app with the same problem?
http://bugs.winehq.org/show_bug.cgi?id=34868
Dr. Pablo Aguirre ichbinpablo@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|INVALID |
--- Comment #9 from Dr. Pablo Aguirre ichbinpablo@gmail.com 2013-11-07 16:36:55 CST --- (In reply to comment #8)
Can you give an example of another app with the same problem?
I saw similar issue with any AutoCAD-LT_x64 and SolidWorks_x64.
Thanks to you in advance!
http://bugs.winehq.org/show_bug.cgi?id=34868
--- Comment #10 from Anastasius Focht focht@gmx.net 2013-11-07 16:57:25 CST --- Hello folks,
--- quote --- I saw similar issue with any AutoCAD-LT_x64 and SolidWorks_x64. --- quote ---
That's a pretty broad statement. What do you mean with 'similar' issue? SetWindowLong API being abused?
It would be useful to provide trace logs that proves this.
If thats not possible, please state the exact version numbers/year/release of the 64-bit applications you think have a 'similar' issue.
FYI: Those apps you listed are heavyweight commercial applications that have a multitude of bugs even in 32-bit variants.
Regards
http://bugs.winehq.org/show_bug.cgi?id=34868
--- Comment #11 from Dan Kegel dank@kegel.com 2013-11-07 17:16:56 CST --- It is tempting to close this WONTFIX for now, and ask users who suspect there are similar problems to open up a new bug for each.
http://bugs.winehq.org/show_bug.cgi?id=34868
--- Comment #12 from Anastasius Focht focht@gmx.net 2013-11-07 17:56:41 CST --- Hello Dan,
--- quote --- It is tempting to close this WONTFIX for now, and ask users who suspect there are similar problems to open up a new bug for each. --- quote ---
sure, that would be the preferred solution. Newly reported problems can be still resolved as dupes if necessary.
I have the fear that those 'similar' issues are _not_ the same thing and they would pollute this this bug.
Regards
http://bugs.winehq.org/show_bug.cgi?id=34868
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |WONTFIX
--- Comment #13 from Dan Kegel dank@kegel.com 2013-11-07 18:09:44 CST --- Dr. Aguirre, please open a new bug for similar problems. We'll mark it as duplicate and reopen this one if it turns out to be appropriate.
http://bugs.winehq.org/show_bug.cgi?id=34868
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #14 from Dan Kegel dank@kegel.com 2013-11-07 18:10:08 CST --- Closing WONTFIX.
http://bugs.winehq.org/show_bug.cgi?id=34868
--- Comment #15 from Austin English austinenglish@gmail.com 2013-11-07 18:31:29 CST --- (In reply to comment #11)
It is tempting to close this WONTFIX for now, and ask users who suspect there are similar problems to open up a new bug for each.
It would be useful to have a wiki page with those sort of issues.
http://bugs.winehq.org/show_bug.cgi?id=34868
--- Comment #16 from Anastasius Focht focht@gmx.net 2013-11-08 04:17:38 CST --- Hello Austin,
--- quote --- It would be useful to have a wiki page with those sort of issues. --- quote ---
no, Wiki pages tend to rot away at some point with information simply outdated/wrong/misleading.
Wine Buzgilla should be the single source for documenting Windows compatibility issues. Make bug reports as good as possible by providing all information/explanation _there_. A simple query can tell a lot.
Example:
http://bugs.winehq.org/buglist.cgi?keywords=win64&keywords_type=allwords...
This gives a list with 64-bit applications encountered so far that have win64 compat issues. All them contain in-depth analysis, no need to extract information and put it somewhere else.
Regards
http://bugs.winehq.org/show_bug.cgi?id=34868
--- Comment #17 from Austin English austinenglish@gmail.com 2013-11-11 03:54:32 CST --- (In reply to comment #16)
Hello Austin,
--- quote --- It would be useful to have a wiki page with those sort of issues. --- quote ---
no, Wiki pages tend to rot away at some point with information simply outdated/wrong/misleading.
Wine Buzgilla should be the single source for documenting Windows compatibility issues. Make bug reports as good as possible by providing all information/explanation _there_. A simple query can tell a lot.
Good point. I've added a link to the search at http://wiki.winehq.org/Wine64