• Exception in Mozila JS DLL

    From Nightfox@VERT/DIGDIST to Digital Man on Mon Aug 16 08:27:29 2021
    Hi DM,

    I had Visual Studio running and had the debugger attached to the sbbsctrl process on my BBS machine so that it could hopefully point out where in the code it crashed, if it crashed. This morning I saw VS reported an exception had been thrown in mozjs185-1.0.dll. Since we don't have the debug symbols for that library, it wasn't able to show where in the code it happened.. It seemed Visual Studio was frozen, so I had to force-kill it, and Synchronet closed too. At least I know it's something with the Mozilla JS library. I'm not sure if there's a JS script I have that's doing something wrong (I've been wondering if it's one of my mods) or if there's a bug in the Mozilla JS library.

    Nightfox

    ---
    ■ Synchronet ■ Digital Distortion: digitaldistortionbbs.com
  • From Digital Man@VERT to Nightfox on Mon Aug 16 10:25:42 2021
    Re: Exception in Mozila JS DLL
    By: Nightfox to Digital Man on Mon Aug 16 2021 08:27 am

    Hi DM,

    I had Visual Studio running and had the debugger attached to the sbbsctrl process on my BBS machine so that it could hopefully point out where in the code it crashed, if it crashed. This morning I saw VS reported an exception had been thrown in mozjs185-1.0.dll. Since we don't have the debug symbols for that library, it wasn't able to show where in the code it happened.. It seemed Visual Studio was frozen, so I had to force-kill it, and Synchronet closed too. At least I know it's something with the Mozilla JS library. I'm not sure if there's a JS script I have that's doing something wrong (I've been wondering if it's one of my mods) or if there's a bug in the Mozilla JS library.

    It shouldn't be possible for a JS script to do something so wrong as to crash SBBS. Or at least, that's the goal.

    The call stack should have indicated where the JS library functions were called from within the SBBS code (and with what arguments) and that could help to determine what's at fault. Sometimes bugs in SBBS can cause a crash in the JS library, so just because its crashing in the JS library doesn't necessarily mean it is at fault.
    --
    digital man

    Synchronet "Real Fact" #12:
    Synchronet was the first BBS software to ship with built-in RIPscrip support. Norco, CA WX: 82.2°F, 52.0% humidity, 0 mph WSW wind, 0.00 inches rain/24hrs ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Nightfox@VERT/DIGDIST to Digital Man on Mon Aug 16 12:37:18 2021
    Re: Exception in Mozila JS DLL
    By: Digital Man to Nightfox on Mon Aug 16 2021 10:25 am

    out where in the code it crashed, if it crashed. This morning I saw
    VS reported an exception had been thrown in mozjs185-1.0.dll. Since
    we don't have the debug symbols for that library, it wasn't able to
    show where in the code it happened.. It seemed Visual Studio was
    frozen, so I had to force-kill it, and Synchronet closed too. At least
    I know it's something with the Mozilla JS library. I'm not sure if
    there's a JS script I have that's doing something wrong (I've been
    wondering if it's one of my mods) or if there's a bug in the Mozilla
    JS library.

    It shouldn't be possible for a JS script to do something so wrong as to crash SBBS. Or at least, that's the goal.

    The call stack should have indicated where the JS library functions were called from within the SBBS code (and with what arguments) and that could help to determine what's at fault. Sometimes bugs in SBBS can cause a crash in the JS library, so just because its crashing in the JS library doesn't necessarily mean it is at fault. --

    I got a screenshot of Visual Studio which I probably should have shared earlier. The call stack didn't seem to show much useful information though:

    https://i.imgur.com/Qb6Lewz.png

    Nightfox

    ---
    ■ Synchronet ■ Digital Distortion: digitaldistortionbbs.com
  • From Digital Man@VERT to Nightfox on Mon Aug 16 17:12:51 2021
    Re: Exception in Mozila JS DLL
    By: Nightfox to Digital Man on Mon Aug 16 2021 12:37 pm

    Re: Exception in Mozila JS DLL
    By: Digital Man to Nightfox on Mon Aug 16 2021 10:25 am

    out where in the code it crashed, if it crashed. This morning I saw
    VS reported an exception had been thrown in mozjs185-1.0.dll. Since
    we don't have the debug symbols for that library, it wasn't able to
    show where in the code it happened.. It seemed Visual Studio was
    frozen, so I had to force-kill it, and Synchronet closed too. At least
    I know it's something with the Mozilla JS library. I'm not sure if
    there's a JS script I have that's doing something wrong (I've been
    wondering if it's one of my mods) or if there's a bug in the Mozilla
    JS library.

    It shouldn't be possible for a JS script to do something so wrong as to crash SBBS. Or at least, that's the goal.

    The call stack should have indicated where the JS library functions were called from within the SBBS code (and with what arguments) and that could help to determine what's at fault. Sometimes bugs in SBBS can cause a crash in the JS library, so just because its crashing in the JS library doesn't necessarily mean it is at fault. --

    I got a screenshot of Visual Studio which I probably should have shared earlier. The call stack didn't seem to show much useful information though:

    https://i.imgur.com/Qb6Lewz.png

    Yeah, looks like maybe the callstack was corrupted. If you could build your own mozjs185-1.0.dll from source, you'd have the debug symbols and could maybe get more helpful details.

    I know Deuce has been working on a major update to sbbs to use a modern JS library, so worst case, you could just wait till that lands in the master branch and this problem probably likely goes away (to be replaced by new ones). :-)
    --
    digital man

    Sling Blade quote #17:
    Charles Bushman: A shovel just makes too goddamned much racket.
    Norco, CA WX: 86.1°F, 53.0% humidity, 12 mph NNE wind, 0.00 inches rain/24hrs ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Nightfox@VERT/DIGDIST to Digital Man on Thu Sep 2 08:34:59 2021
    Re: Exception in Mozila JS DLL
    By: Digital Man to Nightfox on Mon Aug 16 2021 05:12 pm

    I got a screenshot of Visual Studio which I probably should have
    shared earlier. The call stack didn't seem to show much useful
    information though:

    https://i.imgur.com/Qb6Lewz.png

    Yeah, looks like maybe the callstack was corrupted. If you could build your own mozjs185-1.0.dll from source, you'd have the debug symbols and could maybe get more helpful details.

    Have you ever built mozjs185-1.0.dll yourself? The source doesn't include Visual Studio project files, though it has a makefile. I tried searching online for the best way to build mozjs 1.8.5 on Windows, and found some fairly old pages mentioning things like using MozillaBuild, etc., and other people wanting to build it with Visual Studio 2019 and having difficulties.

    I tried following one page's instructions using MozillaBuild, though I still ran into issues with that. MozillaBuild has a *nix-like command prompt for Windows, and when running configure, it said it couldn't find a suitable CC executable on my system and aborted.

    At this point I've thought about trying to just create a new DLL project in Visual Studio, including all the source, and trying to build it; I haven't tried that yet though.

    I know Deuce has been working on a major update to sbbs to use a modern JS library, so worst case, you could just wait till that lands in the master branch and this problem probably likely goes away (to be replaced by new ones). :-)

    At this point I might end up waiting for that. :)

    Nightfox

    ---
    ■ Synchronet ■ Digital Distortion: digitaldistortionbbs.com
  • From Digital Man@VERT to Nightfox on Fri Sep 3 18:15:06 2021
    Re: Exception in Mozila JS DLL
    By: Nightfox to Digital Man on Thu Sep 02 2021 08:34 am

    Re: Exception in Mozila JS DLL
    By: Digital Man to Nightfox on Mon Aug 16 2021 05:12 pm

    I got a screenshot of Visual Studio which I probably should have
    shared earlier. The call stack didn't seem to show much useful
    information though:

    https://i.imgur.com/Qb6Lewz.png

    Yeah, looks like maybe the callstack was corrupted. If you could build your own mozjs185-1.0.dll from source, you'd have the debug symbols and could maybe get more helpful details.

    Have you ever built mozjs185-1.0.dll yourself?

    Yes, looks like I last built it back in October of 2011.

    The source doesn't include
    Visual Studio project files, though it has a makefile. I tried searching online for the best way to build mozjs 1.8.5 on Windows, and found some fairly old pages mentioning things like using MozillaBuild, etc.,

    Yeah, that sounds familiar (MozillaBuild).

    and other
    people wanting to build it with Visual Studio 2019 and having difficulties.

    Not surprising as anything 2019 didn't exist back in 2011. :-)

    I tried following one page's instructions using MozillaBuild, though I still ran into issues with that. MozillaBuild has a *nix-like command prompt for Windows, and when running configure, it said it couldn't find a suitable CC executable on my system and aborted.

    I did figure out ten years ago, and I don't recall it being *that* difficult, but I suppose I could be blocking out a painful memory too. :-)

    At this point I've thought about trying to just create a new DLL project in Visual Studio, including all the source, and trying to build it; I haven't tried that yet though.

    I know Deuce has been working on a major update to sbbs to use a modern JS library, so worst case, you could just wait till that lands in the master branch and this problem probably likely goes away (to be replaced by new ones). :-)

    At this point I might end up waiting for that. :)

    Might be for the best. That libmozjs source code is not very easy to trouble-shoot even when everything's compiled right with debug symbols and everything (e.g. on Linux).
    --
    digital man

    Synchronet "Real Fact" #31:
    The Synchronet IRC server (ircd) was written in JS by Randy Sommerfeld (Cyan). Norco, CA WX: 83.1°F, 45.0% humidity, 8 mph NW wind, 0.00 inches rain/24hrs
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net