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

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
User avatar
Cryomundus
Posts: 497
Joined: Thu Oct 31, 2013 12:33 pm

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

Post by Cryomundus »

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 117 times
User avatar
wolfman
 
 
Posts: 1377
Joined: Mon Jun 28, 2004 4:00 pm

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

Post by wolfman »

Do you have a link to download MASTER3.WAD? I can't find that one.
User avatar
jpalomo
Posts: 771
Joined: Mon May 17, 2010 9:45 am

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

Post by jpalomo »

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 all

#include "zcommon.acs"
#library "nope"
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

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

Post by Graf Zahl »

Where can I find that mod? I'd like to have a look at that script.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

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

Post by Graf Zahl »

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

Code: Select all

#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.
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

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

Post by Blue Shadow »

Is that why it's said that #library should be the first line in the file, even before any #includes?
User avatar
edward850
Posts: 5886
Joined: Tue Jul 19, 2005 9:06 pm
Location: New Zealand
Contact:

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

Post by edward850 »

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
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

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

Post by Graf Zahl »

Normally ACC should throw an error for this mistake, so I'm leaving the report open.
User avatar
Cryomundus
Posts: 497
Joined: Thu Oct 31, 2013 12:33 pm

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

Post by Cryomundus »

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
Hege Cactus
 
 
Posts: 368
Joined: Wed Feb 19, 2014 3:23 am

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

Post by Hege Cactus »

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
Cryomundus
Posts: 497
Joined: Thu Oct 31, 2013 12:33 pm

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

Post by Cryomundus »

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
Hege Cactus
 
 
Posts: 368
Joined: Wed Feb 19, 2014 3:23 am

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

Post by Hege Cactus »

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
scroton
Posts: 148
Joined: Sat Apr 27, 2013 10:53 am

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

Post by scroton »

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 all

#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 all

#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 all

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

#library "CHACS" 
to

Code: Select all

#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
Cryomundus
Posts: 497
Joined: Thu Oct 31, 2013 12:33 pm

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

Post by Cryomundus »

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:
Post Reply

Return to “Closed Bugs [GZDoom]”