Maximum number of lines in a Verse file?

As soon as i go past around 13k - 14k lines of code in a verse document i start getting problems where the UEFN editor fails to connect to the client session.

I had around 34k lines of code, mostly all for a custom interactible user interface.

i get this error over and over:

LogNet: Warning: UNetConnection::Tick: Connection TIMED OUT. Closing connection.. Elapsed: 30.01, Real: 30.01, Good: 30.01, DriverTime: 39.07, Threshold: 30.00, [UNetConnection] RemoteAddr: 20.3.209.228:15009, Name: IpConnection_30, Driver: Name:IpNetDriver_30 Def:BeaconNetDriver IpNetDriver_30, IsServer: NO, PC: NULL, Owner: ValkyrieBeaconClient_30, UniqueId: MCP:cccbbb6762d044468e9cc6f4685c210c
LogNet: Error: UEngine::BroadcastNetworkFailure: FailureType = ConnectionTimeout, ErrorString = UNetConnection::Tick: Connection TIMED OUT. Closing connection.. Elapsed: 30.01, Real: 30.01, Good: 30.01, DriverTime: 39.07, Threshold: 30.00, [UNetConnection] RemoteAddr: 20.3.209.228:15009, Name: IpConnection_30, Driver: Name:IpNetDriver_30 Def:BeaconNetDriver IpNetDriver_30, IsServer: NO, PC: NULL, Owner: ValkyrieBeaconClient_30, UniqueId: MCP:cccbbb6762d044468e9cc6f4685c210c, Driver = Name:IpNetDriver_30 Def:BeaconNetDriver IpNetDriver_30
LogValkyrieRequestManagerEditor: Warning: Encountered Network Error!
LogValkyrieRequestManagerEditor: Error: Failed to handle connection attempt (Network error occurred when connecting to a server after matchmaking completed. Error: UNetConnection::Tick: Connection TIMED OUT. Closing connection.. Elapsed: 30.01, Real: 30.01, Good: 30.01, DriverTime: 39.07, Threshold: 30.00, [UNetConnection] RemoteAddr: 20.3.209.228:15009, Name: IpConnection_30, Driver: Name:IpNetDriver_30 Def:BeaconNetDriver IpNetDriver_30, IsServer: NO, PC: NULL, Owner: ValkyrieBeaconClient_30, UniqueId: MCP:cccbbb6762d044468e9cc6f4685c210c)
LogValkyrieSummary: Destroying Valkyrie Beacon

As soon as i go past 13k lines this error starts occuring sometimes, once i get to 30k lines it happens every single launch attempt.

In the client the game loads but it says Editor is not connected.

There are no verse errors.

Is there a maximum allowed number of lines? i am just publishing too much code for the engine to handle? do i need to break it apart into many different files for it to be allowed to run?

ive been stuck with this issue for so long, it doesnt seem like it will be patched or fixed, and there is no way for me to fix it.

I removed 20K lines from 34k → 14k and as i slowly add each line back one by one it will randomly encounter this connection error which completely destroys the development process.

Has anyone else had an issue with Verse not wanting to allow more than 10k lines in a project?

Its really exhausting trying to fix this issue with no useful error information and no verse build errors

hi @1337DIsplayName ,
There was a post in 2023 which can’t seem to be found.
Firstly do NOT have any Verse files or project files on OneDrive or any Cloud-based systems based on Windows 11

If you get a cloud network error your files will get corrupted and the red squiggle won’t work.

When you ask to compile the Verse the whole lot is packed up and sent to a UNIX-based system, not an AWS system. This means compilation is relatively slow as this is a single process build.
Each Verse file is sent in turn and the Blueprint pseudo code is built like in 1980! :rofl: :sleeping:

There are no helpful error messages just a log entry
LogSolaris: memory size exceeded more than 15000 lines processed

Also, the complexity of the lines of code seems to affect the number of lines that can be processed. Printing “Hello” can be done in 45,000 line before an error occurs :rofl: .

This means that you need to split the code like in the early days of coding as there is not that much memory like the AWS systems of today

35k lines of Verse is a 2.16MB file

The error was being caused by too many instances of [player] map{}, i had over 500, had to refactor out most of them

i was trying to store a pointer/reference to each UI element that i wanted to change at runtime

found more efficient ways of doing it using less map{}

its almost all UI code, no recursion

I’ll be back when i exceed 50k lines, should be soon

1 Like

i went past 40,000 lines and started recieving this error again. i tried splitting the verse into two separate files, one with 32,000 lines, the other wtih 9,000 and it still has the same error.

am i able to use more than 40,000 lines by using multiple files or is there a hard limit that i have exceeded?

I will have to delete functionality from my game in order for it to run.

Still no useful error messages, just “Editor is not connected” after it loads

I found the solution

I removed 20,000 lines and still had the same error.
After many days of trial and error, i found that commenting out a single 7000 line function fixes the error.
The 7000 line function was many nested if else if statements, so i broke it apart into 10 different functions, which made the issue go away.
I think the issue may have been caused by having too much logic inside of a single if function, because Verse uses rollback based on failure/success of the if functions, i think i may have been causing a buffer overflow of some sort during server-side validation.
Either way, the problem was having a single function of 7000 lines that was way too large with many if else if functions nested inside. By breaking up the function and calling sub-functions, the error went away.

Ill be back when i break it again.

1 Like