HxD 2.0.0.0 - "Random" invalid handle error after searching or opening file

Bug reports concerning HxD.
Post Reply
GJoe
Posts: 9
Joined: 09 Sep 2016 22:10

HxD 2.0.0.0 - "Random" invalid handle error after searching or opening file

Post by GJoe » 16 Sep 2016 20:31

System Error 6. That the only message show up. No Detail Explanation.
Its not always happen, sometime. It randomly. Sometime after search some data, sometime after opening a file. Very random.

2 bug for now.
I'll post again if I find any.

---------------------------------
Using HxD x64 v2.0.0.0 (build date 12-Aug-2016) on windows 7 x64.

Maël
Site Admin
Posts: 1164
Joined: 12 Mar 2005 14:15

Re: HxD 2.0.0.0 - HxD Crash If File In Editing Is Delete

Post by Maël » 20 Sep 2016 22:54

Your second post describes a bug unrelated to the first, right? And is it really system error 6, or runtime error 6?

GJoe
Posts: 9
Joined: 09 Sep 2016 22:10

Re: HxD 2.0.0.0 - HxD Crash If File In Editing Is Delete

Post by GJoe » 23 Sep 2016 16:33

Your second post describes a bug unrelated to the first, right?
Yes.
And is it really system error 6, or runtime error 6?
System Error 6.
After several testing (or many time using it), that error happen after "On-Find-Something".
But it randomly. Sometime I got that error, sometime itsn't.
Sometime, that error has additional text, like "Can not find dll".
Sometime, that error happen after I close file opened by HxD.

I think thats all I can tell right now.

---------------------------------
Using HxD x64 v2.0.0.0 (build date 12-Aug-2016) on windows 7 x64.

GJoe
Posts: 9
Joined: 09 Sep 2016 22:10

Re: HxD 2.0.0.0 - HxD Crash If File In Editing Is Delete

Post by GJoe » 06 Oct 2016 15:55

HxD_Error-1.jpg
HxD_Error-1.jpg (30.18 KiB) Viewed 3610 times
Condition:
3 File In Viewing.
After Finding Something On 3 File, I close HxD.
That error pop up, after HxD Windows close.
Again, Its random. Sometime OK sometime its not.
---------------------------------
Using HxD x64 v2.0.0.0 (build date 12-Aug-2016) on windows 7 x64.

GJoe
Posts: 9
Joined: 09 Sep 2016 22:10

Re: HxD 2.0.0.0 - HxD Crash If File In Editing Is Delete

Post by GJoe » 27 Oct 2016 16:04

New build, means something had been patch by @Maël.
Testing. I let you now, @Maël, if there is something wrong with it.

---------------------------------
Using HxD x64 v2.0.0.0 (build date 25-Oct-2016) on windows 7 x64.

Maël
Site Admin
Posts: 1164
Joined: 12 Mar 2005 14:15

Re: HxD 2.0.0.0 - HxD Crash If File In Editing Is Delete

Post by Maël » 27 Oct 2016 16:54

Thanks. I haven't fixed this bug, though. So if it is gone, that would be weird.

GJoe
Posts: 9
Joined: 09 Sep 2016 22:10

Re: HxD 2.0.0.0 - HxD Crash If File In Editing Is Delete

Post by GJoe » 30 Oct 2016 00:19

Oh, I though with new build date, something has been fix.
Fix or not, I'm using this new build for daily usage.
BTW, may I know why you decide to compile it again?

You're using pascal/lazarus right?
What do you think about this manifest on HxD...

Code: Select all

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" manifestVersion="1.0">
  <assemblyIdentity name="HxD.exe" type="win32" version="5.2.0.0" processorArchitecture="amd64"/>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity name="Microsoft.Windows.Common-Controls" type="win32" version="6.0.0.0" language="*" processorArchitecture="amd64" publicKeyToken="6595b64144ccf1df"/>
    </dependentAssembly>
  </dependency>
  <file name="kernel32.dll" loadFrom="%SystemRoot%\System32\kernel32.dll"/>
  <file name="psapi.dll" loadFrom="%SystemRoot%\System32\psapi.dll"/>
  <file name="version.dll" loadFrom="%SystemRoot%\System32\version.dll"/>
  <file name="msvcrt.dll" loadFrom="%SystemRoot%\System32\msvcrt.dll"/>
  <file name="gdi32.dll" loadFrom="%SystemRoot%\System32\gdi32.dll"/>
  <file name="msimg32.dll" loadFrom="%SystemRoot%\System32\msimg32.dll"/>
  <file name="user32.dll" loadFrom="%SystemRoot%\System32\user32.dll"/>
  <file name="advapi32.dll" loadFrom="%SystemRoot%\System32\advapi32.dll"/>
  <file name="riched20.dll" loadFrom="%SystemRoot%\System32\riched20.dll"/>
  <file name="imm32.dll" loadFrom="%SystemRoot%\System32\imm32.dll"/>
  <file name="dwmapi.dll" loadFrom="%SystemRoot%\System32\dwmapi.dll"/>
  <file name="ole32.dll" loadFrom="%SystemRoot%\System32\ole32.dll"/>
  <file name="oleaut32.dll" loadFrom="%SystemRoot%\System32\oleaut32.dll"/>
  <file name="oleacc.dll" loadFrom="%SystemRoot%\System32\oleacc.dll"/>
  <file name="windowscodecs.dll" loadFrom="%SystemRoot%\System32\windowscodecs.dll"/>
  <file name="winmm.dll" loadFrom="%SystemRoot%\System32\winmm.dll"/>
  <file name="uxtheme.dll" loadFrom="%SystemRoot%\System32\uxtheme.dll"/>
  <file name="wtsapi32.dll" loadFrom="%SystemRoot%\System32\wtsapi32.dll"/>
  <file name="shlwapi.dll" loadFrom="%SystemRoot%\System32\shlwapi.dll"/>
  <file name="shell32.dll" loadFrom="%SystemRoot%\System32\shell32.dll"/>
  <file name="wininet.dll" loadFrom="%SystemRoot%\System32\wininet.dll"/>
  <file name="comdlg32.dll" loadFrom="%SystemRoot%\System32\comdlg32.dll"/>
  <file name="winspool.drv" loadFrom="%SystemRoot%\System32\winspool.drv"/>
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level="highestAvailable" uiAccess="false"/>
      </requestedPrivileges>
    </security>
  </trustInfo>
  <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
    <application>
      <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
      <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
      <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
      <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
      <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
    </application>
  </compatibility>
</assembly>
---------------------------------
Using HxD x64 v2.0.0.0 (build date 25-Oct-2016) on windows 7 x64.

Maël
Site Admin
Posts: 1164
Joined: 12 Mar 2005 14:15

Re: HxD 2.0.0.0 - HxD Crash If File In Editing Is Delete

Post by Maël » 30 Oct 2016 01:18

The new build adds a small change, that allows hex numbers (such as in the goto dialog) to contain spaces (when they are pasted from the clipboard).

I use Delphi for HxD.
What's wrong with the current manifest?

GJoe
Posts: 9
Joined: 09 Sep 2016 22:10

Re: HxD 2.0.0.0 - HxD Crash If File In Editing Is Delete

Post by GJoe » 30 Oct 2016 14:25

What's wrong with the current manifest?
<file name="kernel32.dll" loadFrom="%SystemRoot%\System32\kernel32.dll"/>
-> To avoid DLL redirection. For example If I put "msimg32.dll" in HxD directory, HxD will load "msimg32.dll" from "HxD directory" instead from "%SystemRoot%\System32". But if I put those manifest code into HxD, "msimg32.dll" will always load from "%SystemRoot%\System32".

For 64-bit build, maybe Its minimum running OS is Windows Vista. Since its vista maybe using this user right manifest -> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">.
For 32-bit build, Minimum OS is Windows XP SP3. Since its XP maybe with this user right manifest -> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">.
What do you think?

Its just an idea, you know.

---------------------------------
Using HxD x64 v2.0.0.0 (build date 25-Oct-2016) on windows 7 x64.

Maël
Site Admin
Posts: 1164
Joined: 12 Mar 2005 14:15

Re: HxD 2.0.0.0 - "Random" invalid handle error after searching or opening file

Post by Maël » 02 Dec 2016 16:15

I split off your first post into a separate topic, so the discussion stays clear. The first bug report/post is the same as the one in the following link and was merged: viewtopic.php?f=3&t=853

Regarding this random invalid handle error, it is likely related to accessing a window that is already destroyed, maybe a race condition. I cannot reproduce it yet, it's probably dependent on the order of operations, and usage of mouse vs. keyboard.

So if you can find exact steps (and their order) to reproduce that would be helpful.

Post Reply