-
Notifications
You must be signed in to change notification settings - Fork 23
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
message.lua:48: attempt to index local 'message' (a nil value) #84
Comments
looks like this is happening when you reply to a mail: Line 48 in a863225
Can you inspect the inbox of the sending player? I wonder how the mod-storage entry looks like |
Unfortunately in an attempt to reproduce the issue I changed the inbox a lot - as far as I remember there was nothing special in it, but the mails were not new. They were migrated from an earlier version. May that be the cause? |
very likely, yes, not sure where to go with this, besides sprinkling nil-checks in the code... |
Is it possible to you to identify the message which causes the problem and send us the json syntax (do an |
Is it possible to add the following snippets as a mod:
local function check(name, message)
if not message then
minetest.log("error", "[mail] reply[|all] called with nil message for player: " .. name)
minetest.log("error", "[mail] current mail-context: " .. dump(mail.selected_idxs))
return false
end
return true
end
local old_reply = mail.reply
function mail.reply(name, message)
if check(name, message) then
old_reply(name, message)
end
end
local old_replyall = mail.replyall
function mail.replyall(name, message)
if check(name, message) then
old_replyall(name, message)
end
end
this will prevent further errors and tell us what is happening, i think it might be an issue with the id's from the ui |
This is what the debug mod captured:
|
fyi: i've added the patch here: 02853fc to prevent further crashes until this issue can be resolved (i still have no idea how this can happen 🤷) |
If you were in inbox, could you check at mail |
@BuckarooBanzay I understand your snippet, but id understand where implement it, could you add it yourself ? |
It is already in |
This is due to that the way to get the message in |
Pretty sure it is fixed, re-open if not. The events submission have been reworked on both pages. |
This happened with current master (a863225), however it happened by accident and I cannot reproduce it from user perspective. Maybe you have better insight in what I did.
For my reference 4383
The text was updated successfully, but these errors were encountered: