What happens when verse runtime error occurs

When a Verse unrecoverable error occurs, will that one device with the runtime error stop working under that game/round or will every device that is written in verse (my other devices) stop working under the same game/round. So basically will one runtime error make verse completely stop working for that round/game? I didn’t find any documantion on runtime errors and what happens after it occurs :slight_smile:

@Kasity ,

There was a runtime error before and it needed <decides> added to start of your function recover on error and appear to have done nothing you then have to use Log.Print or print
to check the values

I want to know under what conditions this error occurs in Verse

As of 29.40, Verse runtime errors seem to work that way (from what I tested) :

  • When a crash occurs, the whole stack trace that caused the crash gets crashed
  • What’s crashing is not necessarily the device that contains the faulty code, but rather the device that called the faulty code
    So if deviceA calls deviceB.FunctionThatCrashes(), then deviceA will get crashed
  • As I said, when crashed, everything in the call stack is crashed, and because the origin of all calls are located inside the OnBegin() function, every call that you made inside OnBegin gets also canceled, event subscriptions included
    If we take the example with deviceA and deviceB again, deviceA will get crashed and subscriptions inside this device are directly canceled, but deviceA and its functions are still callable, I’m not sure if the mutated data is retained there, but I think it should
  • Because event subscriptions are canceled upon crash, your server might actually get frozen if your gameplay loop relies on the device that crashed
  • 1.0 devices and events plugged through DEB will keep on working
  • The device OnEnd() method doesn’t get called
  • There’s no native way to handle crashes

To iterate once more on the call stack example, if deviceB calls deviceA which calls deviceB.FunctionThatCrashes() in the same call stack (same frame, same initial call), then deviceB will crash, I’d suggest looking more into what the call stack means if you’re having trouble understand that

Here’s a script I made to handle runtime errors, I wish we had a way to handle that natively though, hope it helps, I’m here if you have any questions

https://dev.epicgames.com/community/snippets/4WDO/fortnite-verse-crash-detector

verse_crash_detector (README) - Pastebin.com (
verse_crash_detector (VERSE CODE) - Pastebin.com (
verse_crash_detector (DEVICES) - Pastebin.com (

3 Likes

That sounds fantastic, but is the snippet link private or something? Even while logged in, I got a 404 Not Found error.

1 Like

Double-check that you are logged in. I just opened a new incognito tab, ctrl + shift + n in chrome, to mimic what happens when someone would try to open that link without being logged in, and I do see that 404 error. - Works normally for me otherwise.

1 Like

This was really helpful! Only problem was I couldn’t get the verse snippit even if I was logged in (gives me a 404 error).

I was also wondering if you knew why I sometimes get (Callstack Unavailable) in the crash report. I’ve been working on this bug for days but can’t understand where the problem is without the callstack info. Imgur: The magic of the Internet

Thanks again for the helpful info. Hopefully this will let me fix my crashes!

I don’t know what’s wrong with the snippet page, we shouldn’t be connected to get access to that (@Astrotronic), can you try reconnecting though ? I’ll upload somewhere else otherwise, lmk

The infinite loop issue won’t be detected in my script also, it’s an issue somewhere in your code, look for loop blocks that could eventually trigger infinitely

EDIT: mb the snippet got refused somehow

I think it got refused because I used the Verse category to add the README, it wouldn’t let me choose any other relevant category in which people could press “Expand” instead of “Copy full snippet” (which doesn’t make sense for a README), had to switch to pastebin

1 Like

I updated the post

2 Likes