http://bugs.winehq.org/show_bug.cgi?id=34343
Bug #: 34343 Summary: mIRC 7.32: entering infinite loop after dismissing trial dialog on Mac OS X Product: Wine Version: 1.7.0 Platform: x86 OS/Version: Mac OS X Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: ionic@ionic.de Classification: Unclassified
Created attachment 45716 --> http://bugs.winehq.org/attachment.cgi?id=45716 Excerpt from WINEDEBUG=warn+all,err+all,fixme-all,trace+relay wine mirc.exe
A newly installed mIRC in a clean wineprefix is entering a closed loop after dismissing the trial dialog on Mac OS X. It doesn't matter where it was installed, I also tried dosdrive_c/mIRC, just to make sure.
Excerpt from WINEDEBUG=warn+all,err+all,fixme-all,trace+relay wine mirc.exe is attached.
I can upload the full log, if need be, or logs with other WINEDEBUG values (though trace tends to be very verbose.)
This bug is only affecting OS X, mIRC is starting up and working fine (mostly) with wine 1.7.0 on Linux. Don't try to reproduce it on Linux, please.
Wine has been built and installed via MacPorts.
http://bugs.winehq.org/show_bug.cgi?id=34343
Mihai Moldovan ionic@ionic.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download CC| |ionic@ionic.de
--- Comment #1 from Mihai Moldovan ionic@ionic.de 2013-08-24 07:57:30 CDT --- Download URL: http://www.mirc.co.uk/get.html
Also adding download keyword.
http://bugs.winehq.org/show_bug.cgi?id=34343
Ken Thomases ken@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |ken@codeweavers.com
--- Comment #2 from Ken Thomases ken@codeweavers.com 2013-08-24 16:38:56 CDT --- I'm not able to reproduce this using either Wine 1.7.0 or current git. I downloaded mIRC 7.32 from the link you gave. I installed it into a new wineprefix. I ran the app. I got the dialog telling me I had 30 days to evaluate and letting me Register or Continue; I chose Continue. I was then able to log into FreeNode and join #winehackers.
What version of Mac OS X are you using? I'm running 10.6.8.
Are any wine processes using lots of CPU? Can you collect and attach a sample report from those? (You can either do View > Sample Process in Activity Monitor or use the command "sample <pid>" in Terminal.)
If none are using lots of CPU, see if you can identify the PID of the one running mIRC and sample that. (Check the output of "ps xww | grep wine" to find the right process.)
Does it make any difference if you switch to using the X11 driver instead of the Mac driver? Use regedit to set this registry key:
[HKEY_CURRENT_USER\Software\Wine\Drivers] "Graphics"="x11"
http://bugs.winehq.org/show_bug.cgi?id=34343
--- Comment #3 from Mihai Moldovan ionic@ionic.de 2013-08-24 17:52:04 CDT --- (In reply to comment #2)
I'm not able to reproduce this using either Wine 1.7.0 or current git.
Bummer. :(
What version of Mac OS X are you using? I'm running 10.6.8.
OS X 10.8.4 (Snow Leopard) here.
Are any wine processes using lots of CPU? Can you collect and attach a sample report from those? (You can either do View > Sample Process in Activity Monitor or use the command "sample <pid>" in Terminal.)
Yes, of course. The mIRC process does. :) No other wine processes, though.
If none are using lots of CPU [...]
Sample file incoming.
Does it make any difference if you switch to using the X11 driver instead of the Mac driver?
Unfortunately, no, the behavior is exactly the same. Thank you for the handy trick for switching between quartz and X11, though!
http://bugs.winehq.org/show_bug.cgi?id=34343
--- Comment #4 from Mihai Moldovan ionic@ionic.de 2013-08-24 17:54:25 CDT --- Created attachment 45719 --> http://bugs.winehq.org/attachment.cgi?id=45719 Sample file auf wine mirc.exe process.
http://bugs.winehq.org/show_bug.cgi?id=34343
Mihai Moldovan ionic@ionic.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #45719|Sample file auf wine |Sample file of wine description|mirc.exe process. |mirc.exe process.
http://bugs.winehq.org/show_bug.cgi?id=34343
--- Comment #5 from Mihai Moldovan ionic@ionic.de 2013-08-24 18:09:22 CDT --- (In reply to comment #3)
OS X 10.8.4 (Snow Leopard) here.
Sorry, Mountain Lion... what is it with those cats.
http://bugs.winehq.org/show_bug.cgi?id=34343
--- Comment #6 from Ken Thomases ken@codeweavers.com 2013-08-24 18:32:08 CDT --- Created attachment 45720 --> http://bugs.winehq.org/attachment.cgi?id=45720 Disable TLS 1.1+ on Mac
Hmm. It definitely seems to be a bug. It looks like dlls/user32/button.c:BUTTON_CheckAutoRadioButton() is looping infinitely because dlls/user32/dialog.c:GetNextDlgGroupItem() is never returning the starting control after the first time.
I'm not sure why that happens for you and not me. One difference that comes to mind between 10.6.x and 10.8.x is the support for more recent versions of TLS in secur32. I've attached a patch which neutralizes that difference. It doesn't address the actual bug in user32, but maybe changes mIRC's behavior to avoid it. (Although, I would expect that TLS 1.1+ would be supported on most Linux distros, so it doesn't explain why it works there.)
Does it help?
http://bugs.winehq.org/show_bug.cgi?id=34343
--- Comment #7 from Mihai Moldovan ionic@ionic.de 2013-08-24 18:44:32 CDT --- (In reply to comment #6)
I'm not sure why that happens for you and not me. One difference that comes to mind between 10.6.x and 10.8.x is the support for more recent versions of TLS in secur32.
Why would support a newer TLS version ever cause problems like this?
I'll give it a try though...
http://bugs.winehq.org/show_bug.cgi?id=34343
--- Comment #8 from Ken Thomases ken@codeweavers.com 2013-08-24 18:47:35 CDT --- Well, it's nothing more than a hunch, really. My thinking is that mIRC will set different options in its Connect dialog (the one that should show up after continuing from the trial dialog) depending on what TLS versions are supported by the platform. I further figured, it is during this option-setting that the infinite loop bug is triggered.
http://bugs.winehq.org/show_bug.cgi?id=34343
--- Comment #9 from Mihai Moldovan ionic@ionic.de 2013-08-24 18:53:15 CDT --- Ah, hmm... that kinda makes sense. Recompiling wine takes ages though, sorry.
Please forgive my inability to type correctly... run a mental s/support a/support for a/ on the last comment.
http://bugs.winehq.org/show_bug.cgi?id=34343
--- Comment #10 from Mihai Moldovan ionic@ionic.de 2013-08-24 19:35:38 CDT --- Created attachment 45722 --> http://bugs.winehq.org/attachment.cgi?id=45722 Sample with TLS 1.1 disabled.
Sorry for the previous sample, as well, because that was created with wine 1.6. But as it's showing the same symptoms as 1.7.0, I guess we can ignore it.
Still no luck, even with disabling TLS 1.1+. Looping and looping.
http://bugs.winehq.org/show_bug.cgi?id=34343
--- Comment #11 from Mihai Moldovan ionic@ionic.de 2013-08-25 05:55:17 CDT --- One other difference comes to mind, though. You're likely building wine with (llvm-?)gcc, while MacPorts defaults to clang on OS X 10.8. Same thing for Linux, which has been using GCC to build wine. I guess I could/should try rebuilding with gcc.
http://bugs.winehq.org/show_bug.cgi?id=34343
--- Comment #12 from Bruno Jesus 00cpxxx@gmail.com 2013-08-25 07:57:01 CDT --- Reminds me of http://bugs.winehq.org/show_bug.cgi?id=34066#c3
http://bugs.winehq.org/show_bug.cgi?id=34343
--- Comment #13 from Mihai Moldovan ionic@ionic.de 2013-08-25 08:07:32 CDT --- (In reply to comment #12)
Reminds me of http://bugs.winehq.org/show_bug.cgi?id=34066#c3
I've seen similar errors with .NET installers. Likewise built with clang. It looped, but I didn't really care to debug it. May be the very same symptom, though, as looping started after clicking a button.
I'm about to install Apple's GCC 4.2, because... Apple removed "pure" GCC as of 10.7 and we're now stuck with llvm-gcc, which doesn't compile wine correctly (crashing on startup.)
Likewise, I have FSF GCCs 4.4 to 4.7 installed on my system, but those won't compile the winemac.drv due to missing ObjC blocks support.
So fetching and installing Apple GCC 4.2 it is, which will likely take some time.
Unrelated to this, I'll also try building wine with clang-3.3 and see if that behaves better.
http://bugs.winehq.org/show_bug.cgi?id=34343
--- Comment #14 from Mihai Moldovan ionic@ionic.de 2013-08-25 11:13:03 CDT --- Wine git compiled with clang 3.3 on Linux seems to behave as if compiled with GCC, no loops (weirdly?)
Moving on to compiling wine with clang 3.3 on OS X and building Apple GCC 4.2.1. This will probably take a good while...
http://bugs.winehq.org/show_bug.cgi?id=34343
--- Comment #15 from Mihai Moldovan ionic@ionic.de 2013-08-25 12:36:42 CDT --- (In reply to comment #14)
Wine git compiled with clang 3.3 on Linux seems to behave as if compiled with GCC, no loops (weirdly?)
Moving on to compiling wine with clang 3.3 on OS X...
Aaaaand that's working. No more loop, the connection window comes right up after dismissing the trial dialog. Does this mean, that the bug is likely being triggered by clang 3.2 as provided by Apple?! I'm also having a vanilla clang 3.2 compiled with MacPorts, guess I'll try reproducing the bug with that one too. Not that I wouldn't trust Apple... screw that, I very much don't.
and building Apple GCC 4.2.1.
Still working/compiling on that.
http://bugs.winehq.org/show_bug.cgi?id=34343
--- Comment #16 from Ken Thomases ken@codeweavers.com 2013-08-25 12:44:58 CDT --- I'm guessing it has to do with the compiler's attempts to optimize the generated code. If you have a build that reproduces the problem and then you do:
cd dlls/user32 touch button.c dialog.c make CFLAGS=-O0
and then run that Wine from within the build tree, I suspect that will avoid the problem.
There are a couple of possibilities: it's a bug in the compiler such that it's producing incorrect code from the Wine sources, or it's a subtle bug in Wine that's only revealed by certain optimization strategies.
http://bugs.winehq.org/show_bug.cgi?id=34343
--- Comment #17 from Mihai Moldovan ionic@ionic.de 2013-08-25 13:51:11 CDT --- (In reply to comment #16)
I'm guessing it has to do with the compiler's attempts to optimize the generated code.
This said, I have actually not passed any optimization flags when compiling wine git with clang 3.3 (neither on OS X, nor on Linux.) I figured configure/the Makefiles would default to -O2. Instead, there's no optimization taking place (as I can see in the current compilation output of both apple gcc 4.2 and vanilla clang 3.2.)
Thanks for catching that, I'll take a look at what the Linux box does and will also play around with optimization levels.
http://bugs.winehq.org/show_bug.cgi?id=34343
--- Comment #18 from Mihai Moldovan ionic@ionic.de 2013-08-25 14:57:00 CDT --- Wow, I'm speechless.
Here's a first result list:
wine 1.6 + Apple clang 3.2 + opt (compiled by MacPorts): failing wine 1.7.0 + Apple clang 3.2 + opt (compiled by MacPorts): failing
wine git (8f09d3470) + Apple GCC 4.2 + noopt: working wine git (8f09d3470) + vanilla clang 3.3 + noopt: working wine git (8f09d3470) + vanilla clang 3.2 + noopt: working wine git (8f09d3470) + Apple clang 3.2 + noopt: failing
All those wine versions have been built using exactly the same configure arguments and CFLAGS, the only alternation has been the CC environment variable.
---
Linux: wine git (8f09d3470) + (Gentoo) GCC 4.7 + opt: working wine git (8f09d3470) + (Gentoo) clang 3.3 + noopt: working
---
What is this? Could this actually be a compiler bug, because Apple decided to ship a pre-release of clang 3.2 which contains bugs, as opposed to the released clang 3.2 version?
That's what /usr/bin/clang --version tells me: Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)
I guess I'm still gonna rebuild wine with all those compilers for fun with optimizations enabled and see if that behaves any differently.
http://bugs.winehq.org/show_bug.cgi?id=34343
--- Comment #19 from Mihai Moldovan ionic@ionic.de 2013-08-25 18:28:46 CDT --- Results with optimization (-O2):
wine git (8f09d3470) + vanilla clang 3.3 + opt: working wine git (8f09d3470) + vanilla clang 3.2 + opt: working wine git (8f09d3470) + Apple GCC 4.2 + opt: working wine git (8f09d3470) + Apple clang 3.2 + opt: failing
Does this mean it's a compiler bug and we can't do anything on wine side, but rather make MacPorts blacklist Apple clang 3.2 for wine and compile using the MacPorts provided clang 3.2 or 3.3 ports? :(
http://bugs.winehq.org/show_bug.cgi?id=34343
--- Comment #20 from Ken Thomases ken@codeweavers.com 2013-08-25 18:53:18 CDT --- (In reply to comment #19)
Does this mean it's a compiler bug and we can't do anything on wine side, but rather make MacPorts blacklist Apple clang 3.2 for wine and compile using the MacPorts provided clang 3.2 or 3.3 ports? :(
Sounds like it. Thanks for doing all of that building and testing.
http://bugs.winehq.org/show_bug.cgi?id=34343
--- Comment #21 from Austin English austinenglish@gmail.com 2013-08-26 14:37:00 CDT --- This is http://llvm.org/bugs/show_bug.cgi?id=9707, it's fixed in Clang's trunk.
https://bugs.winehq.org/show_bug.cgi?id=34343
Mihai Moldovan ionic@ionic.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |UPSTREAM
--- Comment #22 from Mihai Moldovan ionic@ionic.de --- Fixed in clang upstream.
https://bugs.winehq.org/show_bug.cgi?id=34343
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #23 from Bruno Jesus 00cpxxx@gmail.com --- (In reply to Mihai Moldovan from comment #22)
Fixed in clang upstream.
Closing upstream.