Jibble

Author Topic: (Bug) Exception while creating a room from a template  (Read 2385 times)

CrashPL

  • The dinosaur guy
    • I can help with AGS tutoring
    • I can help with animation
    • I can help with characters
    • I can help with play testing
    • I can help with scripting
    • I can help with translating
    • CrashPL worked on one or more games that won an AGS Award!
    •  
    • CrashPL worked on one or more games that was nominated for an AGS Award!
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

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: (Bug) Exception while creating a room from a template
« Reply #1 on: 12 Jul 2014, 13:37 »
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

  • The dinosaur guy
    • I can help with AGS tutoring
    • I can help with animation
    • I can help with characters
    • I can help with play testing
    • I can help with scripting
    • I can help with translating
    • CrashPL worked on one or more games that won an AGS Award!
    •  
    • CrashPL worked on one or more games that was nominated for an AGS Award!
Re: (Bug) Exception while creating a room from a template
« Reply #2 on: 12 Jul 2014, 14:37 »
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

  • Local Moderator
    • Lifetime Achievement Award Winner
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    • Crimson Wizard worked on one or more games that won an AGS Award!
    •  
    • Crimson Wizard worked on one or more games that was nominated for an AGS Award!
Re: (Bug) Exception while creating a room from a template
« Reply #3 on: 12 Jul 2014, 14:50 »
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

  • The dinosaur guy
    • I can help with AGS tutoring
    • I can help with animation
    • I can help with characters
    • I can help with play testing
    • I can help with scripting
    • I can help with translating
    • CrashPL worked on one or more games that won an AGS Award!
    •  
    • CrashPL worked on one or more games that was nominated for an AGS Award!
Re: (Bug) Exception while creating a room from a template
« Reply #4 on: 12 Jul 2014, 19:07 »
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

  • ...
    • Alan v.Drake worked on one or more games that won an AGS Award!
    •  
    • Alan v.Drake worked on one or more games that was nominated for an AGS Award!
Re: (Bug) Exception while creating a room from a template
« Reply #5 on: 28 Jul 2014, 20: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