vovkos / doxyrest

A compiler from Doxygen XML to reStructuredText -- hence, the name. It parses XML databases generated by Doxygen and produces reStructuredText for the Python documentation generator Sphinx.
MIT License
306 stars 23 forks source link

doxyres crashes, presumably due to missing refid #10

Closed dgront closed 5 years ago

dgront commented 6 years ago

My doxyrest run on Mac OS ends wtih (that is just last 5 lines):

warning: can't find inner compound refid: d0/d0f/classstd_1_1wostringstream
warning: can't find inner compound refid: d3/d05/classstd_1_1wstring
warning: can't find inner compound refid: d0/d29/classstd_1_1wstringstream
generating...
Segmentation fault: 11

When I try id under lldb, I see that:

warning: can't find inner compound refid: d0/d0f/classstd_1_1wostringstream
warning: can't find inner compound refid: d3/d05/classstd_1_1wstring
warning: can't find inner compound refid: d0/d29/classstd_1_1wstringstream
generating...
Process 10658 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    frame #0: 0x0000000100066da0 doxyrest`axl::io::ensureDirExists(axl::sl::StringRefBase<char, axl::sl::StringDetailsBase<char> > const&) + 144
doxyrest`axl::io::ensureDirExists:
->  0x100066da0 <+144>: movzbl 0x1(%rbx), %eax
    0x100066da4 <+148>: incq   %rbx
    0x100066da7 <+151>: cmpb   $0x2f, %al
    0x100066da9 <+153>: je     0x100066da0               ; <+144>
Target 0: (doxyrest) stopped.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
  * frame #0: 0x0000000100066da0 doxyrest`axl::io::ensureDirExists(axl::sl::StringRefBase<char, axl::sl::StringDetailsBase<char> > const&) + 144
    frame #1: 0x0000000100018a2b doxyrest`Generator::generate(axl::sl::StringRefBase<char, axl::sl::StringDetailsBase<char> > const&, axl::sl::StringRefBase<char, axl::sl::StringDetailsBase<char> > const&) + 155
    frame #2: 0x0000000100001fec doxyrest`run(CmdLine*) + 572
    frame #3: 0x0000000100002569 doxyrest`main + 793
    frame #4: 0x00007fff7d55c015 libdyld.dylib`start + 1
(lldb) f 0
frame #0: 0x0000000100066da0 doxyrest`axl::io::ensureDirExists(axl::sl::StringRefBase<char, axl::sl::StringDetailsBase<char> > const&) + 144
doxyrest`axl::io::ensureDirExists:

I understand the problem comes from the missing nodes (e.g. d0/d29/classstd_1_1wstringstream), but in fact I'm absolutely interested in them. All the missing nodes concern standard C++ libary which I'm not willing to document. Can doxyrest just go over this errors?

vovkos commented 6 years ago

Did you build Doxyrest from the latest sources or used the precompiled release v1.1.1? The call stack leads to the location where a bug in the support lib was causing crashes in Doxyrest under certain (usually, invalid or misspelled) command line options. The bug was fixed a while ago, but the binaries for Doxyrest have not been re-released after that.

I have just pushed a tag to re-build the GitHub release with patched support lib (if it passes all tests, Travis CI/Appveyor CI should upload binaries soon).

Meanwhile, one question -- what's the exact command line which leads to a crash?

vovkos commented 6 years ago

Also, the above warnings may be safely ignored, the segfault has no connection to those.

dgront commented 5 years ago

OK, so after a few quick tests I learned that "-o" command line flag was mandatory; it was crashing because I didn't use it.

vovkos commented 5 years ago

It shouldn't crash even if -o is omitted. Crash due to wrong/missing paths was fixed quite a while ago. There still was a problem -- doxyrest attempted to generate the output .rst files in the root directory whenever -o was omitted. The latest commit fd01477 should take care of that, too