Skip to content

Debugging a crash #55

Open
Open

Description

@glensc

Started using this library:

but it crashes in non-debug mode, and in debug mode no errors. catching exception does not help.

how to get logs out of the problem?

In that example, crash can be avoided by not using any plex server related in section_types method

this still crashes even faulti part is catch'ed:

    @cached_property
    def section_types(self):
        try:
            self.server
        except Exception as e:
            ...
        return {}

tl;dr: crashes on macos in normal mode. does not crash under -f, does not crash under -d, and under -d no known exception is thrown.

Activity

  1. changed the title [-]Debugging an crash[/-] [+]Debugging a crash[/+] on Dec 13, 2023
  2. SimonHeimberg commented on Jul 24, 2024

    @SimonHeimberg

    You already tried -f, which often helped me. 🤔

    Suggesting some ideas:

    stdout to file

    import sys
    sys.stderr = open("~/fuse_debug.txt", "w")
    #sys.stdout = sys.stderr # maybe also normal output

    Then see if any error gets written into ~/.fuse_debug.txt

    redirect traceback

    Or a similar idea, write your own function replacing sys.get_traceback() to do custom printing, see https://docs.python.org/3/library/sys.html#sys.excepthook or http://stackoverflow.com/questions/6234405/ddg#16993115

    debugger

    Possibly the debugger can help. But I fail to get anything more useful than implementing one of the above things without changing the code. Anyway, redirect stdout: python3 -m pdb ./xxx/theCodeToDebug.py

    (pdb) !import sys
    (pdb) !sys.stderr = open("~/fuse_debug.txt", "w")
    c
    

    The debugger is left when main() is called, and I know no possibility to avoid this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions