• lord2.js line 1033: REF Error @datasave passed invalid rec parameter a

    From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Mon Oct 16 18:55:45 2023
    https://gitlab.synchro.net/main/sbbs/-/issues/392#note_4342

    Again:
    `term Node 13 <No-Name> Mon Oct 16 2023 18:47:51 GMT-0700 (PDT), Node 13 /sbbs/xtrn/lord2/cnw/lord2.js line 1033: REF Error @datasave passed invalid rec parameter at npcname.ref:211`
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Tue Jan 2 18:55:38 2024
    https://gitlab.synchro.net/main/sbbs/-/issues/392#note_4653

    Same error just logged:
    ```
    lord2.js line 1033: REF Error @datasave passed invalid rec parameter at npcname.ref:211
    ```
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Sun Jan 14 17:50:37 2024
    https://gitlab.synchro.net/main/sbbs/-/issues/392#note_4673

    A couple more lord2.js errors today:
    ```
    Sun Jan 14 2024 05:49 pm vert.synchro.net ERROR occurred:
    term Node 2 <Gandolf> Sun Jan 14 2024 17:49:09 GMT-0800 (Pacific Standard Time),
    Node 2 s:\sbbs\xtrn\lord2\cnw\l2lib.js line 1112: REF Error Invalid integer (s3
    2): NaN at npcwed.ref:16

    Sun Jan 14 2024 05:49 pm vert.synchro.net ERROR occurred:
    term Node 2 <Gandolf> Sun Jan 14 2024 17:49:14 GMT-0800 (Pacific Standard Time),
    Node 2 s:\sbbs\xtrn\lord2\cnw\lord2.js line 1033: REF Error @datasave passed in
    valid rec parameter at npcname.ref:211
    ```
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Sat Feb 10 13:39:27 2024
    https://gitlab.synchro.net/main/sbbs/-/issues/392#note_4793

    Here are more occurrences (always seem to come in pairs):
    ```
    term Node 1 <David Murray> Wed Feb 07 2024 17:31:55 GMT-0800 (Pacific Standard Time), Node 1 s:\sbbs\xtrn\lord2\cnw\l2lib.js line 1112: REF Error Invalid integer (s32): NaN at npcwed.ref:16
    term Node 1 <David Murray> Wed Feb 07 2024 17:31:58 GMT-0800 (Pacific Standard Time), Node 1 s:\sbbs\xtrn\lord2\cnw\lord2.js line 1033: REF Error @datasave passed invalid rec parameter at npcname.ref:211
    term Node 6 <Markandpreston> Sat Feb 10 2024 10:38:24 GMT-0800 (Pacific Standard Time), Node 6 s:\sbbs\xtrn\lord2\cnw\l2lib.js line 1112: REF Error Invalid integer (s32): NaN at npcwed.ref:16
    term Node 6 <Markandpreston> Sat Feb 10 2024 10:38:26 GMT-0800 (Pacific Standard Time), Node 6 s:\sbbs\xtrn\lord2\cnw\lord2.js line 1033: REF Error @datasave passed invalid rec parameter at npcname.ref:211
    ```
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Tue Jun 18 18:40:14 2024
    https://gitlab.synchro.net/main/sbbs/-/issues/392#note_5373

    Yup, still happening:
    ```
    Tue Jun 18 2024 05:37 pm vert.synchro.net ERROR occurred:
    term Node 3 <Srknight> Tue Jun 18 2024 17:37:32 GMT-0700 (Pacific Daylight Time)
    , Node 3 s:\sbbs\xtrn\lord2\cnw\l2lib.js line 1112: REF Error Invalid integer (s32): NaN at npcwed.ref:16 Tue Jun 18 2024 05:37 pm vert.synchro.net ERROR occurred:
    term Node 3 <Srknight> Tue Jun 18 2024 17:37:38 GMT-0700 (Pacific Daylight Time)
    , Node 3 s:\sbbs\xtrn\lord2\cnw\lord2.js line 1033: REF Error @datasave passed invalid rec parameter at npcname.ref:211
    ```
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Fri Aug 9 11:46:04 2024
    https://gitlab.synchro.net/main/sbbs/-/issues/392#note_5506

    And another instance of this same set of errors:

    ```
    Fri Aug 09 2024 02:42 am cvs.synchro.net ERROR occurred: term Node 11 <Rixter> Fri Aug 09 2024 02:42:53 GMT-0700 (PDT), Node 11 /sbbs/xtrn/lord2/cnw/l2lib.js line 1112: REF Error Invalid integer (s32): NaN at npcwed.ref:16
    Fri Aug 09 2024 02:42 am cvs.synchro.net ERROR occurred: term Node 11 <Rixter> Fri Aug 09 2024 02:42:53 GMT-0700 (PDT), Node 11 /sbbs/xtrn/lord2/cnw/lord2.js line 1033: REF Error @datasave passed invalid rec parameter at npcname.ref:211
    ```
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Sat Mar 22 20:18:46 2025
    https://gitlab.synchro.net/main/sbbs/-/issues/392#note_6775

    Yup, this still a problem:

    ```
    Sat Mar 22 2025 08:15 pm vert.synchro.net ERROR occurred:
    term Node 1 <Digital Man> Sat Mar 22 2025 20:15:34 GMT-0700 (Pacific Daylight Ti
    me), Node 1 s:\sbbs\xtrn\lord2\cnw\lord2.js line 1033: REF Error @datasave passe
    d invalid rec parameter at npcname.ref:211
    Sat Mar 22 2025 08:15 pm vert.synchro.net ERROR occurred:
    term Node 1 <Digital Man> Sat Mar 22 2025 20:15:43 GMT-0700 (Pacific Daylight Ti
    me), Node 1 s:\sbbs\xtrn\lord2\cnw\lord2.js line 1033: REF Error @datasave passe
    d invalid rec parameter at npcname.ref:211
    ```
    --- SBBSecho 3.24-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to GitLab note in main/sbbs on Sat Mar 22 20:42:56 2025
    https://gitlab.synchro.net/main/sbbs/-/issues/392#note_6776

    So it looked like it happened to you this time, where were you doing when the errors occurred? Does it happen right after the door launches, or maybe right before it exits?
    --- SBBSecho 3.24-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Sat Mar 22 21:31:52 2025
    https://gitlab.synchro.net/main/sbbs/-/issues/392#note_6777

    I had just created the character for a new "install" of lord2.js CNW, so it was long after the door launched but before getting to the playable map.
    --- SBBSecho 3.24-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Sat Mar 22 21:36:14 2025
    https://gitlab.synchro.net/main/sbbs/-/issues/392#note_6778

    It does only appear to happen with the CNW instance.
    --- SBBSecho 3.24-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to GitLab note in main/sbbs on Sun Mar 23 11:09:28 2025
    https://gitlab.synchro.net/main/sbbs/-/issues/392#note_6780

    Sounds like npcname is being called before addchar then. This would likely be from the newplayer function in gametxt.ref.
    --- SBBSecho 3.24-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to GitLab note in main/sbbs on Sun Mar 23 11:24:30 2025
    https://gitlab.synchro.net/main/sbbs/-/issues/392#note_6781

    Sorry, the function in npcname is getname.
    --- SBBSecho 3.24-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to GitLab note in main/sbbs on Sun Mar 23 11:57:32 2025
    https://gitlab.synchro.net/main/sbbs/-/issues/392#note_6782

    It looks like this may be the NPC maintenance running... which means there's at least a bug in CNW, and possibly disagreements between lord2.js and lord2.exe.

    The possibly disagreement is if the player data is loaded before or after the new day, and what the value of playernum is if the new day happens first.

    The bug(s) in CNW is that whatever the player number happens to be when maint runs is marked as having seen all active npcs that day. For a new player, since they don't yet have a player number, that's likely what's triggering the error.
    --- SBBSecho 3.24-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Sun Mar 23 21:12:42 2025
    https://gitlab.synchro.net/main/sbbs/-/issues/392#note_6785

    Now I can run CNW at all, getting this error:
    `!JavaScript recordfile.js line 432: TypeError: this.locks is undefined`

    Any ideas?
    --- SBBSecho 3.24-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to GitLab note in main/sbbs on Sun Mar 23 23:50:24 2025
    https://gitlab.synchro.net/main/sbbs/-/issues/392#note_6787

    Not really... can you get a backtrace using the debugger? When does the error occur? Is there any output at all?
    --- SBBSecho 3.24-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Sun Mar 23 23:59:40 2025
    https://gitlab.synchro.net/main/sbbs/-/issues/392#note_6788

    That is the only output from the script (nothing before or after). I'm it running directly from the BBS, as door, so no, there's no JS debugger available.
    --- SBBSecho 3.24-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to GitLab note in main/sbbs on Mon Mar 24 00:04:10 2025
    https://gitlab.synchro.net/main/sbbs/-/issues/392#note_6789

    Can you try running it from jsexec? `jsexec lord2.js -d </path/to/dropfile> -l` does it still happen?
    --- SBBSecho 3.24-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Mon Mar 24 00:38:12 2025
    https://gitlab.synchro.net/main/sbbs/-/issues/392#note_6790

    Which drop file format is expected? Is this usage documented somewhere?

    Running from a shell using jsexec, it did not give the same error, I saw the CNW splash screen and then it just dumped me out with "You are lulled to sleep by a gentle breeze", "Come back soon" - something like that.
    --- SBBSecho 3.24-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to GitLab note in main/sbbs on Mon Mar 24 00:58:55 2025
    https://gitlab.synchro.net/main/sbbs/-/issues/392#note_6791

    I don't know, I remember the LORD2 docs being pretty chaotic... but pretty sure door.sys will work.

    The "lulled to sleep" means your out of time on the BBS.
    --- SBBSecho 3.24-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to GitLab note in main/sbbs on Mon Mar 24 01:02:43 2025
    https://gitlab.synchro.net/main/sbbs/-/issues/392#note_6792

    dorkit calculates time left from the file time of the dropfile less the time left in the drop file, so if you're using an old door.sys, that would be why... just touch it and you should be good.
    --- SBBSecho 3.24-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Mon Mar 24 01:24:30 2025
    https://gitlab.synchro.net/main/sbbs/-/issues/392#note_6793

    If I don't run it from my new Samba server/share, I don't get the `this.locks is undefined` error, so I think it's something on my end with symlinks or permissions. I'll figure it out.
    --- SBBSecho 3.24-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Mon Mar 24 14:30:09 2025
    https://gitlab.synchro.net/main/sbbs/-/issues/392#note_6795

    Your latest change does provide more detail:
    ```
    3 │ LORD2 Complete New World
    4 │ LORD2 DOS
    5 │ Trade Wars 2
    6 │ The Beast's Domain
    7 │ Global War
    8 │ Trade Wars 2002
    9 │ Trade Wars GameServer
    10 │ Galactic Dynasty
    11 │ Barren Realms Elite
    12 │ LORE
    13 │ Adventure
    14 │ Legion

    Which or Quit: 3
    !JavaScript recordfile.js line 74: Error: Failed to open file /sbbs/xtrn/lord2/cnw/trader.dat
    ```

    But the file exists:
    ```
    $ ll /sbbs/xtrn/lord2/cnw/trader.dat
    -rwxrwxrwx 1 sbbs sbbs 2386 Mar 24 14:24 /sbbs/xtrn/lord2/cnw/trader.dat
    ```

    There are symlinks in that path (on the Samba server), but I'm not sure why that'd matter since the file is readable using the specified path.
    --- SBBSecho 3.24-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Mon Mar 24 14:35:58 2025
    https://gitlab.synchro.net/main/sbbs/-/issues/392#note_6796

    I added more detail to that error exception and it does appear to be a permission issue:
    `!JavaScript recordfile.js line 74: Error: 13 (Permission denied) opening '/sbbs/xtrn/lord2/cnw/trader.dat'`
    --- SBBSecho 3.24-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Mon Mar 24 16:25:08 2025
    https://gitlab.synchro.net/main/sbbs/-/issues/392#note_6797

    Ah, big clue, if I open for in "rb" mode, no problem, it's "rb+" that fails, so must just be lacking write permission somewhere.
    --- SBBSecho 3.24-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Mon Mar 24 16:31:58 2025
    https://gitlab.synchro.net/main/sbbs/-/issues/392#note_6798

    Okay, so this appears to have been the issue:

    from the BBS host (git.synchro.net):
    ```
    -rwxrwxrwx 1 sbbs sbbs 2386 Mar 24 14:24 trader.dat
    ```

    Same file, on the Samba server:
    ```
    -rw-r--r-- 1 rswindell rswindell 2386 Mar 24 14:24 trader.dat
    ```

    The bbs runs as 'sbbs' and 'sbbs' is in the 'rswindell' group, so a 'chmod a+w *' fixed that up.
    --- SBBSecho 3.24-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Mon Mar 24 17:00:21 2025
    https://gitlab.synchro.net/main/sbbs/-/issues/392#note_6799

    I solved the stat/ls info mismatch (between client and server) with the following smb.conf change:
    ```
    store dos attributes = no
    map readonly = Permissions
    ```
    Just an FYI.
    --- SBBSecho 3.24-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to GitLab note in main/sbbs on Tue Mar 25 07:27:11 2025
    https://gitlab.synchro.net/main/sbbs/-/issues/392#note_6804

    Closing issue, feel free to reopen if you see it again.
    --- SBBSecho 3.24-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to GitLab issue in main/sbbs on Tue Mar 25 07:27:12 2025
    close https://gitlab.synchro.net/main/sbbs/-/issues/392
    --- SBBSecho 3.24-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)