game_start Error [Solved]

Started by Shaneaphone, Thu 07/03/2024 13:08:25

Previous topic - Next topic

Shaneaphone

So I'm working on a new game. I'm using the Tumbleweed template.

I've gotten rid of the oCup and (I believe) deleted all reference from scripting. Worked on the game for a week, no issues.

I edited a Sound effect in Audacity and loaded it into the game and was hit with this error: https://imgur.com/DvelMjC

I didn't realise until I re-traced my steps. Made a new file, added it. No problem.

Now when I try to add an 11th inventory item with any name and under any condition I get this same error (https://imgur.com/DvelMjC) and I can't for the life of me figure out why. I only mentioned the cup earlier as I am worried I've done something to the inventory system by deleting it.

I've scanned the tumbleweed script on the lines mentioned and it looks like this:

Code: ags
   // Activate this to hide the action GUI while a dialog is active.
  CustomDialogGui.DialogGuiOptions[eDialogGui_hide_gui_while_dialog]   = true;  
  
  // Top-Left corner of the Dialog GUI
  CustomDialogGui.DialogGuiOptions[eDialogGui_gui_xpos]         = 0;
  CustomDialogGui.DialogGuiOptions[eDialogGui_gui_ypos]         = 145;

Looks pretty normal to me. Definitely haven't knowingly altered this.

Also line 257 of the template script looks like this:

Code: ags
function game_start()
{
  set_options();
  String tr_lang;
  // --- translate GUI action buttons ---
  tr_lang = GetTranslation("GUI_LANGUAGE");
  tr_lang = tr_lang.LowerCase();
  
  if (tr_lang == "de") {
    Verbs.VerbGuiOptions[eVerbGuiTemplateLanguage] = eLangDE;

Anyone got any ideas? I've searched around (code number etc) and can't find anything similiar or a reference.

NB: Just tested and adding one more character (I'm on 11 currently) causes the same crash.

NB2: By adding TWO inventory items I can avoid this crash (for now). So if anyone can give me any clue as to where to look please do. AGS hates the number 11 as a final item?

Thanks in advance

Rich
Rich Brown
Beardy Ramblin Games

eri0o

That's a pretty weird error that I don't think it's possible to debug without access to the game project...

In imgur it offers four possibilities when. Clicking in the three dots at the top of the image for sharing and one of them is bbcode which you can copy and paste in the forums.

Shaneaphone

Right, well if it doesn't bother anyone I'll leave the post.

With a little luck I won't have to come back to it. It must be some oddity with the ID or file system. Adding a sound file or image or new character/inventory item is what triggers it. If I never see it again I'll delete the post. If I get to the bottom of it I'll explain and mark it solved.

Not sure how much or what script I'd try and show. The game already has 17 animated backgrounds, 11 characters etc etc. Getting bigger by the day

Rich Brown
Beardy Ramblin Games

Snarky

This sounds an awful lot like an engine bug.

It appears to be a rare error, but a forum search for the error message "invalid instruction NNN found in code stream" suggests that it can occur if you're running the game with a different version of the engine than it was built with.

Crimson Wizard

#4
@Snarky the instructions that we have are very low numbers, they don't exceed 100, and this error mentions a weirdly high number. Also, this would not be a random error then.

I have a strong suspicion that this can be the filestream error which I fixed a short while ago. In simple words, it was causing engine to read the game data from incorrect position. The specifics of this error is that adding or removing some data in the game could make it to go away, which happened in Shaneaphone's case.
https://www.adventuregamestudio.co.uk/forums/ags-engine-editor-releases/ags-3-6-0-patch-7/msg636659701/#msg636659701

It was fixed in 3.6.0 Patch 8 (3.6.0.55):
Quote- Fixed a rare bug when the Windows engine could fail loading the game for no good reason.

Shaneaphone is running 3.6.0.52 (from error message).

I recommend updating to the latest 3.6.0 patch:
https://www.adventuregamestudio.co.uk/forums/ags-engine-editor-releases/ags-3-6-0-patch-10/

Shaneaphone

Thank you so much for all of your input.

I have updated using the link and hopefully this will no longer be a problem. Very strange bug.

I just tried to re-create the circumstances by reducing the inv items back down to 11 and it ran fine. Though I have changed a few variables since then.

Anyway, immensely appreciated.

Rich
Rich Brown
Beardy Ramblin Games

eri0o

If I remember it was a bug in the Windows tooling from MS we use to build AGS for Windows that was fixed in more recent versions, CW wrote a workaround for the specific case of the bug that is included in AGS since that release so we don't hit it until we upgrade the tools we use in CI and all that.

Shaneaphone

Added loads of characters, rooms and inventory items with no problem since I updated AGS. I guess that's what it was.

Stellar work.

Thank you again!
Rich Brown
Beardy Ramblin Games

SMF spam blocked by CleanTalk