HeidiSQL 11.0 GUI Running in Background but not Visible

blakjak's profile image blakjak posted 4 years ago in General Permalink

I have been using HeidiSQL latest portable version for a couple of weeks with no problem. Suddenly after an overnight update to Windows 10 prerelease 200612-1734 I now no longer have any GUI for HeidiSQL. I have seen several posts on this issue from the past so I did a complete fresh install with the Windows Installer version. Still no GUI. I checked REGEDIT for "MainWin" items but there are none.

I run with 3 monitors and multiple desktops but up to now have had no issue. HeidiSQL is not appearing on any of them.

Using Task Monitor I can see HEIDISQL.exe is running in the background, but no icon appears in the taskbar when launched. It is not one of the active processes.

Any idea what is causing this and how to fix it?

blakjak's profile image blakjak posted 4 years ago Permalink

Some update ---

I just tried the 32 bit portable version and it works fine. Nothing changed on the PC since the problem with the 64bit.

The issue now is that with 32bit, the working SSL certificates I had with the 64bit version no longer work. It says the certificate chain was issued by an authority that is not trusted, but again, nothing changed since I was using the 64bit version.

blakjak's profile image blakjak posted 4 years ago Permalink

I should add that my own software that uses the same SSL certificates to connect to my MariaDB server has no problem so it is definitely a HeidiSQL issue.

blakjak's profile image blakjak posted 4 years ago Permalink

Another update - just tried the latest nightly build 64bit executable but it did not work. Still stuck in background mode.

blakjak's profile image blakjak posted 4 years ago Permalink

Regarding the issue of SSL certs, one of the certs was corrupted so in fact when it was replaced the 32-bit HeidiSQL works fine with SSL.

Still the same problem with 64-bit only running in background with no GUI.

ansgar's profile image ansgar posted 4 years ago Permalink

If you have no "MainWin*" entries in your registry key, then it should not be a monitor issue.

You should probably try out the latest built installer, from the "Nightly builds" section on the download page.

noisycomputation's profile image noisycomputation posted 4 years ago Permalink

Finally I stumble upon this!

@blakjak, thank you for your detailed report!

I am on the same Windows build (prerelease 200612-1734) and have encountered the same issue as @blakjak. Uninstalling, wiping the registry of anything related to Heidi, and reinstalling also did not resolve the issue.

To reiterate and add a bit more context, this happens with 64-bit installs (both system and portable). When heidisql.exe is executed, the GUI does not appear on screen and a Heidi tab does not appear in the taskbar or system tray, making it impossible to interact with the Heidi process. The process does show up in Task Manager as a background process, and the details tab shows both memory usage and page faults. Executing the file again launches another background process.

I don't see anything relevant in the Event Viewer. The Process Monitor reports a number of buffer overflows and "name not found" errors when scanning the registry, but nothing really jumps out.

The portable 32-bit version seems to be working well. Thanks @blakjak for pointing that out!

noisycomputation's profile image noisycomputation posted 4 years ago Permalink

If you have no "MainWin*" entries in your registry key, then it should not be a monitor issue.

You should probably try out the latest built installer, from the "Nightly builds" section on the download page.

I get the same result as reported above with the nightly 64-bit portable and multilib installer.

It's something to do with that specific Windows build. It would be nice to find out exactly what, because it might actually be a Heidi bug on some code path that just hadn't been traversed in earlier Windows builds. Or it's a Windows bug, I've certainly seen a few on the Dev Channel / Fast Ring.

blakjak's profile image blakjak posted 4 years ago Permalink

If you have no "MainWin*" entries in your registry key, then it should not be a monitor issue.

You should probably try out the latest built installer, from the "Nightly builds" section on the download page.

As per @noisycomputation post above, the latest nightly 64bit build makes no difference. I can only get the 32-bit versions to work properly.

Something specifically changed with the Windows 10 Build 20150.rs_prelease.200612-1734. Note there was also an upgrade to the .Net almost immediately after that upgrade. Not sure if that might affect the software.

ansgar's profile image ansgar posted 4 years ago Permalink

Who know, probably I left some place in the code with a check on an unassigned variable. At least that was the reason lately for my commit:96c16f18a6368810b187b2b01a1b87af005fd45a , where the new Delphi compiler suddenly initialized a variable differently to the compilers before. But I'm pretty sure there are if at all only very few places with such a logic in HeidiSQL.

Xjs's profile image Xjs posted 4 years ago Permalink

Same issue, also running Windows 10 Build 20150.rs_prelease.200612-1734. Is there a way we can help pinpointing this issue?

ansgar's profile image ansgar posted 4 years ago Permalink

Also with the latest HeidiSQL build? That's important here, as otherwise you don't have my above mentioned bugfix for a similar issue (but likely not the right one, I'm afraid).

Xjs's profile image Xjs posted 4 years ago Permalink

Just tried with r6013 (just placed heidisql64.r6013.exe in C:\Program Files\HeidiSQL and ran it) and after confirming I want to run the app although the publisher is unknown, I can see heidisql64.r6013.exe in the task manager, but no GUI or task bar icon.

Sparticuz's profile image Sparticuz posted 4 years ago Permalink

Also getting this when I moved from the Windows Insider Slow ring to the Fast ring (windows build 20150). Tried with Stable and 6013.

ansgar's profile image ansgar posted 4 years ago Permalink

A good idea for debugging here would be to have an empty registry key. But this is a bit uncomfortable. So, you could do it by

  1. downloading my just created portable beta and
  2. unzip somewhere and start heidisql.exe

Perhaps this makes some difference, and HeidiSQL is showing up. If not so, we can at least ensure there is no custom setting causing the issue.

After exiting HeidiSQL, you could delete the auto-created portable_settings.txt for running a new blank session.

Sparticuz's profile image Sparticuz posted 4 years ago Permalink

Same thing, nothing is displayed, but the task is in Task Manager. No portable_settings.txt gets created in the portable folder.

ansgar's profile image ansgar posted 4 years ago Permalink

Oh, if not even the portable_settings file gets created, then the few code lines before that creation must be affected. Or - more likely now - the executable is somehow not compatible, probably due to the UPX compression, or the exception handler. I compiled an executable here without both - please download it and place in your existing portable folder from the previous step.

blakjak's profile image blakjak posted 4 years ago Permalink

Oh, if not even the portable_settings file gets created, then the few code lines before that creation must be affected. Or - more likely now - the executable is somehow not compatible, probably due to the UPX compression, or the exception handler. I compiled an executable here without both - please download it and place in your existing portable folder from the previous step.

This version is working for me.

ansgar's profile image ansgar posted 4 years ago Permalink

That's cool!

Now, I modified the auto-build process so it does not compress the executable using UPX. And I repeated the last compilation.

Please update your portable now through the normal update process (Help > Check for updates). The file is more than twice as big as normally, but who cares.

blakjak's profile image blakjak posted 4 years ago Permalink

I tried the latest nightly build and the normal download and neither work.

Am I pulling the right ones?

r6014 ?

blakjak's profile image blakjak posted 4 years ago Permalink

I can still only get the BETA version to work.

ansgar's profile image ansgar posted 4 years ago Permalink

Not sure what you downloaded, the recompiled 64bit build is this one. Please verify by checking the filesize, it should be ~17MB (not ~7MB).

rickyheijnen's profile image rickyheijnen posted 4 years ago Permalink

I have the same issue since 4 days after update to Windows 10 prerelease 200612-1734

Heidisql is running in the background (with very low memory use of 17MB) but not visible.

blakjak's profile image blakjak posted 4 years ago Permalink

Not sure what you downloaded, the recompiled 64bit build is this one. Please verify by checking the filesize, it should be ~17MB (not ~7MB).

Yes, the file is 17,933kB. Doesn't seem to work. Tried downloading it twice.

rickyheijnen's profile image rickyheijnen posted 4 years ago Permalink

I compiled an executable here without both - please download it and place in your existing portable folder from the previous step.

Both portable (r6013) and beta.exe (r6014) are not working for me. The beta.exe is running in background with only 2,5MB of memory usage, but no GUI or task bar icon appears.

blakjak's profile image blakjak posted 4 years ago Permalink

Both portable (r6013) and beta.exe (r6014) are not working for me. The beta.exe is running in background with only 2,5MB of memory usage, but no GUI or task bar icon appears.

The "beta" and the "r6014" are not the same files. Did you get the file from the link provided?

https://www.heidisql.com/downloads/releases/heidisql_11.1beta.exe

rickyheijnen's profile image rickyheijnen posted 4 years ago Permalink

https://www.heidisql.com/downloads/releases/heidisql_11.1beta.exe

This file works for me, but only running it the first time. The Session Manager is appearing. When I close it and restart heidisql_11.1beta.exe its not working anymore and nothing appears.

blakjak's profile image blakjak posted 4 years ago Permalink

Strange. I have no issue with it running multiple times. Did you ensure all previous versions of the process were killed in the Task Manager?

ansgar's profile image ansgar posted 4 years ago Permalink

@blakjak Now I left away the exception handler as well, please update once again. Filesize is now slightly smaller than before (17938743 bytes here)

blakjak's profile image blakjak posted 4 years ago Permalink

That works!

ansgar's profile image ansgar posted 4 years ago Permalink

Ok, then it's most likely the exception handler causing this issue. Just to be sure, I just recompiled again, with compression. File size should be again smaller now (~7M). Please test.

blakjak's profile image blakjak posted 4 years ago Permalink

That version also runs OK.

Xjs's profile image Xjs posted 4 years ago Permalink

11.1 beta works for me, r6014 doesn't (none of the 3 builds do).

Xjs's profile image Xjs posted 4 years ago Permalink

11.1 beta works for me, r6014 doesn't (none of the 3 builds do).

Never mind that post, I must have made a mistake. r6014 is working.

ansgar's profile image ansgar posted 4 years ago Permalink

Thanks to all for really quick testing and feedback :) I can now track this down to the exception handler, which is in beta state currently for the new compiler. Will come back here once there is an update.

Just for the reference: http://forum.madshi.net/viewtopic.php?f=4&t=28819&p=53537#p53537

rickyheijnen's profile image rickyheijnen posted 4 years ago Permalink

Great work that you were able to track this down and can probably fix it.

Just want to mention that I have two other applications with the same issue. So I wonder if this is a specific bug in this Windows 10 prerelease version and they will fix it in the next release. I just did a rollback to a previous windows version and everything is working again.

Sparticuz's profile image Sparticuz posted 4 years ago Permalink

r6014 confirmed working for me as well.

Mogzol's profile image Mogzol posted 4 years ago Permalink

Looks like this issue is back again in r6015. Downgrading to r6014 fixes it for me.

ansgar's profile image ansgar posted 4 years ago Permalink

Yes, that 6014 build was an experiment, to find out the cause. I hope there will be some fix either in the Windows pre-release or in madExcept.

sp's profile image sp posted 4 years ago Permalink

Confirm bug issue with Windows 10 prerelease 200612-1734. I've just updated to 200617-1502 unfortunately no result. The only Heidi working build is 6014

blakjak's profile image blakjak posted 4 years ago Permalink

I tried to debug heidisql64.r6013.exe using Visual Studio and I got this exception right at the start of the code:

Exception thrown at 0x00007FFB004FD020 in heidisql64.r6013.exe: 0xC0000005: Access violation executing location 0x00007FFB004FD020. occurred

... and here is the call stack:

00007ffb004fd020() Unknown kernel32.dll!00007ffa8ddc15ab() Unknown GdiPlus.dll!00007ffa7ea92963() Unknown GdiPlus.dll!00007ffa7ea928c0() Unknown GdiPlus.dll!00007ffa7ea926d4() Unknown GdiPlus.dll!00007ffa7ea91d1c() Unknown heidisql64.r6013.exe!0000000000d37aef() Unknown heidisql64.r6013.exe!0000000000e80ad8() Unknown

Not sure if it will give you any clues but I thought I would post it anyway.

blakjak's profile image blakjak posted 4 years ago Permalink
00007ffb004fd020()  Unknown
kernel32.dll!00007ffa8ddc15ab() Unknown
GdiPlus.dll!00007ffa7ea92963()  Unknown
GdiPlus.dll!00007ffa7ea928c0()  Unknown
GdiPlus.dll!00007ffa7ea926d4()  Unknown
GdiPlus.dll!00007ffa7ea91d1c()  Unknown
heidisql64.r6013.exe!0000000000d37aef() Unknown
heidisql64.r6013.exe!0000000000e80ad8() Unknown

Please login to leave a reply, or register at first.