"Quixe run: Error: Function returned undefined value..."

Despite the text of the message, I am not asserting that this is a Quixe problem. This is just how the issue manifests.

I have a fairly complex game that sometimes crashes in Lectrote in the following way.

This fatal crash occurs after a command has been entered, but before the input can be fed into the buffer window. In this case, the command was z. While there are a lot of hyperlinks in this project, the particular problem happens with typed commands, too.

In this example, the “ordinary checking for content rule” from GEP would be the first to fire. I’m not sure if its failure to appear before the crash means that it had a problem, or if it never starts in the first place.

I wish I could be more specific. I can’t produce the problem on demand. Once the specific condition is produced, IE, in a saved game, I can repeat the actions and it will happen again, but I cannot start a new game and reliably produce it.

Does anyone have any suggestions re: things to check out or experiment?

I don’t know if it helps, but you could try to open the Developer Tools in Lectrote under the menu “Window → Toggle Developer Tools”, and then in the tools, switch to the “Console” tab. That might reveal more about the error.

I’ve pasted the console output below for reference. I don’t understand it, though.

console details
C:\Users\crank\Downloads\Lectrote-1.5.6-win32-x64\resources\app\quixe\lib\elkote.min.js:243 GiLoad: trying pre-loaded load (array)...
C:\Users\crank\Downloads\Lectrote-1.5.6-win32-x64\resources\app\quixe\lib\elkote.min.js:243 Transcript recording active: session b2cf12ea-68ce-4cec-80af-4e6098277b84 "ID;MO", destination (custom handler)
C:\Users\crank\Downloads\Lectrote-1.5.6-win32-x64\resources\app\quixe\lib\quixe.min.js:25 Found autosave...
C:\Users\crank\Downloads\Lectrote-1.5.6-win32-x64\resources\app\quixe\lib\elkote.min.js:243 Transcript recording restored: session c0de009c-b1d3-453f-9ae1-4e0bcd09185f "ID;MO", destination (custom handler)
C:\Users\crank\Downloads\Lectrote-1.5.6-win32-x64\resources\app\quixe\lib\quixe.min.js:25 event executed in 0 ms
C:\Users\crank\Downloads\Lectrote-1.5.6-win32-x64\resources\app\quixe\lib\quixe.min.js:25 event executed in 166 ms
C:\Users\crank\Downloads\Lectrote-1.5.6-win32-x64\resources\app\quixe\lib\quixe.min.js:25 event executed in 89 ms
C:\Users\crank\Downloads\Lectrote-1.5.6-win32-x64\resources\app\quixe\lib\quixe.min.js:25 Function returned undefined value.
C:\Users\crank\Downloads\Lectrote-1.5.6-win32-x64\resources\app\quixe\lib\quixe.min.js:25 JS stack dump B:
Error: Function returned undefined value.
    at fatal_error (C:\Users\crank\Downloads\Lectrote-1.5.6-win32-x64\resources\app\quixe\lib\quixe.min.js:106:17)
    at Object.pop_callstub (C:\Users\crank\Downloads\Lectrote-1.5.6-win32-x64\resources\app\quixe\lib\quixe.min.js:426:1)
    at eval (eval at make_code (C:\Users\crank\Downloads\Lectrote-1.5.6-win32-x64\resources\app\quixe\lib\quixe.min.js:109:6), <anonymous>:8:6)
    at execute_loop (C:\Users\crank\Downloads\Lectrote-1.5.6-win32-x64\resources\app\quixe\lib\quixe.min.js:872:28)
    at Object.quixe_resume [as resume] (C:\Users\crank\Downloads\Lectrote-1.5.6-win32-x64\resources\app\quixe\lib\quixe.min.js:13:73)
    at handle_line_input (C:\Users\crank\Downloads\Lectrote-1.5.6-win32-x64\resources\app\quixe\lib\elkote.min.js:698:61)
    at Object.accept_ui_event [as accept] (C:\Users\crank\Downloads\Lectrote-1.5.6-win32-x64\resources\app\quixe\lib\elkote.min.js:636:311)
    at send_response (C:\Users\crank\Downloads\Lectrote-1.5.6-win32-x64\resources\app\quixe\lib\elkote.min.js:315:16)
    at submit_line_input (C:\Users\crank\Downloads\Lectrote-1.5.6-win32-x64\resources\app\quixe\lib\elkote.min.js:297:1)
    at HTMLInputElement.evhan_input_keypress (C:\Users\crank\Downloads\Lectrote-1.5.6-win32-x64\resources\app\quixe\lib\elkote.min.js:421:13)
C:\Users\crank\Downloads\Lectrote-1.5.6-win32-x64\resources\app\quixe\lib\quixe.min.js:25 VM stack dump: (anonymous), (anonymous), 0x97214, 0x17293, 0xa74c6, 0xa8249, 0xa82b6, 0x97214, 0x17c7b, 0x22348, 0x97214, 0x185cf, 0x709ce, 0x70a24, 0xaef89, 0xa7bd2, 0xa8249, 0xa82b6, 0x97214, 0x17c7b, 0xa438f, 0x4763c, 0xa8cf2, 0x97214, 0x1807c, 0x22512, 0x97214, 0x47504, 0x7000e, 0x97214, 0x4f942, 0x5e0f5, 0x97214, 0x4fd22, 0x5f100, 0x5f143, 0x7943c, 0x98f92, 0x97c72, 0x97994

The traceback doesn’t tell you anything useful.

This is a bug in Quixe. It shouldn’t be possible even for a buggy game file. Mind you, the bug was probably triggered by a bug in your game file.

If you send me the game file and a save file that demonstrates it, I can try adding more debugging output. Really, it would be helpful to have the gameinfo.dbg from that compile – I realize that’s enormous and you might not have it any more.

That seems probable. I get a clean example together and send.

I’ll try to get a gameinfo.dbg file if I can. I typically use the IDE compiler, but I’ll give it a shot. Thanks!

(If someone has advice on producing the desired compile debugging information, I’d be glad to hear it)

After a compile, look in the game.project/Build folder. You will see auto.inf, output.ulx, and gameinfo.dbg. All three will be useful.

Hrm. since this is a roguelike using autosaves, I had to manipulate things before I could pass the project along. However, the problem is now stubbornly refusing to appear. Some people will be testing this week. I’ll hang onto everything and will share what I have if we can get it to pop.