Freeze on Startup Workaround
Repetier-Host freezes on starting the application, seemingly randomly. The splash screen shows, most of the application appears to load, except the 3D View, and the splash screen never goes away. I am currently running version 2.1.6.
TLDR: If using multiple monitors, try deleting registry entry "HKCU/Software/repetier/window/mainWindow", and don't close the application while on any other monitor than the one it originally started up on.
After battling this issue for months now, always resorting to deleting the Repetier registry entries and restarting the application, I am confident I finally found what is causing it to freeze on startup. I have 3 monitors, and moving the window over to another monitor, closing the application, then reopening it will result in it freezing. I discovered that deleting just the registry setting "HKCU/Software/repetier/window/mainWindow" or setting it's value value to "234|234|1034|569|Maximized" fixes it and I can continue using it as before. The value is saved back to the registry the next time the application is closed. This also saves you from losing any printer or slicer settings by deleting the entire Repetier section in the registry.
If it helps to track this bug down, the value when it fails to start is "-1480|335|1034|569|Maximized".
Hope this helps anyone with the same issue I have, and sorry if this workaround has already been posted, but the only search results I could find were the original workaround I mentioned above (and just now after a quick double check, also deleting the "window" section of the registry, but at least this narrows it down to a specific value).
Comments
We have tried several times to reproduce this bug, but on our system it worked. Not sure if we also tested maximized. Our only multi monitor system runs Windows 10. What version do you run?
If it is only the maximized flag I could forbid saving position in maximized state. Or restoring from maximized will be done as 2 step process. First normal and then switch to maximized. I think at the moment all attributes are changed at once. Maybe that confuses windows.
Curious, do you have a 2 monitor system you tested on? Maybe 3 is the trick. Just throwing out ideas.
Not sure if 3 monitors is the problem or speed. Maybe if a timing is not good enough it freezes instead of executing. Who knows. After all, all we do is setting the coordinates in the window form. The rest is windows internal.
Do you see anything when it freezes? Or is that an assumtion and window is just not visible on screen?
Are there any logs I could get to that may help with tracking this down? Event Viewer doesnt have anything that I can see besides the typical Windows logs when I end the task in Task Manager.
Maybe something with OpenGL initializing? The viewport never renders, so that's why that comes to mind.
Here it is in the state when it freezes, unfortunately you don't see the splash screen in this screenshot, but it is on my main display and always in front. And if it freezes while not maximized it behaves the same, just not maximized.
If it helps, I am running an Intel Core i7-6700K, 16GB ram, and a GeForce GTX 970, I can get more detailed specs later if desired.
I also realized that I am running 2 monitors at 1920x1080 and one at 1920x1200, I tried disconnecting the 1920x1200 thinking maybe the 1 off resolution was the issue, but it wasn't, it would still freeze.
I believe I read the application is written in .net, and being a software engineer that works primarily with C# and .net, I would love to say send me the solution and let me debug it, but I get it. Are there any logs outputted anywhere or can I somehow enable them? Or I wouldn't even mind getting you a snapshot of the application when it is in it's broken state if there is a way of doing it.
I could attach the debugger, however I can't attach it fast enough, and the window already freezes, it doesn't appear to kill the main thread, so it seems like it just continues running in this "failed" state. I'm not completely familiar with attaching the debugger to an assembly I don't also have a symbols file for, so I am not sure how much insight I can actually get from it. It feels like the exception already occurred, and by the time I got the debugger attached it is no longer visible to VS. Unless there is a quicker way to attach the debugger that I am unaware of I don't think I will be able to get any information this way.
Not sure if this is helpful or not, but this is what I get when it successfully loads in the logs in Repetier-Host. However I don't see anything visible when it does not load successfully.
However I found the cause / fix. In the registry HKEY_CURRENT_USER\SOFTWARE\Repetier I've changed autoconnectAtStartup to 0 (was 1 previously), and the program started as normal. I then tried to connect to the printer and it froze again. I then restarted the program and changed the printer port from Auto to the actual port my printer's on, and now everything works fine, I can connect. So apparently the port autodetection feature is not capable of properly detecting and is freezing the program.
Anyone still experiencing this issue for which this fix works please leave a word.