## Game random crash on a start

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Sasha264
Citizen
Posts: 71
Joined: Mon Sep 08, 2014 7:57 am

### Game random crash on a start

Hi everyone
Waited for a few months before asking this, and now is the time, because I found nothing

I have a relatively complex game on love 11.2 (or 11.3 no difference for that aspect).
I am running it through SublimeText Ctrl+B that executes love.exe with folder parameter.
It runs correctly in approximately 49 from 50 runs (with no change in code (or sublime settings or whatever) between runs).
And in 1 run from 50 I have this:
• game 'loads' correctly as I see with my custom console output, no warnings no errors
• then I see a pure white window for a few seconds
• then game crashes, sometimes with no output, sometimes with following output:

Code: Select all

Loaded 'current' in 0.18 seconds
Detected refreshrate 60 Hz
[Finished in 5.0s with exit code 3221225477]
[cmd ['D_repoMegaFactorycode_buildlove-win64love.exe', 'D_repoMegaFactorycode']]
[dir D_repoMegaFactorycodejournal]
[path CProgram Files (x86)Common FilesOracleJavajavapath;CProgram Files (x86)Common FilesIntelShared FilescppbinIntel64;CProgram Files (x86)Razer Chroma SDKbin;CProgram FilesRazer Chroma SDKbin;CWINDOWSsystem32;CWINDOWS;CWINDOWSSystem32Wbem;CWINDOWSSystem32WindowsPowerShellv1.0;CProgram FilesGitcmd;CProgram FilesMicrosoft Windows Performance Toolkit;CProgram FilesMicrosoft SQL Server120ToolsBinn;CProgram FilesMicrosoft SQL Server130ToolsBinn;CProgram Files (x86)Lua5.1;CProgram Files (x86)Lua5.1clibs;CProgram Files (x86)NVIDIA CorporationPhysXCommon;CProgram FilesLua;CProgram Files (x86)Lua5.1;CUsersUserAppDataLocalMicrosoftWindowsApps;CProgram Files (x86)GtkSharp2.12bin;CWINDOWSsystem32;CWINDOWS;CWINDOWSSystem32Wbem;CWINDOWSSystem32WindowsPowerShellv1.0;CWINDOWSSystem32OpenSSH;CProgram FilesMicrosoft VS Codebin;CProgram FilesNVIDIA CorporationNVIDIA NvDLISR;CProgram FilesLua;CProgram Files (x86)Lua5.1;CUsersUserAppDataLocalMicrosoftWindowsApps;CProgram FilesMicrosoft VS Codebin;CUsersUserAppDataLocalGitHubDesktopbin;%USERPROFILE%AppDataLocalMicrosoftWindowsApps;]
I googled 3221225477 and found this:

Code: Select all

3221225477 converted to hex is 0xC0000005, which stands for STATUS_ACCESS_VIOLATION, which means you tried to access (read, write or execute) invalid memory.
And this happening only with this particular game, so it is lua-code-related.
And when I concatenate love.exe with zipped folder to obtain mygame.exe and then run it, I have not noticed that behaviour, but maybe I just did not do this enough times.
I have no clue how to find the source of that error?

ReFreezed
Party member
Posts: 139
Joined: Sun Oct 25, 2015 11:32 pm
Location: Sweden
Contact:

### Re: Game random crash on a start

Does the game freeze with the white window during a specific function call? Did you try running the game through cmd.exe instead of Sublime?

Maybe try printing something before each operation that interacts with the system (like loading an image, iterating over folder items or resizing the window) to see if the problem happens in the same place. (You can easily monkey patch all the functions in the love table. Make sure buffering is disabled for STDOUT and STDERR too.) Try using a different computer to see if the problem is maybe just on your computer.

After some googling, I think using a debugger may possibly be necessary to find the actual problem, which I'm assuming is in LÖVE, SDL, or some other part of the framework rather than in your code (unless you're using FFI or something in a bad way).
Tools: Hot Particles, LuaPreprocess
Games: Momento Temporis: Light from the Deep, Momento Temporis: Arena, Energize!
"If each mistake being made is a new one, then progress is being made."

duaner
Prole
Posts: 9
Joined: Thu May 07, 2020 6:43 pm
Contact:

### Re: Game random crash on a start

I don't think you've got exactly the same symptoms I did. However, the last time I ran into a random crash like that, it turned out that I was starting the game before my editor had actually finished saving it. Love was trying to run the project with a missing or partial file (with hilarious consequences).

The real problem was my ssd going into sleep mode unnecessarily, delaying the write. After fixing that, the problem went away.

### Who is online

Users browsing this forum: Google [Bot] and 19 guests