[Fixed] [g2.1.pre-697-g4e7cfef] Very Fatal Error- Access Violation

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

[g2.1.pre-697-g4e7cfef] Very Fatal Error- Access Violation

Postby Cryomundus » Fri Mar 13, 2015 8:55 pm

So as of late, I've been running into the classic "Code: C0000005 (Access Violation - tried to read address 00000000)" Very Fatal Error while using gzdoom-g2.1.pre-697-g4e7cfef (the latest publicly available dev build on the gzdoom drd site, dated Feb 25 2015). I've also gone and uploaded the .zip of the crash report too. I can't exactly pinpoint why its crashing just that it seems to crash after playing for a certain amount of time. It also seems to crash whenever one of the Baron of Hell variants tries to attack, though which one I can't actually tell (I think its either the regular or the Blue variant). Hopefully I've uploaded whats necessary, as 99% of these sort of threads never seem to actually upload the crash report.

Edit: Oh, and yes, both video and sound drivers are up to date.

For those curious, I was also running the following:

MASTER3.WAD
Trailblazer1.2b.pk3
colourfulhell301.pk3

CrashReport.zip
(58.42 KiB) Downloaded 75 times
User avatar
Cryomundus
 
Joined: 31 Oct 2013

Re: [g2.1.pre-697-g4e7cfef] Very Fatal Error- Access Violati

Postby wolfman » Fri Mar 13, 2015 9:49 pm

Do you have a link to download MASTER3.WAD? I can't find that one.
User avatar
wolfman
 
 
 
Joined: 28 Jun 2004

Re: [g2.1.pre-697-g4e7cfef] Very Fatal Error- Access Violati

Postby jpalomo » Sat Mar 14, 2015 2:18 am

This looks like it is [not ZDoom]. Colourfulhell is causing the crash whenever a certain ACS script is called (commonbaron missile state). Strangely enough, I can only get it to crash if colourfulhell is loaded after any other mod. Even something as simple as this can cause a crash if loaded before:
Code: Select allExpand view
#include "zcommon.acs"
#library "nope"
User avatar
jpalomo
 
Joined: 17 May 2010

Re: [g2.1.pre-697-g4e7cfef] Very Fatal Error- Access Violati

Postby Graf Zahl » Sat Mar 14, 2015 2:39 am

Where can I find that mod? I'd like to have a look at that script.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany


Re: [g2.1.pre-697-g4e7cfef] Very Fatal Error- Access Violati

Postby Graf Zahl » Sat Mar 14, 2015 3:55 am

Ok, I can't track this down but I have a suspicion. Here's the script's first few lines:

Code: Select allExpand view
#include "zcommon.acs"
#include "commonfuncs.h"
#include "mathFuncs.h"
#include "miscFuncs.h"

#library "CHACS"


Looks ok so far, right?
But the includes contain actual code, so anything in there does not tag strings properly for the library which can trigger all sorts of undefined behavior.

That mod is a mess anyway. Endless errors upon start, someone really needs to clean up.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: [g2.1.pre-697-g4e7cfef] Very Fatal Error- Access Violati

Postby Blue Shadow » Sat Mar 14, 2015 5:09 am

Is that why it's said that #library should be the first line in the file, even before any #includes?
User avatar
Blue Shadow
 
 
 
Joined: 14 Nov 2010
Operating System: Windows 10/8.1/8 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: [g2.1.pre-697-g4e7cfef] Very Fatal Error- Access Violati

Postby edward850 » Sat Mar 14, 2015 5:11 am

Yes, otherwise all strings before it won't be phrased in the library. It is technically possible for a script to have multiple sets of strings (although I'm unsure how far ACC will take that).
User avatar
edward850
[netcode intensifies]
 
Joined: 20 Jul 2005
Location: New Zealand

Re: [g2.1.pre-697-g4e7cfef] Very Fatal Error- Access Violati

Postby Graf Zahl » Sat Mar 14, 2015 5:13 am

Normally ACC should throw an error for this mistake, so I'm leaving the report open.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: [g2.1.pre-697-g4e7cfef] Very Fatal Error- Access Violati

Postby Cryomundus » Sat Mar 14, 2015 8:58 pm

Sooo just getting rid of the acs and commenting out the calls to the former made it very, very playable. :roll:

Honestly, I'm not even sure how the acs was even compiled in the first place, as I can't actually compile the source file myself in SLADE. Heck, I'm not even sure why the acs was even needed in the first place. It doesn't seem to do anything particularly special.

I mean, it seems he wanted them to lob a cyb missile or something. Heck, he just make a custom decorate one, it'd be far easier and simpler. I get referencing is useful, but not when it makes a massive, unwieldy mess of code.

I was not expecting so many replies. I also wasn't expecting colourfulhell to be the culprit. I'll probably also toss a quick mediafire link to MASTER3.wad for the hell of it probably 1-2 days from now. I originally found it on doomseeker, btw.

edit: by massive, unweildy mess, I mean the acs. I actually can't tell what the purpose of it is. It's also broken. And weird.
Last edited by Cryomundus on Sun Mar 15, 2015 7:20 pm, edited 1 time in total.
User avatar
Cryomundus
 
Joined: 31 Oct 2013

Re: [g2.1.pre-697-g4e7cfef] Very Fatal Error- Access Violati

Postby Hege Cactus » Sun Mar 15, 2015 7:09 pm

Well shit I didn't know this caused trouble
The script is not by me, its made by scroton, its basicly a projectile interception that adds cyberdemon and baron to have a interception/predict where to shoot the thing, it didnt seem to cause any trouble earlier, I was instructed to add to the same main file incase I had to add other scripts (I had to add some level feels, but they are like super basic), and even then it didn't seem to cause issues with normal zdooms.
I'm going to probably have to contact him about it or just remove it from the mod, tho it would be a shame to eliminate it cause the interception adds quite a nice bit of life to normal cybie fight and the barons/HKs.

I'm honestly not good with ACS myself and I'm still learning so yeah so I dont really know much on it.
User avatar
Hege Cactus
 
Joined: 19 Feb 2014

Re: [g2.1.pre-697-g4e7cfef] Very Fatal Error- Access Violati

Postby Cryomundus » Sun Mar 15, 2015 7:29 pm

Hege Cactus wrote:Well shit I didn't know this caused trouble
The script is not by me, its made by scroton, its basicly a projectile interception that adds cyberdemon and baron to have a interception/predict where to shoot the thing, it didnt seem to cause any trouble earlier, I was instructed to add to the same main file incase I had to add other scripts (I had to add some level feels, but they are like super basic), and even then it didn't seem to cause issues with normal zdooms.
I'm going to probably have to contact him about it or just remove it from the mod, tho it would be a shame to eliminate it cause the interception adds quite a nice bit of life to normal cybie fight and the barons/HKs.

I'm honestly not good with ACS myself and I'm still learning so yeah so I dont really know much on it.


I'm also a little curious as to how the acs file was actually compiled (as in what version of acc was used), because I can't actually compile it myself with the acc compiler provided on the zdoom site. It literally shouldn't be able to compile but it somehow was?

I mean, did you get the compiled version from scroton or did you manage to compile it yourself? Not being mean, just honestly curious, cuz this weird and fascinating, I meanm it's like when one of my cs projects decided not to work at all, but if I deleted the old file and paste it back it worked again. Maybe permission error? Still have no idea why it did what it did.
User avatar
Cryomundus
 
Joined: 31 Oct 2013

Re: [g2.1.pre-697-g4e7cfef] Very Fatal Error- Access Violati

Postby Hege Cactus » Sun Mar 15, 2015 7:35 pm

Cryomundus wrote:
Hege Cactus wrote:Well shit I didn't know this caused trouble
The script is not by me, its made by scroton, its basicly a projectile interception that adds cyberdemon and baron to have a interception/predict where to shoot the thing, it didnt seem to cause any trouble earlier, I was instructed to add to the same main file incase I had to add other scripts (I had to add some level feels, but they are like super basic), and even then it didn't seem to cause issues with normal zdooms.
I'm going to probably have to contact him about it or just remove it from the mod, tho it would be a shame to eliminate it cause the interception adds quite a nice bit of life to normal cybie fight and the barons/HKs.

I'm honestly not good with ACS myself and I'm still learning so yeah so I dont really know much on it.


I'm also a little curious as to how the acs file was actually compiled (as in what version of acc was used), because I can't actually compile it myself with the acc compiler provided on the zdoom site. It literally shouldn't be able to compile but it somehow was?

I mean, did you get the compiled version from scroton or did you manage to compile it yourself? Not being mean, just honestly curious, cuz this weird and fascinating, I meanm it's like when one of my cs projects decided not to work at all, but if I deleted the old file and paste it back it worked again. Maybe permission error? Still have no idea why it did what it did.


Honestly I got the complier from scroton too cause I am just doofus with ACS and he was pretty willing to help.
User avatar
Hege Cactus
 
Joined: 19 Feb 2014

Re: [g2.1.pre-697-g4e7cfef] Very Fatal Error- Access Violati

Postby scroton » Sun Mar 15, 2015 9:00 pm

Marrub had the same error with the intercept function when he loaded TSP with Terminus's Metal Jukebox, but only if he loaded the Metal Jukebox first, and nobody else could reproduce the error even using the same version of the files in the same version of GZDoom. We never figured out the reason so if my putting the #include before #library is the culprit I will be very happy.

Graf Zahl wrote:Ok, I can't track this down but I have a suspicion. Here's the script's first few lines:

Code: Select allExpand view
#include "zcommon.acs"
#include "commonfuncs.h"
#include "mathFuncs.h"
#include "miscFuncs.h"

#library "CHACS"


Looks ok so far, right?
But the includes contain actual code, so anything in there does not tag strings properly for the library which can trigger all sorts of undefined behavior.

Blue Shadow wrote:Is that why it's said that #library should be the first line in the file, even before any #includes?

edward850 wrote:Yes, otherwise all strings before it won't be phrased in the library. It is technically possible for a script to have multiple sets of strings (although I'm unsure how far ACC will take that)

Ah. I didn't actually know this. It's passing strings to the function so that's probably the culprit. So the correct order would be
Code: Select allExpand view
#include "zcommon.acs"
#library "CHACS"

#include "commonfuncs.h"
#include "mathFuncs.h"
#include "miscFuncs.h"

then?

Graf Zahl wrote:That mod is a mess anyway. Endless errors upon start, someone really needs to clean up.

I'm not the mod author/maintainer, I just gave CactusHedge a little bit of acs a while ago, but what are the errors? The version from the thread gives me none on startup in ZDoom 2.8pre-1190-gd8d2058.

Graf Zahl wrote:Normally ACC should throw an error for this mistake, so I'm leaving the report open.

I grabbed a bunch of stuff off the acc git a while ago for what I'm using to compile and haven't recently updated, so it's probably on my end rather than an issue with current ACC.
I uploaded what I'm using here.

Cryomundus wrote:Honestly, I'm not even sure how the acs was even compiled in the first place, as I can't actually compile the source file myself in SLADE.

Cryomundus wrote:I'm also a little curious as to how the acs file was actually compiled (as in what version of acc was used), because I can't actually compile it myself with the acc compiler provided on the zdoom site. It literally shouldn't be able to compile but it somehow was?

I'm using some ACC I downloaded off the acc git a while ago, linked above. It also might be that you haven't added the files commonFuncs.h, mathFuncs.h and miscFuncs.h to the folder where your ACC is located.

Cryomundus wrote: Heck, I'm not even sure why the acs was even needed in the first place. It doesn't seem to do anything particularly special.

I mean, it seems he wanted them to lob a cyb missile or something. Heck, he just make a custom decorate one, it'd be far easier and simpler. I get referencing is useful, but not when it makes a massive, unwieldy mess of code.

edit: by massive, unweildy mess, I mean the acs. I actually can't tell what the purpose of it is. It's also broken. And weird.

It's purpose is shooting a missile on an intercept course with the target based upon it's current speed rather than it's current location.
What makes the code messy/broken? Is it not commented enough or do you mean something is amiss formatting-wise?

Hege Cactus wrote:I'm going to probably have to contact him about it or just remove it from the mod, tho it would be a shame to eliminate it cause the interception adds quite a nice bit of life to normal cybie fight and the barons/HKs.
I'm honestly not good with ACS myself and I'm still learning so yeah so I dont really know much on it.

Try changing
Code: Select allExpand view
#include "zcommon.acs"
#include "commonfuncs.h"
#include "mathFuncs.h"
#include "miscFuncs.h"

#library "CHACS"

to
Code: Select allExpand view
#include "zcommon.acs"
#library "CHACS"

#include "commonfuncs.h"
#include "mathFuncs.h"
#include "miscFuncs.h"

(if the second block of code is actually the correct order; wait to hear back from Graf or Edward about that EDIT: Checked with Edward on irc, and the second one is the correct order) and see if the problem persists.
User avatar
scroton
 
Joined: 27 Apr 2013

Re: [g2.1.pre-697-g4e7cfef] Very Fatal Error- Access Violati

Postby Cryomundus » Sun Mar 15, 2015 9:50 pm

Honestly, it was because I couldn't compile it myself, though I didn't expect the mix of Term's jukebox to be the culprit (I had made a custom version of it for personal use, didn't think I needed to include that of all things) soooo I thought that it must be broken. Messy was more due to "I have no idea what this thing's purpose is, it tends to crash for some reason (not knowing that load orders would be problem, and not expecting ACS to be in a monster pack too), thus it must be broken and have messy code." Apologies for that. Glad to see the problem was fixed regardless though. :oops:
User avatar
Cryomundus
 
Joined: 31 Oct 2013

Next

Return to Closed Bugs

Who is online

Users browsing this forum: Yandex [Bot] and 0 guests