Up to Main Index Up to Journal for July, 2020 JOURNAL FOR SUNDAY 19TH JULY, 2020 ______________________________________________________________________________ SUBJECT: Some progress at last! DATE: Sun 19 Jul 20:46:26 BST 2020 After posting yesterday’s journal entry I went debugging after the latest server panic. Only the panic was caused by trying to Dump the information of a Thing with corrupted attributes :( I’ve now added some recovery code to the Thing.Dump method so that it will always pull out as much information it can without falling over. This is valuable information as I can now see partial/broken Things that can provide vital clues as to what is going wrong. I set the server running again at 7:50pm and only had to wait until 9:40pm for another nil panic. The log wasn’t too bad — 4Mb with 50,000 lines, so I started analysing it… Around 3:30am I finally found my smoking gun and could reliably reproduce the nil pointer panic. All of my efforts to improve debugging in WolfMUD had finally paid off. Now some people have asked, if the problem is a nil pointer, why do I not add a test for ‘if x == nil’ and just handle it? I could do that, but it would just be papering over the issue — I know that the pointer should not be nil and wanted to find the root cause and fix the issues. The issue in this case is a complex interaction of item resets, duplication of items and unique/non-spawnable items. A simple solution, in this case, would be to get rid of unique/non-spawnable items. This is a feature WolfMUD has always had and I would be very sad to remove it. I can remember many a time on the Java server players running around trying to find out who had a specific, unique item and asking other players if they had it or had seen it. Quite often whoever had the item didn’t know what it was for and would say something like “I have it, you can have it if you show me how to use it”, or something like that. It encouraged players to talk to each other. If one player was hoarding the item it sometimes encouraged other players to band together to get the item back in play for everyone. Anyway, I now know what the issue is. My previous three fixes for respawning, in-flight events and duplication are not going to work and need to be rewritten. Now I just need to work out the correct solution. I have ideas which I’ve been working through all afternoon. This has resulted in a tonne of notes that will mean nothing to anyone else, but they look cool: L∙P[-L]∙C[LL]→S[CC] => L∙P[-L]→Cⁿ[-P]→Sⁿ[-Cⁿ]∙C'[LL]→S'[C'C'] L∙P[-L]∙C[LL]→U[CC] => L∙P[-L]→Cⁿ[-P]→U[C'C']∙C'[LL] If anyone guesses what that actually means I’ll be amazed. Yes, I really do make notes like that, complete with all the Unicode, in Vim ;) -- Diddymus Up to Main Index Up to Journal for July, 2020