Skip to content
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

Segmentation fault when attempting to call minetest.clear_registered_ores #2514

Closed
Echoes91 opened this Issue Mar 18, 2015 · 7 comments

Comments

Projects
None yet
4 participants
@Echoes91
Copy link

Echoes91 commented Mar 18, 2015

The minetest.clear_registered_ores() call issued from a mod's init.lua within default minetest_game cause immediate segfault:

However calling them from inside with luacmd or with any delay results in them working as expected. This is a workaround:
minetest.after(1, function()
minetest.clear_registered_ores()
end)

@nerzhul

This comment has been minimized.

Copy link
Member

nerzhul commented Mar 19, 2015

can you give us the backtrace please

@Echoes91

This comment has been minimized.

Copy link
Author

Echoes91 commented Mar 19, 2015

Sorry, took some time to learn to debug on Arch Linux...
Actually the issue regards only minetest.clear_registered_ores(). Compiling from master branch and creating a new world with mapgen v7, default minetest_game and only one mod with just that call enabled:
Program received signal SIGSEGV, Segmentation fault.
https://bpaste.net/raw/492a2560d678

@Echoes91 Echoes91 changed the title Segmentation fault when attempting to run minetest.clear_registered_'anything' Segmentation fault when attempting to call minetest.clear_registered_ores Mar 19, 2015

@Echoes91

This comment has been minimized.

Copy link
Author

Echoes91 commented Mar 19, 2015

Corrected confusing informations, now it should be clearer

@paramat

This comment has been minimized.

Copy link
Member

paramat commented Mar 20, 2015

Confirmed. Also segfaults in mgv5 and mgv6 but not singlenode (which does not have ores registered).
Clearing biomes and decorations works normally.

@paramat paramat added High priority and removed High priority labels Mar 20, 2015

@Echoes91

This comment has been minimized.

Copy link
Author

Echoes91 commented Mar 20, 2015

Yes, it had default dependency since it defined biomes and anything else
using default's nodes. Now i quitted it since your biomesdev is exactly
what i was aiming at and it's already far better, anyway that may still
prevent any custom ores redefinition if not "delayed" with the workaround.

2015-03-20 11:23 GMT+01:00 Paramat notifications@github.com:

Did your test mod have 'default' as a dependancy? If the mod is running
before default it would be trying to clear ore registrations that don't
exist. Singlenode mapgen does not have ores registered so might also have
the same result.


Reply to this email directly or view it on GitHub
#2514 (comment).

@kwolekr

This comment has been minimized.

Copy link
Contributor

kwolekr commented Mar 20, 2015

@kwolekr kwolekr closed this Mar 20, 2015

@paramat

This comment has been minimized.

Copy link
Member

paramat commented Mar 21, 2015

Confirmed fixed by kwolekr's reverting of part of 9749d9f

@paramat paramat removed the High priority label Mar 21, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.