I am working on a UEFN project that includes a lot of verse code. Repeatedly, I’ve had the Session (Creative Mode session, from Start Session) crash suddenly when deploying changed code, after which it will continue crashing until I rollback or start over from scratch.
After extensive testing, I’ve narrowed it down a particular function that, when included in my verse code (EVEN IF NEVER CALLED!), which cause the session to crash on launch. But, it appears to me at least to be perfectly valid verse code. It builds fine, there are no code issues reported in the log or within VS Code (with verse extension enabled.) And again, just to be clear, it’s crashing EVEN IF THE FUNCTION is never called. It’s mere existence is apparently a problem.
The following is the code block in question:
IsStraight(Cards: CardSet): tuple(logic, int, ?CardSet)=
runLengths := Cards.GetRunLengths()
var straightRank: int = 0
for(runLength: runLengths) :
if(runLength(1) > 4 and straightRank < 1) :
set straightRank = runLength(0)
var straightCards: CardSet = CardSet{}
ranksToFind: []int =
for(i:= 0..4) :
straightRank - i
for(Rank: ranksToFind) :
rankSet:= Cards.CardsOfRank(Rank, 1)
set straightCards = CombineCardSets(straightCards, rankSet)
if(straightRank > 0) :
(true, straightRank, option{straightCards})
else :
var HasSmallStraight: logic = false
five:= Cards.CardsOfRank(5, 1)
four:= Cards.CardsOfRank(4, 1)
three:= Cards.CardsOfRank(3, 1)
two:= Cards.CardsOfRank(2, 1)
ace:= Cards.CardsOfRank(14, 1)
set straightCards = CombineCardSets(five, four)
set straightCards = CombineCardSets(straightCards, three)
set straightCards = CombineCardSets(straightCards, two)
set straightCards = CombineCardSets(straightCards, ace)
if(NumStraightCards:= straightCards.GetNumCards[], NumStraightCards >= 5) :
set HasSmallStraight = true
if(HasSmallStraight = true) :
(true, 5, option{straightCards})
else :
(false, 0, false)
A few notes that may or may not be relevant:
At first I thought it might be a verse file size issue. I’ve noticed VS Code intellisense gets very very slow whenever a file gets over a couple thousand lines.
However, I also after one of the crashes completely refactored the code into a lot more smaller files. Same issue reoccurred when the above function was included again.
For reference, I have about 1.25 mb of verse classes according to UEFN although there’s not a whole lot else in the project. (Screenshot below.)
This is incredibly frustrating…I have a virtually fully working Poker level for Fortnite, but this issue is preventing me from finishing. Quite frankly, I’m amazed I was able to push verse/uefn as far as I have, since it’s clearly not intended for this sort of game yet, but I had literally all the UI, game logic, animation, mutliplayer, etc. working and was doing some fine tuning on AI logic and such when this broke everything. A few screenshots from the game are below. (Excuse the harsh background, I hadn’t bothered putting the actual casino building in yet…)
Any help would be greatly appreciated. If anyone from Epic is curious to look deeper, I’m fine with giving access to the full project.
Poker Game In Progress
(Yes, I know there’s a mismatch in the screenshot between the hole cards in the corner and what’s on the table, trust me it works, I just can’t run all the logic at present with the above issue)
Snipped of Fortnite Log file showing error when crash occurs (at least I THINK this is the relevant section, but I can’t get anything meaningful out of this…)
[2023.04.05-18.57.57:296][504]LogGarbage: GC purged 1936 objects (448174 -> 446238) in 3.191ms
[2023.04.05-18.57.57:305][504]LogUObjectHash: Compacting FUObjectHashTables data took 9.00ms
[2023.04.05-18.57.57:307][504]LogUIActionRouter: Cleaned out [0] inactive UI action bindings
[2023.04.05-18.57.57:307][504]MemoryManagingGameInstanceSubsystem: Verbose: Instance [FortGameInstance_2147482646 -> FortCosmeticsSubsystem_2147482646]: PostGarbageCollection --
[2023.04.05-18.57.58:153][530]LogWindows: Error: === Critical error: ===
[2023.04.05-18.57.58:153][530]LogWindows: Error:
[2023.04.05-18.57.58:153][530]LogWindows: Error: Fatal error!
[2023.04.05-18.57.58:153][530]LogWindows: Error:
[2023.04.05-18.57.58:153][530]LogWindows: Error: Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000000000000010
[2023.04.05-18.57.58:153][530]LogWindows: Error:
[2023.04.05-18.57.58:153][530]LogWindows: Error: [Callstack] 0x00007ff7e82bf4f6 FortniteClient-Win64-Shipping.exe!UnknownFunction []
[2023.04.05-18.57.58:153][530]LogWindows: Error: [Callstack] 0x00007ff7ebc190bf FortniteClient-Win64-Shipping.exe!UnknownFunction []
[2023.04.05-18.57.58:153][530]LogWindows: Error: [Callstack] 0x00007ff7e82c1372 FortniteClient-Win64-Shipping.exe!UnknownFunction []
[2023.04.05-18.57.58:153][530]LogWindows: Error: [Callstack] 0x00007ff7e83f5394 FortniteClient-Win64-Shipping.exe!UnknownFunction []
[2023.04.05-18.57.58:153][530]LogWindows: Error: [Callstack] 0x00007ff7ece2b33a FortniteClient-Win64-Shipping.exe!UnknownFunction []