[RESOLVED] -Memory Leak

Forum for reporting and discussing bugs with Dead of Night. Posts may be hidden, locked or password protected with no warning.

Moderator: Public Moderators

Post Reply
DoNAdmin
Site Admin
Posts: 3
Joined: Thu Oct 27, 2016 2:02 am

[RESOLVED] -Memory Leak

Post by DoNAdmin » Wed Dec 07, 2016 12:40 am

So as to provide a little indication why there's not been much new for a few weeks...

In short, there's a memory leak with writing xml files which are used for a number of the persistent things in the mud - pfiles, boards, mbanks, etc.. This is an artifact of the underlying library that we're using to provide xml functionality, which includes validation of the xml files against the document type declarations. DTD validation provides a form of assurance that malformed data won't be loaded, causing shenanigans in the operation of the mud - and I view it as an essential component of XML.

Because I'm stubborn, I've been beating my head against this problem for a few weeks. During that time I've rewritten the interface between the mud and the library entirely, and run into -different- leaks. The first was with the destructor for a DOM document not freeing all of the memory associated with the DTD. The current is that creating/setting attributes in each document. In essence, the mud writes out a set of data to a file. Before writing to the file, it creates a DOM document.

In any event, one of the design considerations of the auctioneer is that it writes out the data - in an xml format - with some regularity, and each time it leaks a small amount of memory. That memory remains allocated on the heap, but does nothing useful. The end result is that the mud needs to be regularly rebooted when it's leaking.

I should note that as is it leaks - the issue with the auctioneer is that it writes many files, and it writes them frequently.

Anyway, that's what I've been working on. It's what I'll continue working on. Once I've defeated this problem, I'll return to new features.

--Sadis

Vek
Posts: 4
Joined: Sat Nov 26, 2016 3:09 am

Re: Memory Leak

Post by Vek » Thu Dec 08, 2016 1:05 am

Thanks for the update! It makes me want to dive in and help. I have to keep reminding myself that I'm retired for a reason :)

DoNAdmin
Site Admin
Posts: 3
Joined: Thu Oct 27, 2016 2:02 am

Re: Memory Leak

Post by DoNAdmin » Thu Dec 08, 2016 5:52 am

XML leak squashed. Finally.

The cost is removal of the public ID portion of the doctype declaration. This does not make me happy, but I've not found a way around it (yet).

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest