Diagnosing thread crashes - Mozilla

This is a discussion on Diagnosing thread crashes - Mozilla ; I'm currently working on a part of my extension that uses threads. Every once in a while I'm getting a crash in the middle of a long process. Firefox just quits. I assume somewhere along the lines I'm doing something ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Diagnosing thread crashes

  1. Diagnosing thread crashes

    I'm currently working on a part of my extension that uses threads.

    Every once in a while I'm getting a crash in the middle of a long
    process. Firefox just quits. I assume somewhere along the lines I'm
    doing something that is not threadsafe but I'm find it near impossible
    to track the point of the problem down (since it seems to occur at
    random).

    What is the best method for discovering the source of a crash in
    Firefox? Is it possible to add a breakpoint with Venkman before
    Firefox closes?

  2. Re: Diagnosing thread crashes

    One thought, is if I could log dump() to a file (not just the console
    window), then I could at least add a bunch of dumps and then look at
    where the log ended.

    Is that possible?

  3. Re: Diagnosing thread crashes

    > Please be specific: what API are you calling? Generally there is no
    > thread support for extensions.


    Using the threads as described here:
    https://developer.mozilla.org/en/The_Thread_Manager



    > > Every once in a while I'm getting a crash in the middle of a long
    > > process. *Firefox just quits. *I assume somewhere along the lines I'm
    > > doing something that is not threadsafe but I'm find it near impossible
    > > to track the point of the problem down (since it seems to occur at
    > > random).

    >
    > Do you get a crash-reporter dialog? If yes, use about:crashes to get the
    > URL.


    I do get a crash reporter dialog, didn't know about about:crashes,
    I'll take a look at that.


    >
    > If the crash is not reproducible, then the usual reason is bad memory
    > pointers found during garbage collection.


    It is reproducible in that it happens during a specific process.
    However, that process is involved/long so it's hard to tell exactly
    where along that process it's happening.



    > Venkman is not threadsafe.


    Good to know


    Thanks for your help!

  4. Re: Diagnosing thread crashes

    Using the about:crashes page (thanks for that!), here is one of the
    reports:
    http://crash-stats.mozilla.com/repor...0562090925?p=1

    Looks like it crashes on the xul.dll module, does that mean something
    tried to access the UI from inside a thread?

    It doesn't seem to mention however if that thread was the main thread
    or an actual thread.

+ Reply to Thread