Page 2 of 3

Re: System Error: The handle is invalid

Posted: 01 Oct 2018 21:10
by Maël
It's actually recent, it just assumes you have an email client configured. There should also be a log file generated in the folder containing the executable.
But thanks.

Re: System Error: The handle is invalid

Posted: 01 Oct 2018 21:16
by plutomaniac
Yes I did install the stock Windows 10 Mail app which works with :mailto but alas it wasn't detecting it. Ah I didn't know it creates a log file as well. It turns out it can be found at %temp%/HxD64.madExcept/bugreport.txt so I have attached it.

Re: System Error: The handle is invalid

Posted: 01 Oct 2018 23:26
by Maël
It's now clear why it happens, and also explains why you see it and I don't.
It's a race condition. It is related to how quickly you start it after one another and other things as the amount of processors or how busy the system is etc., all of which affect delays and thread switching frequency.
I have seen it now as well, but very seldom. I wish there was an easy way to make it appear consistently or frequently at least.

I changed the logic of releasing threading primitives. Can you test if it works on your system (both 32 and 64 bit)? Same link as above. If not a bug report would help.

Re: System Error: The handle is invalid

Posted: 01 Oct 2018 23:58
by plutomaniac
It's good that at least you now know what causes it. I tested the new version (thank you for adding a save report) and managed to reproduce it within seconds at both x86 and x64. Both reports attached. I just open two files and switch rapidly between them 10 times or so followed by a window X close. This is just to reproduce it of course. I don't normally use HxD like that but it does happen often randomly with normal use too. If you want to see it, I suggest you try to debug v2.0 which would show it much much more often than 2.1, at least that was the case for me.

Re: System Error: The handle is invalid

Posted: 02 Oct 2018 00:03
by Maël
Yeah, I know the instructions. But race conditions are notoriously hard to reproduce, it's in their nature that they behave quite differently depending on the environment. Also there is nothing in 2.0 vs 2.1 that was changed that is related to this.

The amount/frequency of switching tabs is not related, it's just about how you open HxD (delays between opening it) and close it (given the error log).

Is "C:\Users\Plato\Desktop\11.8.50.3399_CON_H_D0_PRD_RGN.bin" the first or second file in the list you open?

Re: System Error: The handle is invalid

Posted: 02 Oct 2018 00:11
by plutomaniac
Yes you are right, just reproduced it by simply opening the two files and closing the program multiple consecutive times. The file you mentioned is the first.

Re: System Error: The handle is invalid

Posted: 02 Oct 2018 23:06
by Maël
I changed the logic internally so it is more robust against possible race conditions. It should also affect this bug.
Same download link as above.

Does it fix the bug for you?

Re: System Error: The handle is invalid

Posted: 03 Oct 2018 00:34
by plutomaniac
I was unable to reproduce with the latest test build so yes, it (probably) fixes the issue for me. I would have to test it on my daily schedule for some time to be certain but for now it seems to work.

Re: System Error: The handle is invalid

Posted: 03 Oct 2018 01:02
by Maël
Great. I made a prerelease package with all the currently available translations. Thanks for your help and let me know how things go so I can close this topic once we are confident it is fixed.

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

Re: System Error: The handle is invalid

Posted: 03 Oct 2018 01:59
by plutomaniac
Yes sure. I installed the pre-release version normally and will work with that for the next few days to verify. I noticed that the minimize issue is still there but maybe that hasn't been addressed yet.

Re: System Error: The handle is invalid

Posted: 03 Oct 2018 16:43
by Maël
Yeah, it's easier to handle when different bugs have each their own thread.
Fixed the minimize issue now as well, and updated the linked file.

Re: System Error: The handle is invalid

Posted: 03 Oct 2018 17:06
by plutomaniac
Indeed, initially I thought these two could be linked. I installed the latest build, minimize issue fixed and will continue to verify the lack of race conditions.

Re: System Error: The handle is invalid

Posted: 04 Oct 2018 15:44
by plutomaniac
No race condition but I was able to find two other issues:

1) HxD 2.1 Test Version: HxD does not remember the window size when opening more than 1 file at a time. Also, the sidebars have wrong proportions and appear even at small (i.e. 1 byte) files.

2) HxD 2.x or later: If you leave enabled the option to launch HxD at the last step of the setup/installation, any option changes will result in an error that no access is allowed. The 2nd time HxD is launched (manually), the options can be configured normally.

Re: System Error: The handle is invalid

Posted: 04 Oct 2018 21:00
by Maël
Can you post separate topics for each please? All mixed in this thread is becoming messy.

Re: System Error: The handle is invalid

Posted: 04 Oct 2018 21:31
by plutomaniac
No problem, opened a new thread for the second issue. The first issue happens only at the pre-release version currently testing. If you want another topic for that, I will create one.