[StrangePan] [1.1.41] Crash: InventoryGuiSlot.cpp:220: No itemstack found

This subforum contains all the issues which we already resolved.
Xorimuth
Filter Inserter
Filter Inserter
Posts: 700
Joined: Sat Mar 02, 2019 9:39 pm
Contact:

[StrangePan] [1.1.41] Crash: InventoryGuiSlot.cpp:220: No itemstack found

Post by Xorimuth »

My game crashed whilst I was testing some new changes I'd made to my mod Spidertron Weapon Switcher (but I haven't recently changed any code around the spidertron switching which is where the crash was). Attached is the save and the current development version of the mod. Also uses EditorExtensions, flib and spidertron-extended.

I loaded the save, switched each spidertron to shotgun-mode, tested the shotgun range for each. I then went to editor mode and placed some more lab tiles.

I then got some flamethrower ammo from my inventory and went through each spidertron switching them to flamethrower-mode. It crashed as soon as I switched the 3rd, MK3, spidertron. I think I was holding flamethrower ammo in my hand at the time, I was in the MK3 spidertron, and the spidertron inventory wasn't open.

I can't replicate the crash based on the above info though and I've never seen it happen before. Presuming that it was caused by something my mod did, if you like you can follow the mod code from line 93 in control.lua where it made its last console log().
factorio-current new crash.log
(29.81 KiB) Downloaded 163 times
Vehicle weapon range test.zip
(1.93 MiB) Downloaded 142 times
SpidertronWeaponSwitcher_1.2.4.zip
(40.24 KiB) Downloaded 144 times
My mods
Content: Lunar Landings | Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings
StrangePan
Factorio Staff
Factorio Staff
Posts: 131
Joined: Fri Dec 07, 2018 3:41 pm
Contact:

Re: [1.1.41] Crash: InventoryGuiSlot.cpp:220: No itemstack found

Post by StrangePan »

Thanks for the bug report Xorimuth! The attached files and description help a lot.

I was able to reproduce the issue consistently with the following steps:
1. enter spidertron mk3
2. move mouse to equipment gui (weapons & ammo)
3. on the same frame a tooltip would pop up, press CTRL+TAB to switch modes (takes a few tries)

There's an timing issue with creating a tooltip on the same frame the player's vehicle is destroyed.
Xorimuth
Filter Inserter
Filter Inserter
Posts: 700
Joined: Sat Mar 02, 2019 9:39 pm
Contact:

Re: [1.1.41] Crash: InventoryGuiSlot.cpp:220: No itemstack found

Post by Xorimuth »

StrangePan wrote: Tue Oct 12, 2021 6:47 pm Thanks for the bug report Xorimuth! The attached files and description help a lot.

I was able to reproduce the issue consistently with the following steps:
1. enter spidertron mk3
2. move mouse to equipment gui (weapons & ammo)
3. on the same frame a tooltip would pop up, press CTRL+TAB to switch modes (takes a few tries)

There's an timing issue with creating a tooltip on the same frame the player's vehicle is destroyed.
Impressive work, well done!

I suppose that it is (almost if not completely) impossible to trigger this bug in vanilla, hence why it hasn’t come up before now!
My mods
Content: Lunar Landings | Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings
StrangePan
Factorio Staff
Factorio Staff
Posts: 131
Joined: Fri Dec 07, 2018 3:41 pm
Contact:

Re: [1.1.41] Crash: InventoryGuiSlot.cpp:220: No itemstack found

Post by StrangePan »

Xorimuth wrote: Wed Oct 13, 2021 12:25 am I suppose that it is (almost if not completely) impossible to trigger this bug in vanilla, hence why it hasn’t come up before now!
I was curious about that, so I rigged up a scenario in vanilla that's far more difficult to reproduce consistently, but still works:

1. place an artillery turret & load it up
2. place a vehicle (car, tank, or spidertron)
3. enter vehicle
4. target the vehicle with the artillery remote
5. move mouse to vehicle's weapon & ammo bar
6. try to trigger a tooltip the same frame the vehicle is destroyed by the incoming artillery shell

It's convoluted, and there may be easier ways to trigger this, but I was able to get the same crash in vanilla using this technique (and about 30 cars).
Xorimuth
Filter Inserter
Filter Inserter
Posts: 700
Joined: Sat Mar 02, 2019 9:39 pm
Contact:

Re: [StrangePan] [1.1.41] Crash: InventoryGuiSlot.cpp:220: No itemstack found

Post by Xorimuth »

The fix in 1.1.44 seems to work - thanks! :)
My mods
Content: Lunar Landings | Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings
StrangePan
Factorio Staff
Factorio Staff
Posts: 131
Joined: Fri Dec 07, 2018 3:41 pm
Contact:

Re: [StrangePan] [1.1.41] Crash: InventoryGuiSlot.cpp:220: No itemstack found

Post by StrangePan »

No problem, thanks for the report! I had fun with your mod too.
Post Reply

Return to “Resolved Problems and Bugs”