RainbowCookie32 / rusty-psn

A GUI/CLI tool for downloading PS3 and PS4 game updates
MIT License
320 stars 15 forks source link

egui: window moves out of the screen after multiple runs #221

Closed GladiousBR closed 1 month ago

GladiousBR commented 3 months ago

It opened on the first attempt, then every time I try to use it, the application supposedly loads, but Windows does not display the app window, only the icon on the taskbar. I tried an earlier version (3.7) and the problem persisted. I'm running as an administrator, I checked to make sure I didn't have any Windows Defender blocking, but nothing worked. rusty001

RainbowCookie32 commented 3 months ago

Sorry for the delay, I thought I'd replied already.

First up, no need to run rusty-psn as administrator. Just extract it somewhere it can create files and folders and it'll work fine.

Regarding your issue, I kinda doubt it's gonna be something I can easily fix especially since I can't reproduce. I'd suggest grabbing a fresh build from the latest release, extracting it in a new folder and trying again, upload a log if it doesn't work so I can at least see where it's getting stuck. My guess is it getting stuck somewhere on window creation or rendering setup, which would be out of my control

GladiousBR commented 3 months ago

I don't know how to get an error log, the application just open, its icon appears on taskbar, but the screen doesn't show up. The version I used is the same available right now (release 3.8), I tried the previous one and the same issue happened. I tried in different folders as well. The application open properly only once (my very first try) and never again. It didn't detect viruses or any firewall messages. "My guess is it getting stuck somewhere on window creation or rendering setup" - I think it's very likely

RainbowCookie32 commented 3 months ago

Might be worth a shot to delete rusty-psn's saved data. It's a folder called rusty-psn on your %appdata% folder. You can type that on windows' search and it should get you there, the full path would be something like C:\Users\YourUsername\AppData\Roaming.

Regarding the log, rusty-psn creates a log file every time you open it. It's saved to the directory where the .exe file is, like this:

image

GladiousBR commented 3 months ago

I found out what the problem was. First of all, cleaning the AppData folder was the solution to the problem (Thanks for that), however, I also found out the cause of the problem, which is more important and may be useful for you to know: the application cannot be closed using the "x" icon on the top right of the app window cause it will avoid the app to open properly later. You can only click on the icon in the upper left corner of the application window and then on "Close Alt+F4" or directly via the shortcut Alt+F4 or via the icon on the taskbar and then on "Close window" option. I just don't know if my computer has a specific condition that causes this problem or if it occurs on any Windows computer. But at least now you know that this can happen to other people and can tell them the solution. And just in case you still want, here is the only line from the log file: "INFO [rusty_psn] starting egui app" - I don't think it would help you. Best regards and thanks again!

RainbowCookie32 commented 3 months ago

Well that's cursed, glad to know it works for you now though. If I had to guess, it's probably some edge case being hit here somewhere. Could you zip the folder in appdata after closing the app with the X button and post it here? I'm curious to see if there's something obvious breaking.

GladiousBR commented 3 months ago

Dude, I think the problem could be something else. I noticed that every time I close the application and open it again, the window appears a little further south of my desktop. No matter how I close the application, it reopens further and further down until it is no longer visible on the desktop. Perhaps the window is opening correctly, but outside the desktop. If I type Alt+F4 anyway, even without viewing the application on the desktop, the Windows closes it correctly. This is strange because my desktop is sized correctly and this doesn't happen with any other applications. Even if I try to manually move a window out of the area, Windows won't allow it. No matter how many times I try to close and reopen, it doesn't appear at the top of the desktop again. It's not like it's cyclical. Once it disappears, I can only make it reappear by deleting the folder in AppData. And Alt+Enter doesn't fix the problem (maximizing the app window). Just to let you know that I tried that. Since Alt+Enter doesn't work with your application. I do not use Winzip as compresser, so I had to use an online and that's why there is a .rar file into the zip one. appdata.zip

RainbowCookie32 commented 3 months ago

outer_position_pixels:Some((x:5320.0,y:2632.0)) Yeah I think I see the issue here lol. It's going way off screen. Looking on egui's repo I see this issue https://github.com/emilk/egui/issues/4442, which might be what you are seeing here, or at least related to it. I'll keep this open until they release a new version with the fix, then I'll update to it and tag a new release. Thanks for the help investigating this!