Puppy's Supertrim

by Puppy

Includes SE support for deleting empty chunks.

Utilities
1 year, 4 months ago
1.1
86

b Crash Report

1 year, 5 months ago

Hello,

Here is the crash report from supertrim on a SE custom modpack:

The mod Puppy's Supertrim (0.1.0) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event puppy-supertrim::on_lua_shortcut (ID 36)
puppy-supertrim/script/gui.lua:164: attempt to index local 'zone' (a nil value)
stack traceback:
puppy-supertrim/script/gui.lua:164: in function 'getZoneParentType'
puppy-supertrim/script/gui.lua:175: in function 'getZoneFullType'
puppy-supertrim/script/gui.lua:126: in function 'getZonePrintName'
puppy-supertrim/script/gui.lua:120: in function 'getSurfaceDescriptor'
puppy-supertrim/script/gui.lua:96: in function 'getSurfaceDescriptors'
puppy-supertrim/script/gui.lua:17: in function 'createWindow'
puppy-supertrim/script/gui.lua:303: in function 'toggleGui'
puppy-supertrim/control.lua:19: in function <puppy-supertrim/control.lua:14>

If you'd like anything additional please let me know!

1 year, 4 months ago

I found the issue : when you have SE along with other mods that creates surface (eg. Factorissimo, Compact Circuits, ...), then the SE function to get the zone return nil.

So a simple nil-check is required in the gui.lua file at line 120 :

local zone = remote.call('space-exploration', 'get_zone_from_surface_index', { surface_index = surface.index })
if zone ~= nil then
return { name = getZonePrintName(zone), index=surface.index }
end

1 year, 4 months ago

Found some time to make this fix, thanks for reporting!

New response