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

    From Rob Swindell@1:103/705 to GitLab issue in main/sbbs on Saturday, April 09, 2022 21:33:28
    open https://gitlab.synchro.net/main/sbbs/-/issues/392

    Error has occurred 23 times on Vertrauen since April of 2021.
    --- SBBSecho 3.15-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to GitLab note in main/sbbs on Sunday, April 10, 2022 12:13:50
    https://gitlab.synchro.net/main/sbbs/-/issues/392#note_2532

    Sounds like it's trying to do something when there's no current player record... do you have a way to reproduce it? Does it happen right after the door launches, or maybe right before it exits?
    --- SBBSecho 3.15-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Sunday, April 10, 2022 12:36:19
    https://gitlab.synchro.net/main/sbbs/-/issues/392#note_2533

    I don't know how to recreate it as the errors are just showing up while users are playing lord2.js CNW:Here's the relevant log entries from yesterday:```4/9 07:07:34p Node 2 <styles> running external program: LORD2 Complete New World4/9 07:07:51p Node 2 <styles> Sat Apr 09 2022 19:07:50 GMT-0700 (Pacific Daylight Time), Node 2 s:\sbbs\xtrn\lord2\cnw\lord2.js line 1033: REF Error @datasave passed invalid rec parameter at npcname.ref:2114/9 07:12:25p Node 2 <styles> running external program: LORD2```So it looks to me like it occurred after 17 seconds after they started running the game. I don't know if they were already exiting at the time or not. It's happened to several different users, so it's not always the user user.
    --- SBBSecho 3.15-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Wednesday, April 13, 2022 21:02:18
    https://gitlab.synchro.net/main/sbbs/-/issues/392#note_2545

    term Node 3 <Phantomrage> Wed Apr 13 2022 20:55:10 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.15-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Monday, October 16, 2023 18:55:45
    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 Tuesday, January 02, 2024 18:55:38
    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 Sunday, January 14, 2024 17:50:37
    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 Saturday, February 10, 2024 13:39:27
    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 Tuesday, June 18, 2024 18:40:14
    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 Friday, August 09, 2024 11:46:04
    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 Saturday, March 22, 2025 20:18:46
    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 Saturday, March 22, 2025 20:42:56
    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 Saturday, March 22, 2025 21:31:52
    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 Saturday, March 22, 2025 21:36:14
    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 Sunday, March 23, 2025 11:09:28
    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 Sunday, March 23, 2025 11:24:30
    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 Sunday, March 23, 2025 11:57:32
    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 Sunday, March 23, 2025 21:12:42
    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 Sunday, March 23, 2025 23:50:24
    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 Sunday, March 23, 2025 23:59:40
    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 Monday, March 24, 2025 00:04:10
    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 Monday, March 24, 2025 00:38:12
    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 Monday, March 24, 2025 00:58:55
    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 Monday, March 24, 2025 01:02:43
    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 Monday, March 24, 2025 01:24:30
    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 Monday, March 24, 2025 14:30:09
    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 Monday, March 24, 2025 14:35:58
    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 Monday, March 24, 2025 16:25:08
    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 Monday, March 24, 2025 16:31:58
    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 Monday, March 24, 2025 17:00:21
    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 Tuesday, March 25, 2025 07:27:11
    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 Tuesday, March 25, 2025 07:27:12
    close https://gitlab.synchro.net/main/sbbs/-/issues/392
    --- SBBSecho 3.24-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)