fopen_unpack error

Started by SilverSpook, Tue 07/03/2017 11:52:05

Previous topic - Next topic

SilverSpook

So I'm getting this weird error that doesn't happen if I press F5, but if I build the game and run it, it happens:



It happens in just certain scenes, such as the above one.  I tried deleting everything out of the compiled folder and then "rebuild all".  I still get the error.

It looks like there's a weird reversed-slash after "windows" in the error message, not sure if that has something to do with it.

Anyone know what could be causing this?

UPDATE:  I tried taking out an audio file from the script, and suddenly the scene plays.  Then when this one audio sound effect plays later, the game crashes with the same error.  It's something to do with the sound file?

Crimson Wizard

#1
There was similar bug related to audio files embedded in EXE, or another way around (on VOX) when you run the built game.
I found it in current development branch, but I was not sure if it existed in that early versions of 3.4.0 as 3.4.0.4.
On the other hand, early 3.4.0 alphas were full of bugs, including bugs related to game compilation. Maybe it is a different bug...

I'd suggest first try changing the way sound is added to your game in its properties (between "embed in EXE" and "VOX package).

SilverSpook

Ok, I'll try that, thanks.  Do you think it would be ok to update to the stable version for this game, or would it be a problem?

Crimson Wizard

Quote from: SilverSpook on Tue 07/03/2017 12:21:08
Ok, I'll try that, thanks.  Do you think it would be ok to update to the stable version for this game, or would it be a problem?
I do not know if this will fix the bug on its own, but one thing is certain: if this bug is still in final 3.4.0 then I will fix it, but I won't fix a version as old as 3.4.0.4.

As for possible consequences of updating, two things that come to mind:
1) The issue with creating default config file, as explained here: http://www.adventuregamestudio.co.uk/forums/index.php?topic=54517.msg636554422#msg636554422
That's because the way AGS reads config file has changed somewhere in the midst of 3.4.0 development.
2) Also, you will no longer be able to write files into game's directory from script, only in $SAVEGAMEDIR$ and $APPDATADIR$
(the detailed information is found in "Upgrading to..." articules in the manual.

Crimson Wizard

#4
Actually, I looked more into what gives this error message, and I am no longer certain it is the same error I was thinking about earlier.

The game thinks that audio file should be embedded into exe, that's why it tries to read it from one, but for some reason such file cannot be open for reading.

By any chance, are there more than one file having name similar to NEOFEU***.exe?

SilverSpook

#5
I don't see more than one file named NEOFEU***.exe unfortunately, in the "Windows" section of the "Compiled" folder, where I'm running the game.  Should I check elsewhere?

I tried changing the audio from "embed in .exe" to "vox file" but I'm still getting the error.  I thought it might be that since audio was "embed in exe" but voice files were "vox file".

EDIT: One thing I noticed is that the sound file causing the error is a .OGG file.  Maybe that wouldn't make a difference though.

The other weird thing is the version of the game I put out to testers a couple months ago built and ran fine, and that had almost all the files in the game.  Not sure what happened between then and now.

Crimson Wizard

Quote from: SilverSpook on Tue 07/03/2017 19:02:36
I don't see more than one file named NEOFEU***.exe unfortunately, in the "Windows" section of the "Compiled" folder, where I'm running the game.

I do not see word "Compiled" in the path mentioned in the error message. Is the game is actually run from Compiled folder? I was thinking that maybe the path has mistakes in it.

SilverSpook

#7
Ah!  Yeah, that error message actually came from my tester, who's running it from elsewhere.  But, when I run it, I get the error message also which is looking for a file at "c:Neofeud/Compiled/Windows\Neofeud.exe"

I'm running the game from "c:Neofeud/Compiled/Neofeud.exe".  So that "Windows\" bit in the path got inserted somehow and is causing the error I think...  Is there something I can do to fix that path?

EDIT 3: Ok, seems I messed up setting "emebed in .exe" to "separate vox".  I changed the properties of the audio FOLDER but the files inside all still said "embed in .exe".  So I tried changing that one sound file that caused the crash, and the game no longer crashes.  But then the second sound file in the game caused a crash.

I guess I'll go through all of the audio files individually and set them all to "separate VOX", and hopefully that will work.

EDIT: Oops, no I'm actually running from "c:Neofeud/Compiled/Windows/Neofeud.exe" but there's still that slash facing the wrong way...  Also I have set the game to put audio files in separate VOX, so I'm not sure why it's even looking in Neofeud.exe for the audio file.

EDIT 2:  Tried upgrading to the latest version of AGS and got this error:




So now the "Windows\" is back to normal, but it's still having path issues.

Crimson Wizard

#8
Slash direction is not important, it can be either way on Windows.

It cannot open file for reading data from for some reason. I would think that it does not have access on disk C, but your tester ran it from user documents folder, so that's probably not the issue.

Maybe it could be related to data file being same file as exe, but then how did the rest of game data managed to load...
I would still suggest following test: put acwin.exe from AGS program into your compiled game folder and run it: this will ensure that data and running exe are in different files.

Are there other audio files embedded into EXE that play properly?
Also, do you have many testers, and are you two only ones who get this error, or anyone who plays does?


EDIT: I just noticed your exe size is over 2 GB. That may be dangerous with AGS, because it does not work well with files over 2 GB. You may try set up data splitting in the General Settings (like split by 1 GB or so). Unfortunately I do not remember if sprites could be split that way, so if you have very large sprite file, then it won't work as well. But then, you could also try enabling sprite compression, if you have not done that yet.
PS. On the other hand, I doubt this alone could be the reason of the pack_fopen problem, because the rest of game data loads successfully (otherwise game won't run).

SilverSpook

#9
I tried changing all of the sound files (speech files are ok) to "Seperate VOX" and now the game seems to run fine.

I only have one guy (paid tester) who is working on this right now.  Been having trouble with other testers. 

The sprite file is 1.75 gigs unfortunately.  I have not enabled sprite compression yet, as I was worried about long loading times at first.

If the file size does become a problem, I'll try the compression though.

Thanks for all your help!

EDIT: Quick question:  I'm using the latest AGS now as you suggested, and now the game seems to run in windowed mode if I hit F5.  I tried running game setup from in the editor, setting to full screen, but the debug mode still seems to run in windowed.  Is there a way to get the debug mode to go into full screen?

Nevermind, I saw the note in Preferences!

SMF spam blocked by CleanTalk