TheGameCreators / GameGuruRepo

The GameGuru Repository For Community Collaboration
http://www.game-guru.com
137 stars 56 forks source link

GGMAX Bug - SpawnNewEntity causing MAX to crash? #5738

Open AmenMoses opened 4 weeks ago

AmenMoses commented 4 weeks ago

I have a script that uses the SpawnNewEntity command to make multiple copies of entities (the piano script much demoed on the discord) but when testing it MAX crashes regularly,

i.e. if I run test game for the first time it usually works fine (but not always) but subsequent test game runs tend to crash out with no error, just returns me to windows desktop.

I've checked the logs and nothing reported there either.

Kasseyus commented 4 weeks ago

@AmenMoses Hi there. Can you please send me the FPM file in which you experience this issue - and the script you mentioned so I can attempt to recreate the conditions of the crash.

These can be sent to me at chris@thegamecreators.com

AmenMoses commented 3 weeks ago

@Kasseyus Don't have working email at present but here are the files you need to test the piano:

entitybank.zip scriptbank.zip audiobank.zip

Just create an empty level, no biome or anything. Drop in one of each entity, i.e. piano, piano_lid and four keys. Then run test game. Play with the piano to check it all works, then escape back to the editor and hit test game again. For me running with the latest public version of MAX (which seems to be called 2024.06.18 ?) it usually will dump back out to windows, sometimes on the second test but definitely after a few more.

korodai commented 1 week ago

I noticed spawning new entities will sometimes crash MAX to desktop if DeleteNewEntity() is not called before exiting the script.

Kasseyus commented 1 week ago

@LeeBamberTGC Verified and consistent crashes on subsequent 'test games' https://github.com/user-attachments/assets/e19c665f-ffd7-407a-b540-470043eb9928

Attached an FPM file of a level with the piano setup, but you'll need to download the files above.

Mozart.zip

Also. This piano is totally awesome.

AmenMoses commented 6 days ago

Also. This piano is totally awesome.

It's actually an oldie from the Classic days reworked in MAX to use the dynamic spawning for the entities rather than the user having to place 80 odd keys down in the level. The models were provided by GraPhiX and they and the script are freely available to anyone who wants them.

Glad you like it though.