25 Sep, 2012, Tyche wrote in the 21st comment:
Votes: 0
I've never used (or needed) to use Valgrind to debug programs. One of the problems in using it with ROM or any application that implements its own memory management of objects and strings, is that the majority of its "warning" and "error" messages are expected and should be ignored. Unless you understand how the application manages memory and which messages are expected, I would disable valgrind and instead concentrate on debugging with gdb.

Note that trying to fix messages issued by Valgrind by explicitly freeing constructs it warns you about can and will introduce bugs into applications that manage their own memory.
25 Sep, 2012, Rarva.Riendf wrote in the 22nd comment:
Votes: 0
Quote
I've never used (or needed) to use Valgrind to debug programs.

Then you must be the god of programmation, every big project out there use it to find the very common bug in C like memory leaks or buffer overun.

Quote
Note that trying to fix messages issued by Valgrind by explicitly freeing constructs it warns you about can and will introduce bugs into applications that manage their own memory.

I am talking about the read and write errors, those should never happen, whatever memory management system you use.
26 Sep, 2012, Tyche wrote in the 23rd comment:
Votes: 0
Davion said:
The reason this is a problem for you, is your stock memory management has been ripped out and things are actually free()'d now.

Ahhh didn't notice this. Nevermind my comment on RoM memory management as its certainly been replaced by something else.

arholly said:
wch = 0x900044f
wch_next = 0x900044f

There is something wrong in your maintenance of the linked list. A recursive delete somewhere which invalidates the wch->next iterator at the top of your loop.
Like possibly both a character and their pet being removed from the list?
26 Sep, 2012, Davion wrote in the 24th comment:
Votes: 0
I took a look at the guys codebase to fix stuff for him :). All's good. It was more of what I posted above. Destructors freeing associated objects. Eating freed carried_by, completing a quest free'd victim, target and the supporting mob. Just had to be a bit more careful with the PURGE_DATA call. There were a few other things involving the game being unable to handle a char* being NULL (rather than an empty string).
26 Sep, 2012, arholly wrote in the 25th comment:
Votes: 0
Davion said:
I took a look at the guys codebase to fix stuff for him :). All's good. It was more of what I posted above. Destructors freeing associated objects. Eating freed carried_by, completing a quest free'd victim, target and the supporting mob. Just had to be a bit more careful with the PURGE_DATA call. There were a few other things involving the game being unable to handle a char* being NULL (rather than an empty string).

And it was much appreciated.
20.0/25