Jackarunda/gmod

Save bugs

Opened this issue · 6 comments

This is a list of all the bugs I came across while testing to see if the mod saved things properly.
(I am currently unsure why there are random 3's that have shown up in this report, they do not appear in the edit box)
(Also the #10 is not referring to the GitHub issue it's referring to the bug in this issue)

When loading a save with any type of bomb armed and then detonating it by throwing it at the ground the bomb will detonate but an with a tiny explosion in comparison to what you should have gotten. Also error will print and the bomb prop will stay even though an explosion happened. This is one of the errors that prints:

[JMod] lua/entities/ent_jack_gmod_ezbomb.lua:184: Tried to use a NULL entity!

  1. BlastDamage - [C]:-1

  2. Detonate - lua/entities/ent_jack_gmod_ezbomb.lua:184
    3. unknown - lua/entities/ent_jack_gmod_ezbomb.lua:84

When loading a save with an Automated Field Hospital the entity will spit out a Half-Life 2 Pod although no errors occur and the Field Hospital functions normally.

When loading a save with a Satchel Charge deployed it will undeploy and you won't be able to redeploy it.

When loading a save with a Detpack armed it will unarm although you can rearm it and trigger it without any issues or errors.

When loading a save with a Vehicle Mine UNARMED it will not explode if you arm it after loading the save and then trigger it.

When loading a save with a the Vehicle Mine ARMED it DOES explode but it errors out and the prop stays just like the bombs, here's the error:

[JMod] lua/entities/ent_jack_gmod_ezatmine.lua:149: Tried to use a NULL entity!

  1. BlastDamage - [C]:-1
  2. unknown - lua/entities/ent_jack_gmod_ezatmine.lua:149

Timer Failed! [Simple][@lua/entities/ent_jack_gmod_ezatmine.lua (line 136)]

When loading a save with a Mini Bounding Mine armed in the ground when you stand near it (not touching it like how your supposed to trigger it) it jumps in the air and explodes but does not delete it's prop just like the bombs and the Vehicle Landmine. It also errors out with this error:

[JMod] lua/entities/ent_jack_gmod_ezboundingmine.lua:186: Tried to use a NULL entity!

  1. BlastDamage - [C]:-1
  2. Boom - lua/entities/ent_jack_gmod_ezboundingmine.lua:186
    3. unknown - lua/entities/ent_jack_gmod_ezboundingmine.lua:231

Timer Failed! [Simple][@lua/entities/ent_jack_gmod_ezboundingmine.lua (line 229)]

When loading a save with a Fougasse Mine armed triggering it by shooting it does nothing, it just errors out with this error:

[JMod] lua/entities/ent_jack_gmod_ezfougasse.lua:137: Tried to use a NULL entity!

  1. BlastDamage - [C]:-1

  2. Detonate - lua/entities/ent_jack_gmod_ezfougasse.lua:137
    3. unknown - lua/entities/ent_jack_gmod_ezfougasse.lua:98

When loading a save with any type of missle that is armed it will stay armed but you won't be able to launch it using the launch command unless you disarm it and rearm it after that it operates normally.

If you save while the Criticality Weapon is arming itself it will tick infinitely and never actually arm itself.

If you save while the Criticality Weapon is going critical and load that save you it will just glow and not cause damage while erroring out every quarter of a second with this error:

[JMod] lua/entities/ent_jack_gmod_ezcriticalityweapon.lua:322: Tried to use a NULL entity!

  1. SetAttacker - [C]:-1

  2. unknown - lua/entities/ent_jack_gmod_ezcriticalityweapon.lua:322 (x30)

If you save while the Micro Black Hole Generator is arming itself it will not make any sound and spawn the implode effect but there will not be a black hole and the generator itself will not implode along side the effect. It also errors out with this error when the implode effect spawns:

[JMod] lua/entities/ent_jack_gmod_ezmbhg.lua:139: Tried to use a NULL entity!

  1. BlastDamage - [C]:-1

  2. Detonate - lua/entities/ent_jack_gmod_ezmbhg.lua:139
    3. unknown - lua/entities/ent_jack_gmod_ezmbhg.lua:172

The Bioweapon Canister has the same issue as #10

The Fumigator has the same issue as #10

If you save while the Fumigator is fumigating and load that save it will error out with this error:

[JMod] lua/entities/ent_jack_gmod_ezgasparticle.lua:81: Tried to use a NULL entity!

  1. SetAttacker - [C]:-1

  2. unknown - lua/entities/ent_jack_gmod_ezgasparticle.lua:81 (x23)

If you save while the Flare is lit and load that save and it will stop making sound and then if you throw it it will error out with this error:

[JMod] lua/entities/ent_jack_gmod_ezroadflare.lua:80: Tried to use a NULL entity!

  1. SetAttacker - [C]:-1

  2. unknown - lua/entities/ent_jack_gmod_ezroadflare.lua:80 (x6)

If you save while the Flare is lit and load that save and wait it will not get it's burnt skin applied and if you wait until it burns out it will error out with this error:

[JMod] lua/entities/ent_jack_gmod_ezroadflare.lua:147: attempt to index field 'BurnSound' (a nil value)

  1. Burnout - lua/entities/ent_jack_gmod_ezroadflare.lua:147

  2. unknown - lua/entities/ent_jack_gmod_ezroadflare.lua:185

If you light a Flare and wait until it gets it's burnt skin and then save and load that save it will load without it's burnt skin applied.

If you light a Fuel Lantern and save and then load that save if you pick it up the Fuel Lantern the light sprite will not follow it and if you save again and then load that save you'll have two floating light sprites and your Fuel Lantern will still be on evident by the fact that it still emits light. You can do this until you crash your game. I recommend testing this in a dark room to see what I mean by the fact that the Fuel Lantern still emits light even though there is no light sprite.

If you give the Signal Grenade a color and then save and load that save it will be reset back to the default color.

If you pull the pin from a grenade and throw it and then save while it's in mid air and then load that save the grenade will never explode and you can't rearm it.
List of grenade entities that do this:
ent_jack_gmod_ezfragnade
ent_jack_gmod_ezsticknadebundle
ent_jack_gmod_ezimpactnade
ent_jack_gmod_ezfirenade
ent_jack_gmod_ezsticknade
ent_jack_gmod_ezstickynade
ent_jack_gmod_eznade_impact
ent_jack_gmod_eznade_proximity
ent_jack_gmod_eznade_remote
ent_jack_gmod_eznade_timed
ent_jack_gmod_ezflashbang
ent_jack_gmod_ezgasnade
ent_jack_gmod_ezsignalnade
ent_jack_gmod_ezsmokenade
ent_jack_gmod_ezcsnade

If you start a scan with the Ground Scanner wait until one scan completes and you save and then load that save the display will forget the resources that it has scanned and you will have to wait until the next scan finishes.

Those are all the bugs I could find regarding the gmod save system. This addon already seems to have very good save support although these bugs are keeping me from using it on my server for now. Thank you for reading and let me know if you need any more context on an item.

This is a very comprehensive list, I'll take a full look when I have time.

We noticed that a lot of things broke when saving, and I've implemented some rudimentary fixes for machines, but I didn't know this list was so long.

Thanks for the report 👍

np, best of luck to you in fixing the bugs. c:
Also I've come across four more save bugs:

When loading a save with a SLAM armed and then if you trigger it it explodes but does not delete it's prop just like the bombs, the Vehicle Landmine, and the Mini Bounding Mine. It also errors out with this error:

[JMod] lua/jmod/sv_util.lua:515: Tried to use a NULL entity!

  1. BlastDamage - [C]:-1
  2. RicPenBullet - lua/jmod/sv_util.lua:515
    3. unknown - lua/entities/ent_jack_gmod_ezslam.lua:235

Timer Failed! [Simple][@lua/entities/ent_jack_gmod_ezslam.lua (line 220)]

If you start arming a SLAM and then you save and load it the SLAM will blink indefinitely. If then disarm it and rearm it it will arm itself but if you walk in front of the laser nothing will happen.

If you load a save that has resource extractors extracting on resource deposits sometimes they will stop working and if you press use to turn them back on they will complain and say that they aren't on the ground securely even though they were working when saved.

If you save and then restart your game and load the save you made resource deposits will reshuffle.

Yeah, I can see a lot of these bugs are stemming from a problem where the machines and explosives use time stamps in their think function to know when to explode/update their extraction progress.
When you save and load, the global timestamp is reset, so the ents would have to normally wait until the new timestamp caught up to the old one before they'd think properly again.
I fixed this problem a while ago for the machines, by having their timestamps reset on load/paste, but I'll have to go through all of the explosives as well I guess.
Hopefully this will reduce duplicator bugs as well.

BTW for # 26, there was really no reliable way to save/load deposits, so instead we've included a tool and menu that allows you to save the deposit layout and load it again, that way you can just run a console command to save the deposit and then load it again when you've loaded the save.
If you don't give the save a name, it will use a default name just in case you don't care about having separate deposit layouts, and they're separated per map, so you can switch maps and the default save will be different.

Yeah, I can see a lot of these bugs are stemming from a problem where the machines and explosives use time stamps in their think function to know when to explode/update their extraction progress. When you save and load, the global timestamp is reset, so the ents would have to normally wait until the new timestamp caught up to the old one before they'd think properly again. I fixed this problem a while ago for the machines, by having their timestamps reset on load/paste, but I'll have to go through all of the explosives as well I guess. Hopefully this will reduce duplicator bugs as well.

Yeah it looked like it was all similar issues, glad it doesn't seem to be a super hard fix.

BTW for # 26, there was really no reliable way to save/load deposits, so instead we've included a tool and menu that allows you to save the deposit layout and load it again, that way you can just run a console command to save the deposit and then load it again when you've loaded the save. If you don't give the save a name, it will use a default name just in case you don't care about having separate deposit layouts, and they're separated per map, so you can switch maps and the default save will be different.

Okay cool, thanks for letting me know.