Access violations

lemon_juice posted 2 years ago in General
Today I got this exception:

date/time         : 2013-10-04, 11:36:19, 796ms
computer name     : X-PC
user name         : X
registered owner  : X
operating system  : Windows 7 Service Pack 1 build 7601
system language   : Polish
system up time    : 3 hours 56 minutes
program up time   : 8 minutes 35 seconds
processors        : 2x AMD Athlon(tm) II X2 270 Processor
physical memory   : 1701/3071 MB (free/total)
free disk space   : (C:) 42,13 GB
display mode      : 1680x1050, 32 bit
process id        : $c0
allocated memory  : 78,19 MB
executable        : heidisql.exe
exec. date/time   : 2013-09-29 12:16
version           :
compiled with     : Delphi XE
madExcept version : 3.0m beta 1
callstack crc     : $ac1e82a7, $4c3e523d, $4c3e523d
exception number  : 1
exception class   : EAccessViolation
exception message : Access violation at address 0080511A in module 'heidisql.exe'. Read of address 00000000.
main thread ($4f4):
0080511a heidisql.exe Main         7244 +74 TMainForm.HostListGetText
006391f8 heidisql.exe VirtualTrees          TCustomVirtualStringTree.DoGetText
006383f0 heidisql.exe VirtualTrees          TCustomVirtualStringTree.GetText
00683aaf heidisql.exe helpers      1663  +7 GetVTSelection
0080a2a8 heidisql.exe Main         8953 +18 TMainForm.HostListBeforePaint
00624547 heidisql.exe VirtualTrees          TBaseVirtualTree.DoBeforePaint
00633321 heidisql.exe VirtualTrees          TBaseVirtualTree.PaintTree
0062b06b heidisql.exe VirtualTrees          TBaseVirtualTree.Paint
004f3ab3 heidisql.exe Controls              TCustomControl.PaintWindow
004ee20d heidisql.exe Controls              TWinControl.PaintHandler
004ee9ec heidisql.exe Controls              TWinControl.WMPaint
004f3a4d heidisql.exe Controls              TCustomControl.WMPaint
00621c8d heidisql.exe VirtualTrees          TBaseVirtualTree.WMPaint
004e9790 heidisql.exe Controls              TControl.WndProc
004ea0b6 heidisql.exe Controls              TControl.WMMouseMove
004e9790 heidisql.exe Controls              TControl.WndProc
004ee054 heidisql.exe Controls              TWinControl.WndProc
0062ddbc heidisql.exe VirtualTrees          TBaseVirtualTree.WndProc
004ed6f4 heidisql.exe Controls              TWinControl.MainWndProc
004abc88 heidisql.exe Classes               StdWndProc
77b2702b ntdll.dll                          KiUserCallbackDispatcher
7607ed5a kernel32.dll                       BaseThreadInitThunk

What I did was I first connected to server A, did a few things on the database, then closed the connection and connected to server B, executed some queries in the query tab and then when I pressed the "Host: ..." tab I got this error.

However, I don't this problem is related to the "Host" tab specifically, because for a long time I've been getting AV errors from time to time in various circumstances that seem random to me. However, what I noticed is that if there is some connection problem to the mysql server then the AV errors increase.

Yesterday, I had a problem on one mysql server - the web site went down because one table became locked indefinitely and a long queue of queries were waiting for the lock to be released and finally the server refused any more connections. I used Heidi and obviously I couldn't connect to this db so I connected to the server as admin to see the processes running. I was able to connect but every time I went to Processes tab I saw a long list of waiting queries but when I tried to do anything with them I got AV error and had to restart Heidi. Then every time I went to the Processes tab Heidi crashed and I had to start again. I wanted to kill the processes but I wasn't able to because of the AVs. Finally, I contacted my hosting provider and the admin killed the processes for me so I was fine. But this was a bit frustrating experience because Heidi crashed on me at the time when I had to act quickly and do something critically important. Possibly the long list of running processes was the cause of the crashes because normally Heidi doesn't crash on the process list (not every time at least).

Unfortunately, I don't have the bug reports because I didn't have time to save them. My suggestion would be to give a bit more priority to the stability of Heidi. While it is okay for me to experience an occasional crash now and then, I don't think I can live with not being able to manage db processes when I need to act fast. Heidi is wonderful with its interface but currently I don't think I can rely on it as much as I would like to for db administration. Please consider my request :)

ansgar posted 2 years ago
I'm quite with you, and I love to make Heidi more stable than it is sometimes. It just depends on how users report such crashes, and often the callstack or the reproduction recipe is missing.

I will check your above posted callstack and follow your reproduction recipe this evening.
lemon_juice posted 2 years ago
Ok, thanks. It would be great if AV error reports were logged somewhere automatically, then I would be able to send you those from yesterday. Unfortunately, windows event viewer doesn't have them.
ansgar posted 2 years ago
Keep in mind that the callstack alone does not help solving a bug. A precise reproduction recipe given by the user is at least as valuable.
ansgar posted 2 years ago
First step done in r4549

lemon_juice posted 2 years ago
Thanks, it's good you were able to do something about the error.

Wouldn't you consider adding auto-logging of AV errors? This would help a lot in situations when the user has no time to save logs. You know, when I'm on the phone with a person whose site is down for a few minutes and I'm trying to investigate the problem as soon as possible then saving error logs from Heidi is the last thing a want or can to do at the moment. If there was a log then I could send them to you later when I have time.
ansgar posted 2 years ago
Access violations cannot get auto-logged somewhere. I am glad they are caught by the madExcept handler, and users can post callstacks, but I want to fix each of them by examining reproduction recipes. If they were just logged I would not know how to reproduce them.
lemon_juice posted 2 years ago
I understand you need reproduction recipes and I didn't mean sending just callstacks to you without any explanations. I just think it would be useful to make the process of saving a callstack more hassle-free. For example, it would be very helpful to have another button next to the save button called "autosave callstack" or whatever. Then the callstack would be saved without any questions asked to a specified location (or even to the desktop, or My Documents) with a date and time in the filename.
ansgar posted 2 years ago
There is no auto-logging of the callstack, not doable with the madExcept exception handler.

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