Closed 793359277 closed 2 months ago
I think there might be something wrong with my system, but I'm not sure what caused it.
If I run with x64dbg debugging, the window position is magically preserved, but if I run directly I still get the error.
2.4mb GIF
The test found that if the left position of the window is less than 0 when closing, the window position and size can be saved normally, which is very strange.
I created a new system account and ran x64dbg with this account, but this problem did not occur. What is going on? I can't find the reason. Help me.
The window position is saved in x64dbg.ini
. Make sure the folder is writable, otherwise the settings will reset to the default.
When x64dbg crashes on exit the settings may not be saved. And system configuration have a role as well. I see inconsistent results when I connect two monitors with different DPI settings. Sometimes the window size saved is magnified by DPI scaling on next startup, but not always. Maybe something buggy with the system. Even the explorer doesn't always look correct with such monitor settings.
The window position is saved in
x64dbg.ini
. Make sure the folder is writable, otherwise the settings will reset to the default.
All the settings in x64dbg can be saved, such as events, engines, exception settings, etc., but the window position is a problem
When x64dbg crashes on exit the settings may not be saved. And system configuration have a role as well. I see inconsistent results when I connect two monitors with different DPI settings. Sometimes the window size saved is magnified by DPI scaling on next startup, but not always. Maybe something buggy with the system. Even the explorer doesn't always look correct with such monitor settings.
All the settings in x64dbg can be saved, such as events, engines, exception settings, etc., but the window position is a problem.
The window position is saved in
x64dbg.ini
. Make sure the folder is writable, otherwise the settings will reset to the default.
All the settings in x64dbg can be saved, such as events, engines, exception settings, etc., but the window position is a problem.
The window position is saved in
x64dbg.ini
. Make sure the folder is writable, otherwise the settings will reset to the default.
The snapshot_2022-09-07_14-52 mentioned above has no problem. I started the latest version, adjusted the window size and position, closed the software, and BridgeSettingFlush returned true. I manually copied the latest version of x64dbg.ini to the 2022-09-07 version directory, started the 2022-09-07 version of x64dbg.exe, and the window position and size were retained and reproduced. This shows that the memory configuration items have been successfully written to x64dbg.ini when exiting, and it should be a problem when starting the software.
This problem does exist, but others cannot reproduce it under normal circumstances. If possible, I hope to optimize the code for saving and reading the window position and size.
In order to use it normally, I had to write a plug-in to record the window position and size. When x64dbg exits, it is recorded with GetWindowRect, and when it starts, MoveWindow is used to adjust the window information, so this problem will not occur.
The code for saving the window information is rather simple:
Then the restore is called on startup:
Perhaps the change happens because restoreGeometry
is called in the constructor of MainWindow
?
For me this is working, but maybe there is some bug in Qt here? This forum post hints that it is broken: https://forum.qt.io/topic/76589/proper-way-to-restore-state-geometry-on-application-start
I pushed an attempted fix to the development
branch. A new snapshot should be released soon, please try it and let me know (make sure to remove your plugin first obviously).
Previously, there is a problem that x64dbg flashes briefly at the initial position before being moved to saved position and size, that's why it was changed.
Yes, but now we are doing both. I just re-added the code that gets executed on the first event in the event loop, so if the previous restore worked this will not change anything. I did not observe any flashing, but I was on a remote session so maybe it's different on your end?
I pushed an attempted fix to the
development
branch. A new snapshot should be released soon, please try it and let me know (make sure to remove your plugin first obviously).
snapshot_2024-09-10_15-35 I tested it and it worked fine. The window information was correctly restored at startup.
Good to hear it's resolved!
Operating System
Win10 x64 22H2 19045.2965
x64dbg Version
Aug 30 2024
Describe the issue
Main window position and size cannot be saved
As of today, the latest version still does this The virtual machine Win11 test is fine.
snapshot_2022-09-07_14-52, This version is ok. But I used a version of 2024 before, which was normal. I don't know when the above problem started to appear(Previously my system was Win10 2004).
Steps to reproduce
Attachments