(Bug) Exception while creating a room from a template

Started by CrashPL, Sat 12/07/2014 12:38:14

Previous topic - Next topic

CrashPL

I created a room template, so I won't have to worry about setting lots of stuff manually. Eveything seemed fine and dandy, until I tried to open up this new room, created from the template. Trying to open it resulted in the following exception:



Full exception message.

This translates to the standard C# access violation exception "Attempted to read or write protected memory. This is often an indication that other memory is corrupt." string. Creating a new empty room works just fine, but it quite a pain in the butt to set every single thing manually. Lurked around the forum to check if anybody else had a similiar problem with the templates, but found nothing. Any ideas what causes it, and how to avoid it? Thanks in advance!

Crimson Wizard

Can you upload both template file and a room which you used to create template?
Template: it should be located in AGS program folder in "Templates" folder, and has "art" file extension.
Room: there should be a "roomN.crm" file in your project, where "N" = room number.

CrashPL

Ah, problem solved. It seems I needed to both create the template AND use it, while running the editor as administrator, otherwise this error would pop up (and also apparently damage crm files, as they're not readable, even when accessed as admin, anymore). So yeah, quite a trivial thing, should've checked it sooner, sorry to waste your time! :-[

Crimson Wizard

Quote from: CrashPL on Sat 12/07/2014 14:37:20
Ah, problem solved. It seems I needed to both create the template AND use it, while running the editor as administrator, otherwise this error would pop up (and also apparently damage crm files, as they're not readable, even when accessed as admin, anymore). So yeah, quite a trivial thing, should've checked it sooner, sorry to waste your time! :-[
Erm, no, it's a very serious problem. AGS should not crash like that or damage files no matter what.
There should be a safety check to fallback if the template could not be opened for any reason. Secondly, templates should be saved in shared documents folder, not program files.

CrashPL

I see! Well then, I tested it properly this time, and here are the results:
when I run the editor as an administrator, and create a template, then I can use it without problems. However when I close this instance and run the editor normally (without the admin), and create a room from the said template I can't open it (showing access violation error above). And here the things are getting a bit messy - after that when I try to run the editor yet again, but as an administrator, it seems that BOTH the template and the created room are corrupted, becasue I'm getting an "unexpected end of file" exception, while trying to both open the previously created room AND create a new room from the template. In other words when I create a room template and want to use it, I need to run the editor everytime as an administrator.

And yes, in my case AGS saves template files to the Program Files\AGS directory ("Templates" folder).

Alan v.Drake

Quote from: CrashPL on Sat 12/07/2014 19:07:39
And yes, in my case AGS saves template files to the Program Files\AGS directory ("Templates" folder).

If I may, don't install ags inside "Program Files", that will save you a lot of trouble with permissions. That said it seems ags needs a few more failsafes :D

- Alan

SMF spam blocked by CleanTalk