Fixed: System Error: The handle is invalid

Bug reports concerning HxD.
plutomaniac
Posts: 26
Joined: 30 Aug 2018 21:24

Fixed: System Error: The handle is invalid

Post by plutomaniac »

Hello,

At HxD 2.0 I keep getting the System Error "The handle is invalid".

Capture.PNG
Capture.PNG (2.44 KiB) Viewed 29606 times

You can reproduce like so:

1) Open two files via the context menu (Open with HxD)
2) Switch from the 2nd file tab to the 1st
3) Switch from the 1st file tab to the 2nd
4) Try to close HxD from the X

You may need to switch between the tabs 2-3 more times in case it doesn't happen the first time.

I've also noticed that, when you "Open with HxD", the HxD window does not appear at the top like it should but stays minimized.
Maël
Site Admin
Posts: 1455
Joined: 12 Mar 2005 14:15

Re: System Error: The handle is invalid

Post by Maël »

Does it still happen with the newest release?
plutomaniac
Posts: 26
Joined: 30 Aug 2018 21:24

Re: System Error: The handle is invalid

Post by plutomaniac »

Hi,

Just tested v2.1 and yes both issues are still happening (error when switching tabs and exiting + minimize not maximizing when opening new file).
Maël
Site Admin
Posts: 1455
Joined: 12 Mar 2005 14:15

Re: System Error: The handle is invalid

Post by Maël »

Apparently, there is a detail that I do differently, since I can't reproduce it. Could you make a short video?
plutomaniac
Posts: 26
Joined: 30 Aug 2018 21:24

Re: System Error: The handle is invalid

Post by plutomaniac »

It seems to be more difficult to reproduce the invalid handle error at 2.1 but it is still there. The minimize issue remains the same. Here are two small videos which showcase the problems:

issues.rar:
https://mega.nz/#!bQNHySCL!lZm2XML6Sqac ... rbe4ZLQYfk
Maël
Site Admin
Posts: 1455
Joined: 12 Mar 2005 14:15

Re: System Error: The handle is invalid

Post by Maël »

Thanks, the minimize bug can be reproduced.

However I still don't manage to reproduce the invalid handle bug. I tried it on Win10 as well, 64 bit HxD.

If you have a virgin virtual machine, with no additional programs installed, does it happen as well?
plutomaniac
Posts: 26
Joined: 30 Aug 2018 21:24

Re: System Error: The handle is invalid

Post by plutomaniac »

Just tested on a 100% new & clean Windows 10 TH3 x64 installation which I had lying around. Same problem. I think it has to do with the window being maximized. Did you try to reproduce like that?
Maël
Site Admin
Posts: 1455
Joined: 12 Mar 2005 14:15

Re: System Error: The handle is invalid

Post by Maël »

I did. Maybe I'll just make a debug build with logging, to know what triggers it.
plutomaniac
Posts: 26
Joined: 30 Aug 2018 21:24

Re: System Error: The handle is invalid

Post by plutomaniac »

Yes that might help and I can try it if you like. I use HxD all the time so that error is enough to make me go back to v1.7.7 if I must to.
Maël
Site Admin
Posts: 1455
Joined: 12 Mar 2005 14:15

Re: System Error: The handle is invalid

Post by Maël »

Does it also happen if you close HxD using Alt+F4?

I wonder if this is maybe due to the menus or tooltip being highlighted/shown just before you click the X button to close the window, so precise timing/sequence of events matter.

I'll post a version with embedding logging later today.
plutomaniac
Posts: 26
Joined: 30 Aug 2018 21:24

Re: System Error: The handle is invalid

Post by plutomaniac »

Yes I tested with Alt+F4 and it happens in that case as well, even if it is harder to reproduce at 2.1. At 2.0 it happened consistently. Honestly, I don't time anything precisely, it happens when working randomly too. Meaning, you would have certainly already stumbled across this issue if it was happening on your end as well. Since you tested Windows 10 x64, the only common thing I can think of between my current OS installation and the clean VM one is the 2nd keyboard language, literally nothing else. I doubt that is relevant, the logging will tell though.
Maël
Site Admin
Posts: 1455
Joined: 12 Mar 2005 14:15

Re: System Error: The handle is invalid

Post by Maël »

I made a version of HxD that creates a log when an error occurs. Once I know the location where it happens, I'll add additional logging there, if needed.

https://mh-nexus.de/downloads/logginghxd.zip

The executables are the portable edition and can be run as is (settings will be created in the folder you extract it to). The language is German, since that is what I develop the original version with, but it shouldn't make a difference for this test.
Just make sure to remove the current HxD on your system from the Explorer context menu, and add the one from the ZIP file.

The created log(s) will be saved on your Desktop in a folder called HxDLog. Please send them to me. Thanks.
plutomaniac
Posts: 26
Joined: 30 Aug 2018 21:24

Re: System Error: The handle is invalid

Post by plutomaniac »

It seems that the log does not help as it only shows that the program started. From what I can tell, that error is on the Windows side (maybe some bad call or some compile setting or compiler version etc). I run a simple debugger while HxD was running, caused the crash and got the attached report. The last line shows the exception (hopefully). Maybe that can help.
Attachments
report.zip
(14.99 KiB) Downloaded 991 times
Maël
Site Admin
Posts: 1455
Joined: 12 Mar 2005 14:15

Re: System Error: The handle is invalid

Post by Maël »

It seems the exception happens in another thread. This new logger should catch them all now.

The new "Button1" is to test if errors are caught and a bug report is created (a window will pop up) at all. To create the real report, you still have to trigger the bug as normal and send the report that comes up then.

Updated file, same link as above.
plutomaniac
Posts: 26
Joined: 30 Aug 2018 21:24

Re: System Error: The handle is invalid

Post by plutomaniac »

Ok the new logger is much better. I reproduced it right away and generated a report. That logger is very old and wants to send it by email only for some reason and that functionality doesn't even work anymore so I had to take some pictures.

https://mega.nz/#!uQcCga7D!vZNKi8pdEcTM ... S8byZufLnc
Post Reply