Jump to content
LaunchBox Community Forums

Crashing on game exits: Bigbox 9.8


Recommended Posts

4 minutes ago, MazJohn [Mr Arcade] said:

Jason,

OK, so when i changed the default script in retroarch to "sleep 50" and re-started big-box, I can now no longer exit a game using the defined "hold button" and "close active window" using my Xbox one controller....

I assume this is to be expected behavior since the default script is no longer running......  ?

I then reset to use the default retroarch script again, and within 3 game exits, it crashed again on the third try. This time it didnt even come back with an error dump at all... it just competely exited Launchbox xompletely and I am returned immediately to the windows desktop. (running 9.8 official)

Thank you....

Okay, thanks for that testing. What happens if you use Escape to exit Retroarch instead of controller automation?

Link to comment
Share on other sites

18 minutes ago, Jason Carr said:

Okay, thanks for that testing. What happens if you use Escape to exit Retroarch instead of controller automation?

Interestingly, with default script, using the escape key to exit games from retroarch did not result in a crash in about 20 tries on exit....  I then i started exiting games again using the Xbox one controller, using the assigned "hold button" and "close active window" (shoulder buttons 5&6).... got 2 crashes straight to desktop again out of about 20 tries. No error dump provided, just sent directly back to the windows 10 desktop....

Hopefully this might help in some way to narrow it down....

If you still need more extensive testing to pinpoint root cause , let me know- i could continue over a longer time period to collect results. 

thanks...

Link to comment
Share on other sites

1 minute ago, MazJohn [Mr Arcade] said:

Interestingly, with default script, using the escape key to exit games from retroarch did not result in a crash in about 20 tries on exit....  I then i started exiting games again using the Xbox one controller, using the assigned "hold button" and "close active window" (shoulder buttons 5&6).... got 2 crashes straight to desktop again out of about 20 tries. No error dump provided, just sent directly back to the windows 10 desktop....

Hopefully this might help in some way to narrow it down....

If you still need more extensive testing to pinpoint root cause , let me know- i could continue over a longer time period to collect results. 

thanks...

It sounds like the issue is somehow caused by the AutoHotkey script then, which is what I figured. The default AutoHotkey script is this:

            
            SetTitleMatchMode, 2

            If WinActive(""DOSBox"")
            {
                Send {Ctrl down}
                Sleep 50
                Send {F9 down}
                Sleep 50
                Send {F9 up}
                Sleep 50
                Send {Ctrl up}
                Exit
            }

            If WinActive(""Project64"")
            {
                Process, Close, Project64.exe
                Exit
            }

            If WinActive(""redream"")
            {
                Send {Alt down}
                Sleep 50
                Send {F4 down}
                Sleep 50
                Send {F4 up}
                Sleep 50
                Send {Alt up}
                Exit
            }

            Send {Escape down}
            Sleep 50
            Send {Escape up}

            Sleep 500

            If WinActive(""LaunchBox"")
            {
                Exit
            }

            If WinActive(""Fusion"")
            {
                Exit
            }

            Send {Alt down}
            Sleep 50
            Send {F4 down}
            Sleep 50
            Send {F4 up}
            Sleep 50
            Send {Alt up}
            Exit
            

It seems like something in that script is causing the issue. Try replacing the Retroarch AutoHotkey script with the below:

Send {Escape down}
Sleep 50
Send {Escape up}

 

Link to comment
Share on other sites

43 minutes ago, Jason Carr said:

It sounds like the issue is somehow caused by the AutoHotkey script then, which is what I figured. The default AutoHotkey script is this:


            
            SetTitleMatchMode, 2

            If WinActive(""DOSBox"")
            {
                Send {Ctrl down}
                Sleep 50
                Send {F9 down}
                Sleep 50
                Send {F9 up}
                Sleep 50
                Send {Ctrl up}
                Exit
            }

            If WinActive(""Project64"")
            {
                Process, Close, Project64.exe
                Exit
            }

            If WinActive(""redream"")
            {
                Send {Alt down}
                Sleep 50
                Send {F4 down}
                Sleep 50
                Send {F4 up}
                Sleep 50
                Send {Alt up}
                Exit
            }

            Send {Escape down}
            Sleep 50
            Send {Escape up}

            Sleep 500

            If WinActive(""LaunchBox"")
            {
                Exit
            }

            If WinActive(""Fusion"")
            {
                Exit
            }

            Send {Alt down}
            Sleep 50
            Send {F4 down}
            Sleep 50
            Send {F4 up}
            Sleep 50
            Send {Alt up}
            Exit
            

It seems like something in that script is causing the issue. Try replacing the Retroarch AutoHotkey script with the below:


Send {Escape down}
Sleep 50
Send {Escape up}

 

Jason,

Ok, so I tested with the above provided retroarch exit script. counted 30 game exit attempts made- and NO CRASHES occured so far.... I typically would think I would have gotten at least 1 crash by now.... ( using Xbox controller automation with hold button and close active window)

 

Edited by MazJohn [Mr Arcade]
Link to comment
Share on other sites

2 hours ago, MazJohn [Mr Arcade] said:

Jason,

Ok, so I tested with the above provided retroarch exit script. counted 30 game exit attempts made- and NO CRASHES occured so far.... I typically would think I would have gotten at least 1 crash by now.... ( using Xbox controller automation with hold button and close active window)

 

Awesome, okay, that confirms that it's the default AutoHotkey script that's causing the problem. Can you try the below script to see if it fixes it? If so, I can update the default script:

            SetTitleMatchMode, 2

            If WinActive(""DOSBox"")
            {
                Send {Ctrl down}
                Sleep 50
                Send {F9 down}
                Sleep 50
                Send {F9 up}
                Sleep 50
                Send {Ctrl up}
                Exit
            }

            If WinActive(""Project64"")
            {
                Process, Close, Project64.exe
                Exit
            }

            If WinActive(""redream"")
            {
                Send {Alt down}
                Sleep 50
                Send {F4 down}
                Sleep 50
                Send {F4 up}
                Sleep 50
                Send {Alt up}
                Exit
            }

            Send {Escape down}
            Sleep 50
            Send {Escape up}

            Sleep 500

            If WinActive(""LaunchBox"")
            {
                Exit
            }

            If WinActive(""Fusion"")
            {
                Exit
            }

            Send {Alt down}
            Sleep 50

            If WinActive(""LaunchBox"")
            {
                Exit
            }

            If WinActive(""Fusion"")
            {
                Exit
            }

            Send {F4 down}
            Sleep 50

            If WinActive(""LaunchBox"")
            {
                Exit
            }

            If WinActive(""Fusion"")
            {
                Exit
            }

            Send {F4 up}
            Sleep 50

            If WinActive(""LaunchBox"")
            {
                Exit
            }

            If WinActive(""Fusion"")
            {
                Exit
            }

            Send {Alt up}
            Exit

 

Link to comment
Share on other sites

5 hours ago, Jason Carr said:

Awesome, okay, that confirms that it's the default AutoHotkey script that's causing the problem. Can you try the below script to see if it fixes it? If so, I can update the default script:


            SetTitleMatchMode, 2

            If WinActive(""DOSBox"")
            {
                Send {Ctrl down}
                Sleep 50
                Send {F9 down}
                Sleep 50
                Send {F9 up}
                Sleep 50
                Send {Ctrl up}
                Exit
            }

            If WinActive(""Project64"")
            {
                Process, Close, Project64.exe
                Exit
            }

            If WinActive(""redream"")
            {
                Send {Alt down}
                Sleep 50
                Send {F4 down}
                Sleep 50
                Send {F4 up}
                Sleep 50
                Send {Alt up}
                Exit
            }

            Send {Escape down}
            Sleep 50
            Send {Escape up}

            Sleep 500

            If WinActive(""LaunchBox"")
            {
                Exit
            }

            If WinActive(""Fusion"")
            {
                Exit
            }

            Send {Alt down}
            Sleep 50

            If WinActive(""LaunchBox"")
            {
                Exit
            }

            If WinActive(""Fusion"")
            {
                Exit
            }

            Send {F4 down}
            Sleep 50

            If WinActive(""LaunchBox"")
            {
                Exit
            }

            If WinActive(""Fusion"")
            {
                Exit
            }

            Send {F4 up}
            Sleep 50

            If WinActive(""LaunchBox"")
            {
                Exit
            }

            If WinActive(""Fusion"")
            {
                Exit
            }

            Send {Alt up}
            Exit

 

Capture.PNG.7a8e8ff189ffc83d1cc76e3f3c645215.PNGusing that script i get the above error on exit with xbox controller automation.

Edited by MazJohn [Mr Arcade]
Link to comment
Share on other sites

7 hours ago, Jason Carr said:

Just put out beta 2. You can test by resetting to the default exit script for Retroarch. If everything works, I'll go ahead and put out the official. :)

Regrettably, got a crash on beta 2 after 8 game exit attempts ...  error dDebug 2019-06-06 05-43-50 PM.logump and log file attached. I do appreciate all you have aready done to try and help....

Cannot set Visibility to Visible or call Show, ShowDialog, Close, or WindowInteropHelper.EnsureHandle while a Window is closing.

App:     Big BoxDebug 2019-06-06 05-43-50 PM.log
Version: 9.9-beta-2
Type:    System.InvalidOperationException
Site:    Void VerifyNotClosing()
Source:  PresentationFramework

   at System.Windows.Window.VerifyNotClosing()
   at System.Windows.Window.InternalClose(Boolean shutdown, Boolean ignoreCancel)
   at System.Windows.Application.DoShutdown()
   at System.Windows.Application.ShutdownImpl()
   at System.Windows.Application.ShutdownCallback(Object arg)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

Recent Log:

   5:44:49 PM Music.StopAndResumeBackground Start
   5:44:49 PM Music.Kill Start
   5:44:49 PM Music.Kill Finished
   5:44:50 PM Music.StopAndResumeBackground Start
   5:44:50 PM Music.StopAndResumeBackground Start
   5:44:51 PM Music.Pause Start
   5:44:51 PM Music.Pause Start
   5:44:52 PM Music.Pause Start
   5:46:11 PM Music.Resume Start
   5:46:13 PM Music.Kill Start
   5:46:13 PM Music.Kill Finished
   5:46:16 PM Music.StopAndResumeBackground Start
   5:46:17 PM Music.StopAndResumeBackground Start
   5:46:17 PM Music.StopAndResumeBackground Start
   5:46:19 PM Music.StopAndResumeBackground Start
   5:46:19 PM Music.StopAndResumeBackground Start
   5:46:20 PM Music.StopAndResumeBackground Start
   5:46:20 PM Music.Kill Start
   5:46:20 PM Music.Kill Finished
   5:46:21 PM Music.StopAndResumeBackground Start
   5:46:21 PM Music.StopAndResumeBackground Start
   5:46:23 PM Music.Pause Start
   5:46:23 PM Music.Pause Start
   5:46:23 PM Music.Pause Start
   5:49:32 PM Music.Resume Start
   5:49:35 PM Music.Kill Start
   5:49:35 PM Music.Kill Finished
   5:49:39 PM Music.StopAndResumeBackground Start
   5:49:39 PM Music.StopAndResumeBackground Start
   5:49:41 PM Music.StopAndResumeBackground Start
   5:49:41 PM Music.Kill Start
   5:49:41 PM Music.Kill Finished
   5:49:42 PM Music.StopAndResumeBackground Start
   5:49:42 PM Music.StopAndResumeBackground Start
   5:49:43 PM Music.Pause Start
   5:49:43 PM Music.Pause Start
   5:49:44 PM Music.Pause Start
   5:50:20 PM Music.Resume Start
   5:50:22 PM Music.Kill Start
   5:50:22 PM Music.Kill Finished
   5:50:24 PM Music.StopAndResumeBackground Start
   5:50:24 PM Music.StopAndResumeBackground Start
   5:50:25 PM Music.StopAndResumeBackground Start
   5:50:25 PM Music.Kill Start
   5:50:25 PM Music.Kill Finished
   5:50:31 PM Music.StopAndResumeBackground Start
   5:50:31 PM Music.Kill Start
   5:50:31 PM Music.Kill Finished
   5:50:33 PM Music.StopAndResumeBackground Start
   5:50:33 PM Music.StopAndResumeBackground Start
   5:50:34 PM Music.StopAndResumeBackground Start
   5:50:34 PM Music.Kill Start
   5:50:34 PM Music.Kill Finished
   5:50:34 PM Music.StopAndResumeBackground Start
   5:50:34 PM Music.StopAndResumeBackground Start
   5:50:35 PM Music.Pause Start
   5:50:35 PM Music.Pause Start
   5:50:36 PM Music.Pause Start
   5:50:45 PM Music.Resume Start
   5:50:47 PM Music.Kill Start
   5:50:47 PM Music.Kill Finished
   5:50:49 PM Music.StopAndResumeBackground Start
   5:50:49 PM Music.StopAndResumeBackground Start
   5:50:50 PM Music.StopAndResumeBackground Start
   5:50:50 PM Music.Kill Start
   5:50:50 PM Music.Kill Finished
   5:50:51 PM Music.StopAndResumeBackground Start
   5:50:51 PM Music.StopAndResumeBackground Start
   5:50:53 PM Music.Pause Start
   5:50:53 PM Music.Pause Start
   5:50:53 PM Music.Pause Start
   5:51:10 PM Music.Pause Start
   5:51:10 PM Music.Kill Start
   5:51:10 PM Music.Kill Finished
   5:51:13 PM Exception

Edited by MazJohn [Mr Arcade]
Link to comment
Share on other sites

Okay, so weird. It seems like AutoHotkey scripts are just not detecting windows like they should on your system. Doesn't really make much sense to me. We could spend all year troubleshooting AutoHotkey scripts, but I don't see much benefit to that since we can't really fix AutoHotkey itself anyways.

At least we know a script that works. But the problem is, if I remove everything else from the default script, it will break the exit functionality for other emulators that is currently working for other folks out of the box. So I guess for now, we'll just have to go with what we have, and you can change your emulators to use the minimal script that worked.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...