Welcome to the Builder Academy

Question SYSERR: simple_list() forced to reset itself.

More
Yesterday 16:51 #10777 by Salty
Greetings,

I'm using a modified tbaMUD 2018.  I know this topic has been covered here  before a few years back.  I implemented Thomas'  fix  for the errors I was getting from perform_violence() in fight.c and that worked wonderfully.  This fix worked in other instances of the error as well.

However, I still have an error that I can't figure out, and I've narrowed it down to char_has_mud_event() from mud_event.c
The code for char_has_mud_event() in my 2018 version is the same as the 2025 version on github. (other than my adding a mudlog for debugging)
Code:
struct mud_event_data *char_has_mud_event(struct char_data *ch, event_id iId) {   struct event *pEvent;   struct mud_event_data *pMudEvent = NULL;   bool found = FALSE;   if (ch->events == NULL)     return NULL;   if (ch->events->iSize == 0)     return NULL;   clear_simple_list();   while ((pEvent = (struct event *)simple_list(ch->events)) != NULL)   {     mudlog(CMP, LVL_GRGOD, TRUE, "char_has_mud_event.");     if (!pEvent->isMudEvent)       continue;     pMudEvent = (struct mud_event_data *)pEvent->event_obj;     if (pMudEvent->iId == iId)     {       found = TRUE;       break;     }   }   if (found)     return (pMudEvent);   return NULL; }


I tried to implement the same fix as Thomas provided but that didn't work.  The fix Fizban provided did not work as well.

I know this isn't gamebreaking and simple_list works after the reset, it's not even really annoying.  However, I've spent more than a few hours trying to puzzle this out and it's time to ask for help.

Thoughts?

Salty

Please Log in or Create an account to join the conversation.

More
Yesterday 19:48 #10778 by thomas
This is strange, since the code in question actually calls clear_simple_list(), as it should.
I expect this is a follow-on error from somewhere else in the code.

To make sure, try running your code through a debugger, or dump the core when it happens.
Code:
  if (!loop || pLastList != pList) {     if (loop && pLastList != pList) {       mudlog(CMP, LVL_GRGOD, TRUE, "SYSERR: simple_list() forced to reset itself.");   core_dump(); }     pContent = merge_iterator(&Iterator, pList);

Please Log in or Create an account to join the conversation.

Time to create page: 0.190 seconds