ImHex icon indicating copy to clipboard operation
ImHex copied to clipboard

[Bug] Window becomes completely unresponsive after resizing

Open cyaneko opened this issue 1 year ago • 14 comments

Operating System

Windows

What's the issue you encountered?

Resizing the window through any means stretches the client view and makes the editor completely unresponsive, requiring a restart.

https://github.com/user-attachments/assets/12635cf1-f609-41d9-b4b6-cb56e5d34935

How can the issue be reproduced?

  1. Open ImHex on Windows
  2. Drag the resize handle or snap the window into a specific size+position using FancyZones, Sizer etc.
  3. Note that the editor is both stretched and completely unresponsive, requiring a restart.

ImHex Version

1.35.4, 1.36.0 WIP

ImHex Build Type

  • [ ] Nightly or built from sources

Installation type

MSI

Additional context?

  • There is a similar issue here, however my AMD drivers are already up to date
  • Windows 10 22H2 19045.4717
  • Radeon RX 7900 XTX (Adrenalin 24.7.1)
  • The monitor is AOC AGON AG493UCX (5120x1440), no scaling is used for either Windows or ImHex

cyaneko avatar Aug 09 '24 13:08 cyaneko

i am also on win10 with nvidia card and using ImHex 1.36.0 wip built on jul16 and I am unable to reproduce. I tried resizing many times,making the resize window very small or large, added windows decorations and ImHex remains responsive and in working order. Does any resizing triggers the hanging? Does the ImHex process become very active or consume lots of ram when it hangs? Is there anything in the logs that can identify the cause of freezing?

paxcut avatar Aug 09 '24 14:08 paxcut

i am also on win10 with nvidia card and using ImHex 1.36.0 wip built on jul16 and I am unable to reproduce. I tried resizing many times,making the resize window very small or large, added windows decorations and ImHex remains responsive and in working order. Does any resizing triggers the hanging? Does the ImHex process become very active or consume lots of ram when it hangs? Is there anything in the logs that can identify the cause of freezing?

Any resizing triggers this bug - both by dragging and by forcing one using FancyZones snap or through Sizer.

There are no changes to resource usage after resizing. The app isn't listed as "hanging" in Task Manager, either.

If by "logs" you mean "Log Console", then I cannot open it - the editor does not react to my clicks after all.

cyaneko avatar Aug 09 '24 14:08 cyaneko

i meant logs as in logs saved to %LOCALAPPDATA%\imhex\logs

paxcut avatar Aug 09 '24 14:08 paxcut

Doesn't look like it.

20240809_165740.log

Enabling DEBUG logging (-v flag) doesn't seem to indicate it either.

20240809_165954.log

cyaneko avatar Aug 09 '24 15:08 cyaneko

in both logs imhex is getting a signal to exit [17:00:35] [INFO] [main | Main] Exit task 'Prepare exit' finished successfully thats very odd. why is imhex trying to exit?

paxcut avatar Aug 09 '24 15:08 paxcut

in both logs imhex is getting a signal to exit [17:00:35] [INFO] [main | Main] Exit task 'Prepare exit' finished successfully thats very odd. why is imhex trying to exit?

I can still click [X] to close the editor if nothing was edited (and did so).

cyaneko avatar Aug 09 '24 15:08 cyaneko

that means is not unresponsive but also not accepting input from mouse or keyboard on any of the windows except the decoration

paxcut avatar Aug 09 '24 15:08 paxcut

that means is not unresponsive but also not accepting input from mouse or keyboard on any of the windows except the decoration

Not sure I understand, how are there multiple windows here? Anywhere I click within the editor does not update the view, or anything really, it remains frozen until restart. How is that different from being unresponsive?

cyaneko avatar Aug 09 '24 15:08 cyaneko

obraz For the record, I am clicking this [X] here

cyaneko avatar Aug 09 '24 15:08 cyaneko

it is responding to the exit imhex command so imhex is not hanging which is what unresponsive means in most cases. Clicking on the x is sending the exit signal which the logs show as accepting and unloading everything and I am guessing it actually exits gracefully.

paxcut avatar Aug 09 '24 15:08 paxcut

i am also on win10 with nvidia card and using ImHex 1.36.0 wip built on jul16 and I am unable to reproduce. I tried resizing many times,making the resize window very small or large, added windows decorations and ImHex remains responsive and in working order. Does any resizing triggers the hanging? Does the ImHex process become very active or consume lots of ram when it hangs? Is there anything in the logs that can identify the cause of freezing?

Just tested on 1.36.0 WIP and the problem persists.

cyaneko avatar Aug 10 '24 14:08 cyaneko

it looks like the no gpu version also works if you have a gpu. it could be used test if problem is gpu specific. Also try starting imhex from a command prompt (use imhex_gui) to obtain direct access to log.

paxcut avatar Aug 10 '24 14:08 paxcut

Came here to report this exact issue. Whatever is going on, it looks like the issue started in version 1.35.4, because 1.35.3 does not have this problem, after downgrading to that version

On Windows 11 Pro 24H2 and AMD GPU with up to date drivers

seabassapologist avatar Nov 29 '24 20:11 seabassapologist

Same problem, 1.35.4 with AMD GPU on Windows 11

iAndyHD3 avatar Dec 21 '24 16:12 iAndyHD3

Latest commit should "fix" this issue. Thanks to @iAndyHD3 who noticed that the issue gets caused by the Layered rendering flag.

Removing this flag sadly causes flickering while resizing so it's not really a perfect solution. That's why I just disable that flag specifically on AMD GPUs now but not on other GPUs. I have opened a support ticket with AMD so maybe we'll find a better solution for this in the future.

If possible, please try out the latest nightly build and see if it's fixed

WerWolv avatar Jan 01 '25 19:01 WerWolv

Hi, can confirm the freezing isn't happening to me on the latest nightly!

When resizing I don't see "flickering" really, it's more that some the text jitters. Completely tolerable, but doesn't show up when I try to do a screen capture (suspecting because my monitor is running at 160hz vs the 60fps capture)

Either way, thank you for looking into this

seabassapologist avatar Jan 01 '25 20:01 seabassapologist

I can also confirm this is fixed on the latest nightly (1c30533d199d70de18c225c01e302f75f2468aa2). Awesome work!

weskoerber avatar Jan 04 '25 01:01 weskoerber

Could one of you that had the issue send me a dxdiag (.txt) & msinfo32 (.NFO) reports from their machines? The AMD support person I'm talking to is asking for them

WerWolv avatar Jan 12 '25 08:01 WerWolv

@WerWolv sent you an email with those two files!

seabassapologist avatar Jan 12 '25 13:01 seabassapologist

@seabassapologist Thank you very much! :)

WerWolv avatar Jan 12 '25 13:01 WerWolv