http://bugs.winehq.org/show_bug.cgi?id=25044
Summary: When calling a program via symlink, it causes a crash through TMySQLConnection.SetActive Product: Wine Version: 1.3.6 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: wine-bugzilla@thequod.de
If I am starting HeidiSQL using a symlink like this, it crashes as soon as connecting to the MySQL server:
/home/user/bin/heidisql -> /home/user/.wine/drive_c/Programme/HeidiSQL/heidisql.exe*
However, when directly calling the symlink target (/home/user/.wine/drive_c/Programme/HeidiSQL/heidisql.exe), it works.
I am attaching the MadExcept backtrace that is generated by HeidiSQL (with the inner most entry being unknown) as bugreport.txt: main thread ($9): 00000000 ??? 0075aa9f heidisql mysql_connection 483 +13 TMySQLConnection.SetActive 006c2fc2 heidisql Main 2768 +8 TMainForm.InitConnection 00703b2d heidisql connections 218 +3 Tconnform.btnOpenClick
Then, i have created a debug log using WINEDEBUG=+relay,+seh,+tid, which is rather huge, but hopefully helpful.
You can get HeidiSQL from http://www.heidisql.com/download.php (I have been using the latest build, currently r3579 - you can just download the .exe after having setup the last release).
Please let me know if I can provide any additional information.
http://bugs.winehq.org/show_bug.cgi?id=25044
--- Comment #1 from Daniel Hahler wine-bugzilla@thequod.de 2010-11-05 17:42:33 CDT --- Created an attachment (id=31742) --> (http://bugs.winehq.org/attachment.cgi?id=31742) output from using WINEDEBUG=+relay,+seh,+tid
http://bugs.winehq.org/show_bug.cgi?id=25044
--- Comment #2 from Daniel Hahler wine-bugzilla@thequod.de 2010-11-05 17:43:23 CDT --- Created an attachment (id=31743) --> (http://bugs.winehq.org/attachment.cgi?id=31743) MadExcept backtrace from within HeidiSQL
http://bugs.winehq.org/show_bug.cgi?id=25044
--- Comment #3 from Daniel Hahler wine-bugzilla@thequod.de 2010-11-05 17:57:46 CDT --- When changing to the application directory first ("cd ~/.wine/drive_c/Programme/HeidiSQL"), using the symlink to start the program does not cause this crash.
So, it looks like some resource in the program's folder gets accessed somehow and using the full path to start the program appears to handle this case, while using a symlink does not?!
http://bugs.winehq.org/show_bug.cgi?id=25044
--- Comment #4 from Daniel Hahler wine-bugzilla@thequod.de 2010-11-05 18:02:48 CDT ---
From the author of HeidiSQL (in
http://code.google.com/p/heidisql/issues/detail?id=2227#c9):
Feels related to usage of libmysql.dll [which is in the programs directory]. The last callstack line refers to the initial connection object initialization, before sending anything over the net: FHandle := mysql_init(nil); Could easily be the right lib is not where it's expected to be from the symlink's perspective. Finally this would be a Wine issue in that case I guess. Hmm..
http://bugs.winehq.org/show_bug.cgi?id=25044
Daniel Hahler wine-bugzilla@thequod.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|When calling a program via |When calling a program via |symlink, it causes a crash |symlink, it causes a crash |through |when loading local dll |TMySQLConnection.SetActive |(libmysql.dll)
http://bugs.winehq.org/show_bug.cgi?id=25044
--- Comment #5 from Nikolay Sivov bunglehead@gmail.com 2010-11-05 18:08:08 CDT --- Try to run it not from program dir on windows. If it crashes there's no bug.
http://bugs.winehq.org/show_bug.cgi?id=25044
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID
--- Comment #6 from Dmitry Timoshkov dmitry@codeweavers.com 2010-11-07 01:22:45 CST --- (In reply to comment #3)
When changing to the application directory first ("cd ~/.wine/drive_c/Programme/HeidiSQL"), using the symlink to start the program does not cause this crash.
That's an application bug, it depends on the current directory.
http://bugs.winehq.org/show_bug.cgi?id=25044
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #7 from Dmitry Timoshkov dmitry@codeweavers.com 2010-11-07 01:22:58 CST --- Closing invalid.
http://bugs.winehq.org/show_bug.cgi?id=25044
Daniel Hahler wine-bugzilla@thequod.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |UNCONFIRMED Resolution|INVALID |
--- Comment #8 from Daniel Hahler wine-bugzilla@thequod.de 2010-11-08 03:36:36 CST --- I am re-opening it:
on Windows the DLL gets looked up in the program's directory, also when starting it from somewhere else, e.g. "C:>c:\Programme\HeidiSQL\heidisql.exe" works.
The same works on Wine ("/home/user/.wine/drive_c/Programme/HeidiSQL/heidisql.exe"), but it fails when using a symlink (pointing at the .exe instead).
The issue appears to be that the programs directory is not being looked up for loading DLLs when called via symlink.
http://bugs.winehq.org/show_bug.cgi?id=25044
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID
--- Comment #9 from Alexandre Julliard julliard@winehq.org 2010-11-08 04:14:45 CST --- (In reply to comment #8)
I am re-opening it:
on Windows the DLL gets looked up in the program's directory, also when starting it from somewhere else, e.g. "C:>c:\Programme\HeidiSQL\heidisql.exe" works.
The same works on Wine ("/home/user/.wine/drive_c/Programme/HeidiSQL/heidisql.exe"), but it fails when using a symlink (pointing at the .exe instead).
Don't do that then. Create a wrapper script or something like that.
http://bugs.winehq.org/show_bug.cgi?id=25044
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #10 from Dmitry Timoshkov dmitry@codeweavers.com 2010-11-08 05:01:59 CST --- Closing.
http://bugs.winehq.org/show_bug.cgi?id=25044
Daniel Hahler wine-bugzilla@thequod.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |UNCONFIRMED Resolution|INVALID |
--- Comment #11 from Daniel Hahler wine-bugzilla@thequod.de 2010-11-08 06:38:07 CST ---
Don't do that then. Create a wrapper script or something like that.
This sounds like a doctor responding "Don't do that then", when you describe some symptoms.
Only because there's workaround does not mean there is no bug, and I still consider this to be a (minor) bug, which should get fixed:
The behavior of the program should not be different when called as symlink than when being called "directly".
Sorry, I am re-opening it again, and I hope you see that this is a (minor) bug, and "don't do that then" is only a workaround.
http://bugs.winehq.org/show_bug.cgi?id=25044
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID
--- Comment #12 from Alexandre Julliard julliard@winehq.org 2010-11-08 06:58:47 CST --- (In reply to comment #11)
Don't do that then. Create a wrapper script or something like that.
This sounds like a doctor responding "Don't do that then", when you describe some symptoms.
Only because there's workaround does not mean there is no bug, and I still consider this to be a (minor) bug, which should get fixed:
The behavior of the program should not be different when called as symlink than when being called "directly".
Who says so? If the app uses its path to locate files, then it makes sense that the behavior would be different if the launch path is different. Please don't reopen unless you can demonstrate that the app works fine on Windows when started through a symlink.
http://bugs.winehq.org/show_bug.cgi?id=25044
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #13 from Dmitry Timoshkov dmitry@codeweavers.com 2010-11-08 09:56:40 CST --- Closing invalid.
http://bugs.winehq.org/show_bug.cgi?id=25044
Daniel Hahler wine-bugzilla@thequod.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |UNCONFIRMED Resolution|INVALID |
--- Comment #14 from Daniel Hahler wine-bugzilla@thequod.de 2010-11-11 06:56:02 CST ---
Who says so? If the app uses its path to locate files, then it makes sense that the behavior would be different if the launch path is different.
You are still not understanding the main issue: the launch path is different both when using the full path to the exec (no crash) and when using the symlink (crash).
If the program would use the launch path then also the non-symlink variant would crash, wouldn't it?
Please don't reopen unless you can demonstrate that the app works fine on Windows when started through a symlink.
Using mklink on Windows 7 does not cause a crash when loading the DLL:
C:>mklink heidi.exe "c:\Program Files (x86)\HeidiSQL\heidisql.exe" symbolische Verknüpfung erstellt für sex.exe <<===>> c:\Program Files (x86)\HeidiSQL\heidisql.exe C:>heidi
http://bugs.winehq.org/show_bug.cgi?id=25044
--- Comment #15 from Alexandre Julliard julliard@winehq.org 2010-11-11 07:13:22 CST --- (In reply to comment #14)
Who says so? If the app uses its path to locate files, then it makes sense that the behavior would be different if the launch path is different.
You are still not understanding the main issue: the launch path is different both when using the full path to the exec (no crash) and when using the symlink (crash).
If the program would use the launch path then also the non-symlink variant would crash, wouldn't it?
No, what matters is not the path you specify on the command line, it's where the binary was loaded from. If you use a symlink then the binary is loaded from a different directory, and that's the path that the app gets. It's the same on Windows.
Please don't reopen unless you can demonstrate that the app works fine on Windows when started through a symlink.
Using mklink on Windows 7 does not cause a crash when loading the DLL:
C:>mklink heidi.exe "c:\Program Files (x86)\HeidiSQL\heidisql.exe" symbolische Verknüpfung erstellt für sex.exe <<===>> c:\Program Files (x86)\HeidiSQL\heidisql.exe C:>heidi
That's interesting. It will need some test cases to find out if Windows handles symlinks specially for dll loading.
http://bugs.winehq.org/show_bug.cgi?id=25044
--- Comment #16 from butraxz@gmail.com 2013-06-15 05:36:54 CDT --- This has not been updated for over 900 days.
Is this still an issue in 1.6-rc2 or higher or is this abandoned ?
https://bugs.winehq.org/show_bug.cgi?id=25044
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |ABANDONED
--- Comment #17 from Austin English austinenglish@gmail.com --- (In reply to butraxz from comment #16)
This has not been updated for over 900 days.
Is this still an issue in 1.6-rc2 or higher or is this abandoned ?
Abandoned.
https://bugs.winehq.org/show_bug.cgi?id=25044
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #18 from Austin English austinenglish@gmail.com --- Closing.