Open kingster opened 2 years ago
Fixed by removing
doc->release();
Seems like this is not required, delete takes care of that release itself.
Before
==137388== LEAK SUMMARY:
==137388== definitely lost: 224 bytes in 1 blocks
==137388== indirectly lost: 51,988 bytes in 248 blocks
==137388== possibly lost: 395,866 bytes in 2,834 blocks
==137388== still reachable: 203,256 bytes in 1,013 blocks
==137388== suppressed: 0 bytes in 0 blocks
After
==136663== LEAK SUMMARY:
==136663== definitely lost: 0 bytes in 0 blocks
==136663== indirectly lost: 0 bytes in 0 blocks
==136663== possibly lost: 278,018 bytes in 2,826 blocks
==136663== still reachable: 203,294 bytes in 1,013 blocks
==136663== suppressed: 0 bytes in 0 blocks
possibly lost
are mostly other xercesc internal references.
Crashes on orkaudio debug
on ubuntu16.04
2022-06-30 02:01:18,439 INFO root:109 - Loaded plugin: /usr/lib/libvoip.so
Stack trace (most recent call last):
#3 Object "", at 0x6e68, in
#2 Object "", at 0x9, in
#1 Object "/lib/x86_64-linux-gnu/ld-2.23.so", at 0x7ffeef1e61df, in
#0 Source "/oreka-src/orkbasecxx/serializers/DomSerializer.cpp", line 185, in FindElementByName [0x7f0bc06d99af]
Segmentation fault (Invalid permissions for mapped object [0x9dce30])
Segmentation fault (core dumped)
Not exactly sure, but this looked like a case of shadow variable. Changing it to class reference, both resolves the leak & seg fault.
Leak Info
Attempted Fix
Throws this exception when run without debug mode