Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In-Game: [YYC] Creating a large array literal via code can cause a silent crash #7082

Open
GameDevTosh opened this issue Aug 3, 2024 — with GM Bug Reporter · 10 comments
Labels
build-bug Bugs when compiling projects inside GameMaker gmrt project This issue has a sample project attached

Comments

@GameDevTosh
Copy link

GameDevTosh commented Aug 3, 2024

Description

This one was a pain to find, but after deleting 80% of my project I was able to narrow it down.

If you make a large enough array literal of structs with multi-dimensional arrays full of constructor calls (in this case, 3500 lines of code), Gamemaker will silently crash in YYC only with "exited with non-zero status (-1073741571)". This seems to happen in all versions of GM, including latest Beta, the version this report is being made in.
error

The included project has a full reproduction.

P.S: This project runs in VM, GMRT VM, and GMRT Native. Its is ONLY in YYC that this issue happens.

Steps To Reproduce

  • Run the project in YYC
  • Observe the crash near the end of the build
  • Run the project in VM, GMRT VM, or GMRT Native
  • Project will run just fine

Which version of GameMaker are you reporting this issue for?

IDE v2024.800.0.602 Runtime v2024.800.0.624

Which operating system(s) are you seeing the problem on?

Windows 10.0.19045.0

Which platform(s) are you seeing the problem on?

Windows

fae7009d-8006-4ccb-bdd4-9ed8aa5dc541

@gm-bug-reporter gm-bug-reporter bot added build-bug Bugs when compiling projects inside GameMaker project This issue has a sample project attached labels Aug 3, 2024
@backYard321
Copy link

I get a similar silent crash testing YYC - I don't use multi-dimensional arrays, but I do store a lot of structs containing methods in arrays.

@GameDevTosh
Copy link
Author

So saving the array (made in a script asset, not inside a function) to json/file in VM and then loading that file instead of via script asset makes it work in YYC. So its really something to do with making large array literals, or making large array literals in script assets.

@stuckie stuckie moved this from Triage to Backlog in Team Workload Aug 6, 2024
@YYDan YYDan changed the title [YYC] Creating a large array literal will exit with non-zero status (-1073741571) In-Game: [YYC] Creating a large array literal via code can cause a silent crash Aug 6, 2024
@rwkay rwkay added this to the 2024.11 milestone Oct 10, 2024
@rwkay rwkay moved this from Backlog to Todo in Team Workload Oct 10, 2024
@rwkay rwkay moved this from Todo to In Progress in Team Workload Oct 10, 2024
@rwkay
Copy link

rwkay commented Oct 10, 2024

I have implemented an improvement in 2024.11 that allows the enclosed project to compile - it is not an overall fix for giant data sets being implemented as code - I would still advocate using data files for large amounts of data.

@rwkay rwkay closed this as completed Oct 10, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Team Workload Oct 10, 2024
@YYBartT YYBartT moved this from Done to Ready for QA in Team Workload Oct 10, 2024
@mgeddesGM
Copy link

verified as of IDE v2024.1100.0.646 Runtime v2024.1100.0.666

@mgeddesGM mgeddesGM moved this from Ready for QA to Verified in Team Workload Oct 14, 2024
@GameDevTosh
Copy link
Author

GameDevTosh commented Oct 24, 2024

On todays beta version, this issue still happens with the same project that was submitted with this report. VM works fine as usual. It's only on YYC that it happens. Possibly regression or it wasn't pushed out to the build correctly, dunno. Image

@rwkay
Copy link

rwkay commented Oct 25, 2024

Check this is working...

@rwkay rwkay reopened this Oct 25, 2024
@github-project-automation github-project-automation bot moved this from Verified to Triage in Team Workload Oct 25, 2024
@GameDevTosh
Copy link
Author

Verified it again that it does not work in .680. However, using a squirrel build of .666, it does work as QA had said. It is only in latest beta (.680 runtime) that it does not.Image

@jackerley jackerley moved this from Triage to Todo in Team Workload Oct 28, 2024
@rwkay
Copy link

rwkay commented Oct 28, 2024

Fixed in 2024.11 again.... So it turns out the earlier fix was in their but a fix for a knock on issue caused the original problem to reappear - it turns out that creating giant arrays in GML like this is not a good idea... but... I was able to address the issue in a different way and I have now made YYC generate array literals in a slightly different way that does not create quite so many return variables (causing the runtime to run out of stack space). So this should be back working now.

@rwkay rwkay closed this as completed Oct 28, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in Team Workload Oct 28, 2024
@gurpreetsinghmatharoo gurpreetsinghmatharoo moved this from Done to Ready for QA in Team Workload Oct 29, 2024
@mgeddesGM
Copy link

verified as of IDE v2024.1100.0.659 Runtime v2024.1100.0.685

@mgeddesGM mgeddesGM moved this from Ready for QA to Verified in Team Workload Oct 29, 2024
@rwkay rwkay removed their assignment Nov 13, 2024
@rwkay rwkay moved this from Verified to Backlog in Team Workload Nov 13, 2024
@rwkay rwkay added the gmrt label Nov 13, 2024
@rwkay rwkay removed this from the 2024.11 milestone Nov 13, 2024
@rwkay
Copy link

rwkay commented Nov 13, 2024

I have had to reopen this issue as it caused knock ons for other project and the "fix" did not work in the general case - I am going to have to put this on the backlog for now as the real fix for this is GMRT (I have added the gmrt label on this so it is checked) - if you are looking to fix this in your code for the current runtime then you need to look at breaking up your giant declaration into different functions that create the different data you require - perhaps one per sub-structure (looks like it is data for scenes or rooms) - just putting them into anonymous functions would work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build-bug Bugs when compiling projects inside GameMaker gmrt project This issue has a sample project attached
Projects
Status: Backlog
Development

No branches or pull requests

4 participants