poxy icon indicating copy to clipboard operation
poxy copied to clipboard

Poxy (more specifically, m.css) crashes when there are many XML files

Open wroyca opened this issue 3 years ago • 7 comments

Poxy will crash if we stress it with a large project. Can be reproduced with, for example, https://github.com/GNOME/gtkmm (note that you have to build it first to generate the .cc .h files)

cc @mosra

Post-processing 1656 XML files
Generating HTML files with m.css
m.css failed!

    Traceback (most recent call last):
      File "/home/wroy/.local/lib/python3.11/site-packages/poxy/data/m.css/documentation/doxygen.py", line 4008, in <module>
        run(state, templates=os.path.abspath(args.templates), wildcard=args.wildcard, index_pages=args.index_pages, search_merge_subtrees=not args.search_no_subtree_merging, search_add_lookahead_barriers=not args.search_no_lookahead_barriers, search_merge_prefixes=not args.search_no_prefix_merging)
      File "/home/wroy/.local/lib/python3.11/site-packages/poxy/data/m.css/documentation/doxygen.py", line 3865, in run
        parsed = parse_xml(state, file)
                 ^^^^^^^^^^^^^^^^^^^^^^
      File "/home/wroy/.local/lib/python3.11/site-packages/poxy/data/m.css/documentation/doxygen.py", line 3132, in parse_xml
        func = parse_func(state, memberdef)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/wroy/.local/lib/python3.11/site-packages/poxy/data/m.css/documentation/doxygen.py", line 2058, in parse_func
        if signature.endswith('=default'):
           ^^^^^^^^^^^^^^^^^^
    AttributeError: 'NoneType' object has no attribute 'endswith'

Traceback (most recent call last):
  File "/home/wroy/.local/lib/python3.11/site-packages/poxy/main.py", line 160, in main
    run(
  File "/home/wroy/.local/lib/python3.11/site-packages/poxy/run.py", line 1269, in run
    run_python_script(
  File "/home/wroy/.local/lib/python3.11/site-packages/misk/functions.py", line 331, in run_python_script
    return subprocess.run(
           ^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/subprocess.py", line 569, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['python3', '/home/wroy/.local/lib/python3.11/site-packages/poxy/data/m.css/documentation/doxygen.py', '/tmp/poxy/home_wroy_Projects_mm_docs/conf.py', '--no-doxygen', '--sort-globbed-files']' returned non-zero exit status 1.

wroyca avatar Sep 23 '22 15:09 wroyca

Hmm, that's interesting. That error message doesn't seem to correlate with any pathological growth situations, so I wonder what the underlying cause is...

marzer avatar Sep 23 '22 23:09 marzer

@wroyca can you re-run this with --verbose and post the output?

marzer avatar Sep 26 '22 23:09 marzer

hell.txt

wroyca avatar Sep 26 '22 23:09 wroyca

Is that only stdout? The exception dumps etc will probably be on stderr.

marzer avatar Sep 27 '22 01:09 marzer

Is that only stdout? The exception dumps etc will probably be on stderr.

My bad! Assuming powershell 2> properly dump stderr, that should be it: foo.txt

wroyca avatar Sep 27 '22 01:09 wroyca

Thanks! It appears as though there's something amiss in class_cairo_1_1_context.xml; if you run poxy with --nocleanup you'll be able to grab it out of the xml directory in CWD. ~Can you post that file?~ Actually, a zip of the whole xml directory would be super

marzer avatar Sep 27 '22 02:09 marzer

Thanks! It appears as though there's something amiss in class_cairo_1_1_context.xml; if you run poxy with --nocleanup you'll be able to grab it out of the xml directory in CWD. ~Can you post that file?~ Actually, a zip of the whole xml directory would be super

Hit me up on gitter for that, it's too big ( even compressed ) for GitHub :)

wroyca avatar Sep 27 '22 02:09 wroyca

Are you able to re-run this with the new --bug-report option I've added in v0.12.0?

marzer avatar Nov 13 '22 14:11 marzer

I'm going to close this, I never had a chance to run it again and I don't have the right repository configuration to reproduce this problem anymore, do reopen it if someone manage to hit it again :)

wroyca avatar Feb 14 '23 05:02 wroyca

I'm going to close this, I never had a chance to run it again and I don't have the right repository configuration to reproduce this problem anymore, do reopen it if someone manage to hit it again :)

@marzer Of course as soon as I say that...

poxy_bug_report_2.zip

wroyca avatar Apr 07 '23 20:04 wroyca