Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Hi, My program makes extensive use of irrXML, and whilst it's great, I get this problem multiple times (from Visual Leak Detector): f:\dd\vctools\crt_bld\self_x86\crt\src\mlock.c (278): PR1030.exe!_mtinitlocknum + 0x13 bytes f:\dd\vctools\crt_bld\self_x86\crt\src\stream.c (71): PR1030.exe!_getstream + 0xC bytes f:\dd\vctools\crt_bld\self_x86\crt\src\fopen.c (61): PR1030.exe!_fsopen + 0x5 bytes f:\dd\vctools\crt_bld\self_x86\crt\src\fopen.c (125): PR1030.exe!fopen + 0xF bytes c:\projects\edge\xml\irrxml.cpp (29): PR1030.exe!irr::io::CFileReadCallBack::CFileReadCallBack + 0xE bytes c:\projects\edge\xml\irrxml.cpp (89): PR1030.exe!irr::io::createIrrXMLReader + 0x4C bytes PR1030.exe is my application :) All instances of the code do this: // Load XML file ...and I get this leak as detailed above. Can anyone help? Thanks |
||||
|
Hm, I guess this is an error by the leak detector. Do a breakpoint where the file is closed, it should hit this location. |
||||
|
Yes it hits the breakpoint where the file is closed, but is there any other memory used by irrXML which is not deallocated properly? |
||||
|
I guess that's a no, then? I need to get this cleaned up, as it's causing a project to over-run. This post is interesting: http://irrlicht.sourceforge.net/forum/viewtopic.php?t=32184 In our program we read an XML file on a certain event, and after approx 160000 times (yes it's possible in real use) the system reports out of memory. |
||||
|
I've just compared the irrXML.cpp and irrXML.h in the IrrLicht engine to the one in the download (old v1.2) and it looks like there are many bug fixes. Can you please update the version for download, and/or tell me what I need to in order to update v1.2? I see a lot of function definitions have changed. For example, "IRRLICHT_API" is used a lot, and this doesn't exist in v1.2 Thanks |
||||
|
Hi, difficult to say where the memory leak happens for you, it should be easier to find it out with your sources and a debugger. But usually, irrXML doesn't have any memory leaks, also in that version available here. A lot has changed in the irrlicht embedded irrxml version, but there's not much which is really useful for people using irrxml as it is intended to be, so it probably won't be updated like that in the near future. The IRRLICHT_API is just a macro used for dll exports, and removed in the standalone version of irrxml, since it doesn't make any sense there. |
||||
|
Hi Niko Thanks for the reply. We see in the debugger a lot of reported memory leaks, exactly as reported in this thread http://irrlicht.sourceforge.net/forum/viewtopic.php?t=32184 We use irrXML extensively in our project, and I have to clean up all these errors, or I have to use another XML parser :( |
|