Gerold55 / laptop

Introducing the MineTest Laptop Mod
Other
26 stars 14 forks source link

Printer causing segmentation fault #130

Open morlanius opened 6 years ago

morlanius commented 6 years ago

I'm using a git version as of today, when putting paper in the printer it causes the server to segmentation fault with nothing in the debug log, it just halts.

bell07 commented 6 years ago

Which Minetest version? Windows or Linux? Which build? In case of Linux: Any messages in console if you run the Minetest from command line?

morlanius commented 6 years ago

build 0.4.16 running on linux, nothing in console except "segmentation fault" and nothing in the log.

looks like its something to do with the itemstack for the paper it behaves strangely, duplicates the paper then crashes.

bell07 commented 6 years ago

Please try 'minetest --verbose' or 'minetest --trace' if you see more informations about what happens. Please try also to upgrade to current stable 0.4.17.1

morlanius commented 6 years ago

I can't upgrade to 4.17 just yet the build is having problems and not letting clients connect. I enabled trace and nothing, you can just see the data packets being send and then a seg. fault.

It seems to be something with the input methods to the printer. This is what happens exactly.

I have tried variations of this and they all lead to the seg. fault. If i put the ink in first, paper in, leave the stack in the slot and switch between paper and ink buttons does nothing unless they have been inserted twice already.

If this was an issue in a C or java program I would suggest that the contents of the item slot is being dereferenced somewhere, I don't know about this environment though.

morlanius commented 6 years ago

Just logged in and tested something else, with the paper value at 99 (having had paper in there, took out and put back in again) then the server rebooted. So, I log in and the paper value is already at 99, I put ink in there and nothing happens, I take it out and put it back in and seg fault.

so something screwy is up with the way its counting up paper, and theres something in the equivalent routine for the ink thats causing he crash.