[SOLVED] Compiled build won't load, results in errors

Started by imagazzell, Fri 02/02/2024 03:07:34

Previous topic - Next topic

imagazzell

Hi all,

My compiled game won't load on my other computer.

If I try to run the "winsetup" file, I get this error message: "Error: unable to launch 'game.exe'. Make sure that the file is in the same directory as this Setup program." (It is.)

If I try to run "game.exe" (both directly and via the command line with "--setup"), I get this error message: "This app can't run on your PC. To find a version for your PC, check with the software publisher."

I just triple-checked, and Windows IS selected as a build target platform in General Settings, along with DataFile (I assume there wouldn't be a Windows folder in the Compiled directory otherwise). Also, "Attach game data to exe (Windows only)" is set to true, if that matters.

What am I doing wrong?

Some spec's: I made the game on my Win 7 desktop (AGS v3.5.1), compiled the build successfully with no reported errors, zipped the "Windows" build folder, copied it over to my Win 10 laptop, unzipped, and tried to run the setup. Does any of that sound like a problem?

Thanks!
Music Composing Services: https://youtu.be/BbT3kfhgA4E

Khris

Is it possible that the laptop is running the 32bit-Version of Windows 10?

Crimson Wizard

The engine we distribute is a 32-bit program, this will make games run on both 32-bit and 64-bit Windows.

Looking for a description of this error message, it seems besides other things it may be displayed if Windows does not trust the downloaded files.

imagazzell

Quote from: Khris on Fri 02/02/2024 13:31:18Is it possible that the laptop is running the 32bit-Version of Windows 10?
Both systems are indeed 64-bit. I apologize for not mentioning that in my previous details.

Quote from: Crimson Wizard on Fri 02/02/2024 14:25:28Looking for a description of this error message, it seems besides other things it may be displayed if Windows does not trust the downloaded files.
I couldn't find evidence of any of the files being quarantined in the Windows Security app (the only security app on the Win 10 PC). Is there anywhere else that I should look, if this were the issue?


Curiously, I just tried installing the game on the same Win 7 computer that I made it on, and received the same error when trying to run winsetup (about making sure game.exe is in the same directory), and when I try to run game.exe, an error that it "is not a valid Win32 application"... Does that glean any helpful hint for the issue?

The next thing I was going to try was to install the latest version of AGS on the Win 10 system, copy over all of my game files, and try to compile it on there and see if that works.

PS: I noticed when going to download AGS that the page says Microsoft .NET Framework 4.5 also needs to be installed for Win 7 and Vista systems. My Win 7 has v4.8, not 4.5. Does that matter?
Music Composing Services: https://youtu.be/BbT3kfhgA4E

Crimson Wizard

Only AGS Editor requires .NET Framework. Games made by AGS do not require .NET at all to run.

Which version of AGS are you using?
Can you run the game from Compiled/Windowed folder at all after you compile it with AGS?
Which files are present inside that folder after compilation?

imagazzell

Quote from: Crimson Wizard on Fri 02/02/2024 19:42:50Which version of AGS are you using?
3.5.1. That was the latest version when I started making the game, and I was hesitant to upgrade after being knee-deep in the process.

Quote from: Crimson Wizard on Fri 02/02/2024 19:42:50Can you run the game from Compiled/Windowed folder at all after you compile it with AGS?
As mentioned in my last post, I'm getting errors trying to run it on the source computer as well ("not a valid Win32 application").

Quote from: Crimson Wizard on Fri 02/02/2024 19:42:50Which files are present inside that folder after compilation?
acsetup.cfg, audio.vox, game.exe, speech.vox, and winsetup.


My attempt to compile the game in AGS 3.6 on the Win 10 PC has also failed. Windows Security blocked what it detected as a threat ("Trojan:Win32/Bancteian!pz" affecting the file "RCXD099.tmp" in the Compiled\Windows folder), and AGS reported: "Unable to set EXE name/description: LoadLibrary failed".

How do I tell Win Sec to butt the heck out?
Music Composing Services: https://youtu.be/BbT3kfhgA4E

Crimson Wizard

#6
Quote from: imagazzell on Fri 02/02/2024 20:06:48
Quote from: Crimson Wizard on Fri 02/02/2024 19:42:50Can you run the game from Compiled/Windowed folder at all after you compile it with AGS?
As mentioned in my last post, I'm getting errors trying to run it on the source computer as well ("not a valid Win32 application").

Were you able to run the game at all, for example, as a test run from the Editor? Have it run before?

Maybe the engine exe got corrupted in the AGS program files, and reinstalling AGS then recompiling the game might help...

Crimson Wizard

Quote from: imagazzell on Fri 02/02/2024 20:06:48My attempt to compile the game in AGS 3.6 on the Win 10 PC has also failed. Windows Security blocked what it detected as a threat ("Trojan:Win32/Bancteian!pz" affecting the file "RCXD099.tmp" in the Compiled\Windows folder), and AGS reported: "Unable to set EXE name/description: LoadLibrary failed".

So, this is something that started happening relatively recently, after one of the Windows Defender updates, and been affecting other people too:
https://www.adventuregamestudio.co.uk/forums/beginners-technical-questions/compiling-errors-due-to-virus-scanner/

It's theoretically possible that the same reason is preventing from running game exe made by AGS 3.5.1.

The solution is to add your game folder to the list of exceptions in Windows Defender. Also it would be nice if more people sent "false positive" reports to Microsoft using this address:
https://www.microsoft.com/en-us/wdsi/filesubmission

imagazzell

Quote from: Crimson Wizard on Fri 02/02/2024 20:32:37Were you able to run the game at all, for example, as a test run from the Editor? Have it run before?
Oh yes, countless times. It runs just fine from the Editor. It's only the compiled builds that don't want to work.

Quote from: Crimson Wizard on Fri 02/02/2024 20:53:41So, this is something that started happening relatively recently, after one of the Windows Defender updates, and been affecting other people too:
https://www.adventuregamestudio.co.uk/forums/beginners-technical-questions/compiling-errors-due-to-virus-scanner/
Well that's certainly something, but why wouldn't it work on my Win 7 computer (which doesn't use Windows Defender) either?


I did override the security settings of the "threatening" file and AGS altogether on the Win 10 PC (with a fresh install of AGS 3.6) and got the game to compile "successfully", but I'm still experiencing the same errors as stated in the OP.

I guess it must be something to do with my game, but what? Are there any specific settings I should be checking in General Settings or Default Setup that I may be missing?

Here's how I've got it set currently:




Anything look amiss in there?
Music Composing Services: https://youtu.be/BbT3kfhgA4E

Crimson Wizard

#9
Quote from: imagazzell on Fri 02/02/2024 21:05:11I guess it must be something to do with my game, but what? Are there any specific settings I should be checking in General Settings or Default Setup that I may be missing?

I cannot think of any setting that would prevent an exe to at least start with "not a valid Win32 application" error, or similar. The game may fail later if something is missing in files, or not correct in script etc, but that would be after it runs, and it would display a respective error message.
I don't see anything unusual in the settings either.

Could you upload your game.exe somewhere to let us check it out?

Have you been able to run some other ags games, made by other people, on the same computer?

imagazzell

#10
Quote from: Crimson Wizard on Fri 02/02/2024 23:08:03Could you upload your game.exe somewhere to let us check it out?
It's pretty big (6+ GB). I'll have to see about uploading it...

Quote from: Crimson Wizard on Fri 02/02/2024 23:08:03Have you been able to run some other ags games, made by other people, on the same computer?
I can run other people's games, yes. They open right up.


Interestingly, I can run the Compiled\Data version via the AGS run-time engine app, just not the Windows version. Strange...

(Could the large file size be the issue? Should I try splitting the resources? If so, what MB-sized chunks are good?)
Music Composing Services: https://youtu.be/BbT3kfhgA4E

imagazzell

UPDATE: Yep, the large file size for the exe appears to have been the issue. Once I split the resources and recompiled, it opened right up. Going to try it on the other computer now to make sure it works on there as well.

PS: I chose 1024 MB (1 GB) as the resource chunk size. Is that good or would another size be better? Interestingly, that setting only resulted in two split resource files, the larger still being over 5 GB, where I was expecting ~6 files of 1 GB each... Hmmm.
Music Composing Services: https://youtu.be/BbT3kfhgA4E

Crimson Wizard

#12
Quote from: imagazzell on Sat 03/02/2024 00:19:56It's pretty big (6+ GB).

(Could the large file size be the issue? Should I try splitting the resources? If so, what MB-sized chunks are good?)

This is not usual for AGS games to be that large...

If that helps I might suggest to disable "Attach game data to exe"; with that you likely won't have to split resources. I would suggest it anyway, even if not for this case, because sometimes Antiviruses don't like when some data is appended to game.exe, and game keeps reading from its own executable.

Another thing regarding antiviruses is that when exe is big, they may scan it for a pretty long time, making game launch with a visible delay.

Now, as for why did that cause problems... very large game files (> 2 GB) are theoretically supported starting with AGS 3.5.1. So unless there's some case which we missed, maybe there's additionally some system restriction... Not sure about that though.

Quote from: imagazzell on Sat 03/02/2024 00:19:56PS: I chose 1024 MB (1 GB) as the resource chunk size. Is that good or would another size be better? Interestingly, that setting only resulted in two split resource files, the larger still being over 5 GB, where I was expecting ~6 files of 1 GB each... Hmmm.

Some data in game cannot be split in parts so it must stay in one chunk, usually this means that you have a very large spritefile.

EDIT: I just noticed that you do not have enabled Sprite compression in settings. I might recommend try enabling it and see how much that reduce the game size.
Although TBH in pre-3.6.0 sprite compression was rather lame, mostly suited for low-res old-school gfx.

imagazzell

Quote from: Crimson Wizard on Sat 03/02/2024 00:44:01This is not usual for AGS games to be that large...
Oh, trust me, I know. There's a LOT behind the curtain of my game that is not normal, things that may both intrigue you seasoned pros as well as make you want to pull your hair out :'D

In any case, at least we figured out what the issue was. Thank you for the extra info.


Sidenote: Is there an easy way to package the build files into an Install Wizard style installer to load onto other people's systems like most programs, or is it better to just have them handle placing the files wherever and putting a shortcut on their desktop?
Music Composing Services: https://youtu.be/BbT3kfhgA4E

Crimson Wizard

Quote from: imagazzell on Sat 03/02/2024 01:42:46Sidenote: Is there an easy way to package the build files into an Install Wizard style installer to load onto other people's systems like most programs, or is it better to just have them handle placing the files wherever and putting a shortcut on their desktop?

We use InnoSetup for AGS itself, it's free and may suit games too:
https://jrsoftware.org/isinfo.php

although it may take some time to learn, because it's script based.

SMF spam blocked by CleanTalk