-
Notifications
You must be signed in to change notification settings - Fork 28
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
Seems the inventory table is not retrieved #40
Comments
A lot of people aren't sure about the cause, including me. :( It seems that minetest api calls that should be returning tables are instead returning "nil", seemingly at random. I've been working under the assumption that this is being caused by low memory conditions; see issue #8067. I am increasingly at a loss as to what I can do in mod code to compensate for this. Perfectly innocuous function calls are failing here, all over the place. Hopefully in this case the crash didn't cause the Digtron's nodes to become corrupted? As in, when you restarted the server and tried running the Digtron again, it didn't crash again? I added some asserts last night to try guarding against bad data being written to the world's database, that's worse than simply crashing and resuming. |
I've just added a guard against this specific instance of an "impossible" nil table. It'll cause the Digtron to temporarily think it doesn't have fuel, which might interrupt its cycling and require the player to set it moving again but at least won't crash or corrupt anything. I'm playing whack-a-mole here, Digtron is a big mod with lots of other API calls where this might crop up. |
I have some additional info around this. After some update the fuel nodes in all my digtrons became broken. If I click on it it shows the formspec with no inventory at all. Removing and placing the node fixed the crash. |
Same symptoms I've been getting reports of for a year now, then, and none of my efforts to guard against it or prevent it are working. If you're using the version of Digtron I submitted last night it should have crashed before it even attempted to write a fuel node that was missing its inventory data. So maybe it's the actual write-to-world step that's failing after all, and not the read-from-world step as I'd been speculating. This is incredibly frustrating. I'm going to spend some time writing test mods to see if I can reproduce any aspect of these problems. |
Yes. I have finally been able to reproduce this bug locally, or at least one of the symptoms of the various reports I've been seeing. I'm able to get Digtrons to "lose" parts of themselves. I think I may have figured out what particular aspect of my code this is breaking in, too - it's something to do with how Digtrons detect if they're adjacent to unloaded nodes. I think I may be able to fix this in-mod after all. |
Hey, that’s not supposed to work at all. Inventories can’t be created in non-existent blocks. The problem is that MT doesn’t report that properly (it does warn, in some cases at least). See an explanation in minetest/minetest#8067. |
I've got a crash on the latest 2 commits: digtron/util.lua:193: bad argument #1 to 'pairs'
Not sure what is the cause.
The text was updated successfully, but these errors were encountered: