Lectrote Debugging

Hi,

My WIP compiles with zero errors and plays as expected using Parchment but for some reason, when I try to use Lectrote, the game never loads. The spinner just spins and spins.

I have no idea what steps to take to try to resolve this issue.

I am using a Mac and VSCode. I did try to get the free VMWare Fusion up and running so I could test it on Windows but I haven’t had much luck with that. I don’t think my Intel Mac is compatible. :frowning:

Any suggestions?

Thank you in advance!
Deborah

If you select “Toggle Developer Tools” from the menu (cmd-opt-I on Mac, ctrl-opt-I on Win) then the Console tab may display useful error messages.

1 Like

Oh Thanks!

So I did find an error but I’m not sure what it means.

Looks like you’re trying to write to Gameinfo.txt but the filesystem is read only. Does that sound like anything your game is trying to do?

1 Like

I deleted GameInfo.txt from the directory. It wasn’t included in the MakeFile anyway. But the error persists.

And thanks for your help!

TADS sometimes tries to make a Game info.txt file, but I thought it was usually embedded into the storyfile instead.

https://www.tads.org/t3doc/doc/libref/source/gameinfo.t.html

You might need advice from other TADS authors as this isn’t something I’m familiar with.

3 Likes

@jbg, is this in your field?

2 Likes

GameInfo.txt is written during pre-initialization. Pre-init can happen at compilation time or at the start of a program run, depending on build flags. (See here for more info.)

Key quote from that doc:

Note that if when [sic] you compile in “debug” mode, the compiler defers preinit until you run the program normally. It does this so that you have a chance to step through the preinit process using the debugger.

So, I think the problem here is that OP is running a debug build on a read-only filesystem, and pre-init is executing at runtime before main() is even reached.

If the -pre flag is included in the game’s Makefile.t3m or t3make command-line, pre-init will run at compilation time regardless of debug/release builds.

I don’t know why this works on Parchment. Perhaps Parchment blocks/ignores all file writes?

6 Likes

Parchment (or Glk TADS) is either ignoring the write (while save/restore has been ported to Glk, I don’t know if these file functions have been), or it’s just working. No read only FS in Parchment!

2 Likes

That was indeed the issue. As soon as I removed the debug flag, the game loads fine.
Thanks Jim and everyone else for the help.

2 Likes