New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Versions after 5203 crash in Linux+Wine #83

Closed
babudro opened this Issue Jan 9, 2018 · 21 comments

Comments

Projects
None yet
5 participants
@babudro

babudro commented Jan 9, 2018

Expected behaviour

Application would start normally.

Current behaviour

It crashes immediately.

Failure information (for bugs)

Immediately crashes upon launching the software after the installer is finished.

Also tried launching the software from outside the installer and it crashes the same way.

Consistently crashes on two different computers. Both are running the same Linux and Wine versions, but on one the crash was seen after upgrading from HeidiSQL 9.5.0.5202, while on the other it was a fresh installation of both Wine and HeidiSQL, so prior configs cannot be an issue.

Once I install version 9.5.0.5203 then it works properly again.

Steps to reproduce

  1. Download the full installer for any version from 9.5.0.5204 to the most recent (5219).
  2. Install it and launch after installing.

Context

  • 9.5.0.5204 or later
  • DB version is not applicable since it crashes before ever seeing the Session Manager
  • Antergos (Arch) Linux with Wine 3.0-rc5

Failure Logs

bugreport.txt

@ansgarbecker

This comment has been minimized.

Collaborator

ansgarbecker commented Jan 9, 2018

5204 was the SynEdit component update 2.1.0-beta, so I guess this should be reported in their tracker.

At least we have a callstack, which says the crash happens in line 4 of TCustomSynEdit.WMSize

@ansgarbecker

This comment has been minimized.

Collaborator

ansgarbecker commented Jan 17, 2018

The relevant lines 3 + 4 look like this:

Size := D2D1SizeU(ClientWidth, ClientHeight);
FRenderTarget.Resize(Size);

So the crash possibly happens due to missing Direct2D API on Wine. Could that be the case? I read that Wine 1.8 introduced Direct2D support, but you wrote you are already on 3.0-rc5. Hm.

@lourdas

This comment has been minimized.

lourdas commented Jan 17, 2018

I use Wine 2.20 and it still happens to me. It might be a Wine issue, but I can't tell.

@lourdas

This comment has been minimized.

lourdas commented Jan 25, 2018

I've upgraded to Wine 3.0 and the issue still exists. Could there be some workaround? What changed with respect to 2D after v.5203?

ansgarbecker referenced this issue in SynEdit/SynEdit Jan 25, 2018

Added experimental support for DirectWrite (might not compile in olde…
…r Delphi versions, but this will be fixed soon)
@ansgarbecker

This comment has been minimized.

Collaborator

ansgarbecker commented Jan 25, 2018

I just found the cause, by tracking the above lines back in the code history of SynEdit. It's the commit SynEdit/SynEdit@ae47e3b . I just left a hopefully precise comment in that commit, so we have a chance to get a fix for Wine.

@ansgarbecker

This comment has been minimized.

Collaborator

ansgarbecker commented Jan 25, 2018

I have opened a ticket for this topic in the SynEdit tracker: SynEdit/SynEdit#91

@ansgarbecker ansgarbecker added this to the v9.6 milestone Feb 18, 2018

@ansgarbecker

This comment has been minimized.

Collaborator

ansgarbecker commented Feb 18, 2018

Not sure how we get around this issue but this is a must for the next release.

@lourdas

This comment has been minimized.

lourdas commented Mar 10, 2018

@ansgarbecker Can you patch the SynEdit component manually and include it in the next test build so that we can test it against Wine?

@ansgarbecker

This comment has been minimized.

Collaborator

ansgarbecker commented Mar 11, 2018

@lourdas I have currently no clue how to change the SynEdit code so it works in Wine again - apart from downgrading. My suggestion for detecting Wine in the above mentioned ticket is just a fragment of a solution.

@lourdas

This comment has been minimized.

lourdas commented Mar 11, 2018

@ansgarbecker Ok, so, would you consider downgrading or even maintaining another build with the older version of the component...? It's a pity we can't run the latest version in Linux. I will try to ping the SynEdit committer, but I don't see anything moving there...

@lourdas

This comment has been minimized.

lourdas commented Mar 25, 2018

I had progress with this issue. By tweaking the Wine configuration, the latest HeidiSQL version runs without any issue. I'm attaching a screenshot:
wine_config_for_heidisql
So, you must run winecfg, go to Libraries, add d2d1, click on edit and select Native (Windows). All other options did not work and crashed the application. I'm happy this workaround works for me and HeidiSQL runs fine.

@ansgarbecker It would be nice if there would be a way to alert other Wine users about this workaround.

@ansgarbecker

This comment has been minimized.

Collaborator

ansgarbecker commented Mar 25, 2018

Awesome finding. Thanks a lot!
I would like to set this override automatically, so the user doesn't have to care about it. Here's a thread talking about setting the WINEDLLOVERRIDES environment variable to "d2d1=n" for a shell. I thought I can probably set this in heidisql.exe in a very early stage, but I think that's already to late, as dlls are loaded before the application's code is executed.

@lourdas

This comment has been minimized.

lourdas commented Mar 25, 2018

Just write a paragraph explaining this in https://www.heidisql.com/help.php and I think we'll be ok. :)

@babudro

This comment has been minimized.

babudro commented Mar 26, 2018

@ansgarbecker

This comment has been minimized.

Collaborator

ansgarbecker commented Apr 7, 2018

I just placed a paragraph with a link back to your nice screenshot, @lourdas .

Please shout if someone has an idea how to automatically apply this setting.

@ansgarbecker

This comment has been minimized.

Collaborator

ansgarbecker commented May 1, 2018

I added that note to the download page as well now. The help page is long and probably not read by the relevant users.

@alexalok

This comment has been minimized.

alexalok commented Aug 24, 2018

If I understand correctly, the crash happens only after calling a missing API. If that is a correct assumption, a fix can be applied on program startup early enough so that it is being executed before the crash occures.
For example, it can show a message box explaining on how to resolve the issue or if GUI rendering is not yet possible it can open a txt file with an explanation that is distributed along the program.

@lourdas

This comment has been minimized.

lourdas commented Aug 24, 2018

@alexalok IMHO, a missing API function that doesn't exist in a emulated host environment (Wine) is not an excuse to put such a fix you mention inside the program's code. HeidiSQL is written for Windows and it works excellent there. Since a workaround is found for Wine, I guess that's all it matters.

@ansgarbecker What do you think?

@ansgarbecker

This comment has been minimized.

Collaborator

ansgarbecker commented Aug 24, 2018

I still would not have any problem with some additional code, only if that would fix this annoyance finally. But without technical alternatives, for the moment the solution is a hint on the download and help pages.

@lorenzos

This comment has been minimized.

lorenzos commented Nov 9, 2018

I have no d2d1 in that list of DLL overrides. I can type it by hand and apply, but it doesn't seem to work. Should I have it? If yes, do I have to install something? Thanks.

@lourdas

This comment has been minimized.

lourdas commented Nov 9, 2018

@lorenzos I'm using Gentoo with the wine-vanilla package (currently at 3.19). I don't know about other Linux distributions if you need to install additional packages, so you will need to search a bit more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment