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

moretrees causes Luanti to crash #49

Open
FranckFreiburger opened this issue Dec 28, 2024 · 5 comments
Open

moretrees causes Luanti to crash #49

FranckFreiburger opened this issue Dec 28, 2024 · 5 comments
Labels
invalid This doesn't seem right

Comments

@FranckFreiburger
Copy link

Hi,
I have installed moretrees yesterday and everything worked properly.
Today, I'm facing a luanti crash :

2024-12-28 11:16:25: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod 'moretrees' in callback item_OnPlace(): C:\games\luanti\bin\..\mods\xcompat/src/functions.lua:25: attempt to call field 'sapling_on_place' (a nil value)
2024-12-28 11:16:25: ERROR[Main]: stack traceback:
2024-12-28 11:16:25: ERROR[Main]:       C:\games\luanti\bin\..\mods\xcompat/src/functions.lua:25: in function 'sapling_on_place'
2024-12-28 11:16:25: ERROR[Main]:       C:\games\luanti\bin\..\mods\moretrees/node_defs.lua:448: in function <C:\games\luanti\bin\..\mods\moretrees/node_defs.lua:447>
@SwissalpS
Copy link
Contributor

SwissalpS commented Dec 28, 2024

possibly xcompat's fault? What's the game you are using?

@FranckFreiburger
Copy link
Author

  • latest mineclonia
  • mod xcompat (release 27623, found in mod.conf)

I agree, according to the stacktrace, it is probably related to xcompat

@wsor4035 wsor4035 transferred this issue from mt-mods/moretrees Dec 28, 2024
@BuckarooBanzay
Copy link
Member

BuckarooBanzay commented Dec 28, 2024

relevant code parts:

return default.sapling_on_place(
itemstack, player, pointed_thing, sapling_name, minp_relative, maxp_relative, interval
)

called from the moretrees mod here:

https://github.com/mt-mods/moretrees/blob/ac3e30ae862334ba59d3fe2e1843bb65e0e5a6b5/node_defs.lua#L448

@FranckFreiburger looks like your environment defines default somewhere, can you search your mods for anything that shims/patches that global and/or do a print(dump(default)) somewhere in the xcompat mod and report back what it is printing, thanks :)

@BuckarooBanzay BuckarooBanzay added the bug Something isn't working label Dec 28, 2024
@wsor4035
Copy link
Contributor

wsor4035 commented Dec 28, 2024

not relevant since thats only triggered if default exists, the user in question is running on mineclonia

edit: unless default is defined for some reason

@wsor4035
Copy link
Contributor

i thought per chance they might be using https://codeberg.org/cora/default_lite, but that defines the function

@BuckarooBanzay BuckarooBanzay added invalid This doesn't seem right and removed bug Something isn't working labels Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

4 participants