[3.4.0 Alpha 6] Build for debug is putting debug executable in wrong location.

Started by Sslaxx, Tue 27/10/2015 14:33:01

Previous topic - Next topic

Sslaxx

I've noticed this with projects imported from older versions of AGS; not yet tried it with new projects but I do not see why it wouldn't happen there.

Sometimes AGS fails to place the debug executable in the "_Debug" directory, resulting in an incorrect "Unexpected error: The process cannot access the file because it is being used by another process." error message. The debug executable is being placed directly in the project's root location. As far as I can see no other process is accessing any files or directories in these locations.

Running AGS on Windows 10 Home.
Stuart "Sslaxx" Moore.

Monsieur OUXX

I've had this issue too on modern systems (Windows 7+) without realizing that it was because the file was going to the wrong folder. I thought it was just because the game's exacutable hadn't been  unlocked yet after a debugging session.
 

homelightgames

UPDATED*
This just barely started happening to me after I had to do a Windows System Restore after a Windows Update went bad (Windows 7). I'm pretty sure a Windows System Restore wouldn't affect AGS (3.4.0.6), but it is when it started happening. *I should add that when I try to run the debug executable AGS freezes, instead of giving me the "Unexpected Error."

Not only that, but when I go into the actual folder to run the executable OR the WinSetup.exe file, it does absolutely nothing. It just sort of freezes with the cursor as a pointer and an hourglass. Windows doesn't freeze, just the Window's Explorer window where I tried running the executable.  I've tried using a backup of the project, but it does the same thing when I open it in AGS. There's no error messages, (except the initial message that Sslaxx mentioned when trying to run the debug executable in AGS) so I have had no idea where to post this problem, or what to even say.

I've noticed that when I open up the Windows Task Manager I can see both the Winsetup and my game's executable in Processes (assuming I've run both of them), but when I try to End Process they don't end. They remain (running?) in the Task Manager's Processes, which has never happened to me before. Usually an End Program dialog will eventually pop up. The only thing that will remove them from memory is a computer restart. Otherwise, they'll stay there in Task Manager's Processes indefinitely.

I have no idea what's going on.

homelightgames

So, I've since tried this on another computer (running Windows 10), to see if it was some sort of conflict on the computer I was using, but it still didn't work. Even after doing a complete rebuild (ie Rebuild all files), when I tried to run the game in the editor, it completely froze the AGS editor before it even opened the game. I even tried reverting to an even older backup of the game (which worked fine when I archived it), even though the most recent backup also worked.
I really don't understand what's going on, since my game was working perfectly one day, and then it wouldn't the next day.

Crimson Wizard

visionmind, did you use 3.4.0.6 earlier, before this started to happen?

Have you tried to completely delete "Compiled" folder and rebuild?

Since some version there is a new building process that creates separate folders for different target platforms (Windows, Linux). What are related compilation options? Things to check:
- File -> Preferences -> is the "Use legacy comiler" check box set or not set?
- General Settings -> Compiler -> Build target platforms - which values are set?


If neither of that helps or give any clues, could you give me a copy of compiled game for a test?

homelightgames

Okay, so if AGS 3.4.0.6 hasn't been modified since July 2015, then no, as my earliest backup was in October, which means I should have only used 3.4.0.6 the whole time. That said, I may have downloaded before that, and just didn't start my project in October, but I can't remember if I checked for the newest version right when I started. So, I don't think so, but I could give the previous version a try (EDITED I found the older version). (I labeled the folder exactly which version it was: 3.4.0.6-Alpha)

I have tried completely removing the Compiled folder, in fact that was one of the things I did right before I posted.

In Preferences, "Use legacy compiler" is not checked. And in General Settings the target platform is "Windows" displayed, with "Data File" and "Windows" check-boxes both checked in the dropdown, something I haven't changed.

I'll PM the file.
Thank you very much for your time Crimson. I really appreciate it.

visionmind

homelightgames

Okay, I don't know why, but it actually works with AGS 3.4.0.5. This is fine because I haven't used the Switch statement, or used called a Static Function inside array brackets.
This means that it's specifically AGS 3.4.0.6 it's having problems with, even though it was the version I used to make the whole thing.

Weird with a beard.

Crimson Wizard

I tried running the compiled game and it ran fine on my computer (Windows 7).
Similarily, the project builds fine in AGS 3.4.0.6 and runs both from Compiled folder and with Debugger.

I will recheck the differences between 3.4.0.5 and 6, but so far I have no ideas.

E: it also works on clean install of Windows XP, but crashes on game exit.


homelightgames

Bizarre. I wonder why it didn't for me on two different computers.
At least it works with 3.4.0.5 for me.

Thanks for looking into this Crimson. Like I said before, I really appreciate it.

Crimson Wizard

Could you run the compiled game from command line as "Bakery.exe --log" and look into "c:\Users\<Your username>\Saved Games\.ags\. There might be a log file, I am curious if game writes anything there before freezing.

homelightgames

Sorry about the delayed response... the Holidays and all...
Okay, so I have no idea what's happened, but now everything runs like normal, even in AGS 3.4.0.6. I first recompiled the game in 3.4.0.6 and it compiled fine. I then ran Bakery.exe in the command prompt with the --log and it indeed made a log file. I then Ran the game in the editor (3.4.0.6) and it ran fine. I have no idea why, other than I did install and run AGS 3.4.0.5. The only thing I can think of is that this was all due to a corrupted config file or something, since no matter which version you run (or from what directory) it always lists the same previously loaded games. I don't know if this is correct, it's just all I can think of.
Of course this doesn't explain why it also didn't work on my other computer. I'm at a loss...
Thanks again, Crimson.
visionmind.

homelightgames

Okay, I can confirm that it still doesn't work on the other computer (Windows 10). I tried installing AGS 3.4.0.5 on that one too, but it also doesn't work.
I then thought that it might because I had them in different directories ie I extracted the archived project to "/2015-10_Bakery" instead of just "/Bakery", which compiled it as "2015-10_Bakery.exe" instead of "Bakery.exe" But extracting the archived project to "/Bakery" doesn't work (even though it compiled it to the normal "Bakery.exe")
No matter what I still can't get it to work on this other computer, making it even stranger that it now works on the original computer (Windows 7). I've tried restarting (because it keeps Bakery.exe in memory no matter what (like I originally mentioned) and then freshly extracting AGS and my project, but none of it works.
I then tried the Demo Quest games that come with AGS and it doesn't work (for 3.4.0.6 and 3.4.0.5) even after changing ProcessClick to Room.ProcessClick.
Lastly I just ran the current stable build, AGS 3.3.4 and it's accompanied demo game, and it too doesn't work. This leads me to believe it's a problem with a shared config file, or something, since all of them have the same problem even though AGS 3.3.4 is a stable build. I don't know how AGS works, or is able to share recently loaded games across different versions, but this is the only thing I can think of. (see post below)

With it working on the original computer, I sort of don't want to look a gift horse in the mouth, but because I still don't know what went wrong originally, it makes me reluctant to want to continue because the vulnerability is still there, somewhere. (UPDATE: I now know that one computer's anti-virus was updated, while the other's wasn't)

Weird.

homelightgames

Alright, well I think I found the problem (YAY!!!) After trying different versions and even trying to completely clear AGS of the system to give it a fresh install, it finally began to work after I disabled my anti-virus, AVAST. I've heard of this before, but only now tried it.
I would feel really stupid about all of this, but for some dumb reason my anti-virus software wasn't throwing any sort of warning, or alerting me in any way, just silently blocking/conflicting with AGS. I checked my anti-virus software's history and it doesn't say it ever blocked AGS, even though it was silently blocking it (or conflicting with it in some other way). I even checked Window's error logs, but there was no log about anything with AGS.

In the end, after disabling the anti-virus, I then checked for updates for my anti-virus and it, indeed, did need to be updated. After updating it, AGS worked normally. Once again, my anti-virus software usually lets me know if it needs an update, but this time it decided to keep all that info to itself. So it seems all of this was caused from a lack of communication. Ugh.

So, Sslaxx, if you're still having a problem, you could try updating or disabling your anti-virus.

visionmind

Crimson Wizard

Hmm, there were numerous threads in which Avast was mentioned. I guess we should add this to FAQ.
I tried to replicate the problem and installed Avast, but it did not block anything... maybe newer version does not do that?

homelightgames

Yeah, as soon as I updated my AVAST to the latest version (program and virus definitions) the problem went away. I just wish it would have told me it needed updating whenever it was updated and it would have spared the bulk of this thread on my part.

Thanks again, Crimson, for looking into this.

MiteWiseacreLives!

I'm still having issues with AVAST, I have to turn off the File Scan in order to compile a game.
Tried updating, but did not help.  :(

monkey0506

I uninstalled Avast, ran CCleaner, rebooted, and reinstalled Avast. I have no more problems with Avast and AGS. (NOTE: Avast was also causing other issues, such as Spotify not updating, so it was definitely an Avast issue)

SMF spam blocked by CleanTalk