TADS Won't Compile?

Not sure what’s happening here. All my code is fine; I’ve triple-checked it, and even reversed it to the state before this error, but I keep getting this:

error: 
The object file "obj/gameMain.t3o" contains an invalid internal stream ID code.
This is an error in the object file and probably indicates that the file is
corrupted.  Delete the object file and recompile its source file.

I have deleted the file, and recompiled, but it keeps giving me this error.

Have absolutely no idea what to do.

1 Like

Okay…uh

playSFX(soundObj, attenuation?) {
    sfxPlayer.play(soundObj, attenuation);
}

I removed this top-level function, and apparently the problem is solved?

I…don’t know why this matters.

I’m happy it went away, but it really infuriates me when something gets solved, and I don’t know how it got solved. If anyone knows what this was about, then please let me know.

Thank you.

1 Like

My condolences… I’ve been there. I don’t think I know how I eventually fixed my stream Id problem either. I pitched all object files but I don’t know that even that fixed it. I seem to remember copying all the text out of one of my source files (that had the invalid stream id), pasting it into a brand-new file, pitching the guilty one and etc. Eventually I got rid of it but I don’t know that I ever knew what was going on.Never happened till I was using VSCode but that could be a coincidence…

1 Like

Maybe you could try copy pasting that source text into a new .t file, and manually type in the new play sound function. I did a bunch of crazy jazz like that and eventually it straightened out.

I mean…I am also using VSCode… Hm…

I mean, it was just a short-form function to keep stuff in line with the music function, as far as naming trends go. Idk. Really weird.

1 Like

I came away with the impression that it was the (my version of) gameMain.t file that needed to be pitched, created new and recompiled… that’s why I suggested copying the text out of it. But I could have just been believing in hocus-pocus with no real idea of what happened…

1 Like

The problem has returned.

There doesn’t seem to be any rhyme or reason to what causes the problem.

Does it help if you do an actual “clean” instead of manually deleting? With frobtads, that means running:

t3make -clean
1 Like

Nope, cleaned and recompiled, and the same thing happened.

Okay, so I uncommented this:

playSFX(soundObj, attenuation?) {
    sfxPlayer.play(soundObj, attenuation);
}

and everything works again.

I would like it known that the part I’m working on is not this function.

This is very uncomfortable. If this has to do with project complexity, then I’m a bit concerned, because I still have a lot to add. However, I feel like @johnnywz00 would have been stopped for this reason, well before I get stopped, so idk.

1 Like

So you had it fixed, and then it resurfaced because you commented the function out?

1 Like

So it happened after I implemented some more stuff to the sound effects handler. I commented out a function that I didn’t actually technically need, and the error went away. Then, when I was adding properties to some classes in my sound bleed subsystem, the error returned. I couldn’t actually comment out anything or remove anything else, so I uncommented the neatness function I had commented out before, and the error went away again.

1 Like

So…commenting out the function solved it, and the uncommenting it solved it again.

1 Like

vscode is made in m$, so I suspect that there’s some shit inside.

Try to check these two lines with an hexadecimal editor/viewer, I will be unsurprised if there’s somewhere, “somewhat” some spurious character <20h, esp. 13h (that is the CR) alongside 12H (LF)…

Best regards from Italy,
dott. Piergiorgio.

3 Likes

Actually, this gives me an idea.

Does the charset declared in gameMain.t affect anything?

My charsets have always been us-ascii but I still had the problem…

1 Like

Mine too, but I’m wondering if that’s the issue. If my Linux does everything in UTF-8 by default, and the source code of my game is us-ascii, then I wonder if there’s a chance that some weird bytes-per-character offset problem works its way into the process. That might explain why seemingly-random edits solves the issue.

Just an intuition-based conjecture, of course.

2 Likes

agree with Joey’s conjecture. as noted, is one potentially easy to verify, with an hex viever/editor

Best regards from Italy,
dott. Piergiorgio.

1 Like

Nah. ASCII is a subset of UTF-8 (meaning ASCII is valid UTF-8.)

How is vscode configured? Try setting “Files Encoding” to UTF-8 without BOM.

2 Likes