Error while upgrading

Plasm posted 7 years ago in General
I have problems while installing the newest nightly build:
- clicked update to 3626 (previous was 3622) -> update starts
- after downloading, updater starts
- after updating, HeidiSQL starts (with 3622 - this occurs every time I update HeidiSQL - the new version will be correctly installed the next time I update HeidiSQL)
- clicked update to 3626 again from menu -> update starts
- 3 error message dialogs - all with same message (haven´t keep them in mind, sorry. It was a simple dialog with msg and OK - not your "save bug report"-dialog. I think it was AccessViolation, but I´m not sure)
- clicked ok -> connection dialog starts
- clicked on the server I want to connect -> error dialog appears (this time your own dialog with "continue application", etc)
- clicked "close application" -> HeidiSQL was closed.
- clicked on HediSQL-shortcut -> exe not found. (HeidiSQL seems to be uninstalled - only few files left in directory)
- downloaded 3626 again from website and started it -> connection dialog appears (no installation window)
- clicked on "open" -> crash. Here´s the report:

date/time : 2010-12-07, 11:37:58, 301ms
computer name : WSJH2
user name : jh <admin>
registered owner : Microsoft / Microsoft
operating system : Windows 7 x64 build 7600
system language : German
system up time : 2 hours 8 minutes
program up time : 8 seconds
processors : 2x Intel(R) Core(TM)2 Duo CPU E8500 @ 3.16GHz
physical memory : 2024/3738 MB (free/total)
free disk space : (C:) 220,23 GB
display mode : 1600x1200, 32 bit
process id : $e00
allocated memory : 52,57 MB
executable : heidisql.r3626.exe
exec. date/time : 2010-12-07 11:37
version :
compiled with : Delphi 2010
madExcept version : 3.0k
callstack crc : $00000000, $f31fec96, $f31fec96
exception number : 1
exception class : EAccessViolation
exception message : Access violation at address 00000000. Read of address 00000000.

main thread ($a8c):
00000000 ???
00759a07 heidisql.r3626.exe mysql_connection 485 +13 TMySQLConnection.SetActive
006c36ec heidisql.r3626.exe Main 2779 +9 TMainForm.InitConnection
00704605 heidisql.r3626.exe connections 221 +3 Tconnform.btnOpenClick
0053b1b3 heidisql.r3626.exe Controls TControl.Click
004d2ab2 heidisql.r3626.exe StdCtrls TCustomButton.Click
004d3518 heidisql.r3626.exe StdCtrls TCustomButton.CNCommand
0053ac48 heidisql.r3626.exe Controls TControl.WndProc
0053f510 heidisql.r3626.exe Controls TWinControl.WndProc
004d2778 heidisql.r3626.exe StdCtrls TButtonControl.WndProc
0053a86c heidisql.r3626.exe Controls TControl.Perform
0053f663 heidisql.r3626.exe Controls DoControlMsg
005400cb heidisql.r3626.exe Controls TWinControl.WMCommand
00565308 heidisql.r3626.exe Forms TCustomForm.WMCommand
0053ac48 heidisql.r3626.exe Controls TControl.WndProc
0053f510 heidisql.r3626.exe Controls TWinControl.WndProc
00562210 heidisql.r3626.exe Forms TCustomForm.WndProc
0053ebb0 heidisql.r3626.exe Controls TWinControl.MainWndProc
0049a5dc heidisql.r3626.exe Classes StdWndProc
76f10ad1 USER32.dll CallWindowProcW
007484a0 heidisql.r3626.exe helpers 1423 +1 CallOld
007485e8 heidisql.r3626.exe helpers 1470 +44 SizeGripWndProc
76f0cd7c USER32.dll SendMessageW
76f10ad1 USER32.dll CallWindowProcW
0053f610 heidisql.r3626.exe Controls TWinControl.DefaultHandler
0053b604 heidisql.r3626.exe Controls TControl.WMLButtonUp
0053ac48 heidisql.r3626.exe Controls TControl.WndProc
0053f510 heidisql.r3626.exe Controls TWinControl.WndProc
004d2778 heidisql.r3626.exe StdCtrls TButtonControl.WndProc
0053ebb0 heidisql.r3626.exe Controls TWinControl.MainWndProc
0049a5dc heidisql.r3626.exe Classes StdWndProc
76f07df5 USER32.dll DispatchMessageW
0056b311 heidisql.r3626.exe Forms TApplication.ProcessMessage
0056b356 heidisql.r3626.exe Forms TApplication.HandleMessage
00566b81 heidisql.r3626.exe Forms TCustomForm.ShowModal
006bf122 heidisql.r3626.exe Main 1708 +110 TMainForm.Startup
007a672e heidisql.r3626.exe heidisql 65 +14 initialization
77913675 kernel32.dll BaseThreadInitThunk

I renamed the reg-entry, and startet installer again, but the error still occours (except that the connection-list is now empty). What can I do to make HeidiSQL work again (and don´t lose my preferences) ? Haven´t tried to uninstall yet, shall I ?
ansgar posted 7 years ago
Your problem is that you either have
- the HeidiSQL executable in some directory but not in the one where you initially installed Heidi (by default c:\program files\HeidiSQL\)
- or the libmysql.dll you have besides the executable is out dated.

The callstack reveals this fact: TMySQLConnection.SetActive does nothing more than this:
FHandle := mysql_init(nil);

This is the first time your libmysql.dll is being used. No connection stuff here, just allocating a new handle.
ansgar posted 7 years ago
To fix that you should ensure
- you have the libmysql.dll from the latest installer
- and you have the executable and all builds in the same folder where you installed HeidiSQL.
Plasm posted 7 years ago
Path is: C:\Program Files (x86)\HeidiSQL - but after the update fails, there are some files missing.
These files remains:
libmysql.dll (don´t know which version - never updated it. thought that the updater would do that)

So, there is no heidisql.exe anymore.

If I now start the installer (heidisql.r3626.exe, on desktop), the installation routine doesn´t start (as I expected), but the connection-dialog appears.

So, how do I get the dll from the installer ?
I could download a (propably newer) version from libmysql.dll from another website - but if it is included in the installer, as you said, I prefer to use this one. But this won´t bring back my files (especially the heidisql.exe), will it ?
ansgar posted 7 years ago
heidisql.r3626.exe is not the installer, it's just a build of the main executable. You should download the latest release installer, which will update your libmysql.dll as well.
Plasm posted 7 years ago
Ah, OK. Got it. Thanks for the quick help.

So, the update only replaces the executable, but not the other files (like libmysql.dll) ?
Did the libmysql version change since release of the first 6.0 build ? Otherwise I should have had the newest version already before today´s update.

By the way: Do you know why I always have to update twice ? The first update downloads the file and "tries" to install (but then starts with older version). Second update doesn´t download (the file from previous update attempt is used) and then starts with newer version.
ansgar posted 7 years ago
> the update only replaces the executable

If you press "Download and install build xyz", just the executable is exchanged. No setup wizard here which also replaces other files. That's why I adviced to download the 6.0 installer.

About the successive updates: I guess you already got the new build after the first update. What makes you think you did not get it? The second download of the same file probably uses a cached file on your system.
Plasm posted 7 years ago
> What makes you think you did not get it?
The Version-Number in the HeidiSQL-title. And the "Download and install"-button at help->check for updates is enabled.

I guess, the first "Download and install build xyz" downloads the new file, but does no install.
The second "Download and install build xyz" sees, that the file is already there (downloaded by first update attempt) and installs (or: replaces) it.

So, it seems that downloading is OK and replacing the exe is OK - but both together (in one "session") doesn´t work (at least on my 3 PCs where I use HeidiSQL).
muzza4 posted 7 years ago
The update function worked perfectly well for me for the last year or so, but now no longer updates.

The application reports...Failed to create backup file "c:\users\myname\appdata\local\temp\heidisql.exe.backup.exe" from c:\program files\heidisql\heidisql.exe.

ansgar posted 7 years ago
Could you try to find out if that file exists and probably is corrupted, or if it is somehow not accessible due to missing privileges?

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