Xpendable Posted January 17, 2020 Share Posted January 17, 2020 I wanted to report this issue: If the computer running BigBox is rebooted (for example, by a scheduled Windows Task) without BigBox being shutdown first, BigBox will remember the wrong platform it was on when it is started (I have BigBox set to auto-start). Recreate steps: 1. Launch BigBox. Select any Platform (such as Arcade). 2. Close BigBox. (BigBox appears to save this as the currently selected platform). 3. Launch BigBox. Select a different platform from step 1 (I'll use AAE in this example). 4. Reboot Operating System (without shutting down BigBox). 5. Launch BigBox. BigBox will show Arcade as the currently selected platform. It would be nice if showed AAE. Workaround: Select the platform you intend to show on reboot, then exit BigBox normally (without reboot), then restart BigBox. The next time the OS is rebooted, it should show that platform. What I would like to happen: Whenever a platform is selected by a user, BigBox should update the config so that this platform is shown on restarts, rather than saving it only on BigBox user-selected exit. Quote Link to comment Share on other sites More sharing options...
Retro808 Posted January 17, 2020 Share Posted January 17, 2020 A couple things could be at issue. 1. If BigBox is not closed properly it cannot save data to the required xml when it closes so if you change a setting and it cannot save it right then this could cause and issue. So if the OS app shutdown does not allow BB time then you get your reported outcome. 2. How do you have either of the two options shown highlighted in the pics? Quote Link to comment Share on other sites More sharing options...
Xpendable Posted January 17, 2020 Author Share Posted January 17, 2020 With regards #1, that is why I wrote the issue. It is clear that BigBox is not able to save the current platform when the OS is rebooting. It's clear that it does do this if I manually exit BigBox. The OS generates a app-close event to all applications when a shutdown or reboot is executed. All .NET programs are designed to handle this event by default, and the programmer can put code in several different event handlers that get triggered as a result of the app being closed. If one of those event handlers takes too long, it could cause the OS to think the program is hung (not responding), and on a scheduled reboot, I believe the OS will forcefully kill the app. Maybe if Big Box is taking too long to execute the code to handle the app exit, it's being killed before it gets a chance to flush the changes to the XML file. This could be solved maybe in a couple of different ways: 1. The app could save the Last Platform as soon as a platform selection change occurs, thus ensuring that this is persisted to the XML config immediately 2. Maybe there's a way to give BigBox more time to complete it's exit events before the OS forcefully kills everything? I have to research this, I don't know if that's something that can be adjusted. With regards to #2, yes, I have Remember Last Platform checked, which is what I want. I want it to remember the last platform it was in. Instead it's always showing the last platform for when BigBox was manually exited. I could go through 20 different platforms, but on reboot it will ignore all that and go to whatever the platform was when I manually exited BigBox through BigBox's Exit menu option. Quote Link to comment Share on other sites More sharing options...
Xpendable Posted January 17, 2020 Author Share Posted January 17, 2020 I just checked my scheduled daily reboot task and I am calling "shutdown.exe /r /f". The /f = force which I believe will keep the .NET app from properly completing the exit events. I just did a test with removing the "/f" option. I'm positive I left BigBox in the Nintento NES platform, and I had previously exited BigBox using the Exit option built-in to BigBox while on the Arcade/Mame before reloading BigBox and navigating into the NES platform. Upon reboot, it still came up into Mame and ignored the fact that I had previously been in NES. So... something is still not working right here. Perhaps the XML is not being triggered to save when the app is shutdown in this manner? Note that it works fine if you use the built-in Exit function, but if the operating system tells the app shutdown, it doesn't appear to be saving. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.