Code: C0000005 (Access Violation - tried to read address)

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
Alekv
Posts: 170
Joined: Mon Jun 08, 2015 12:41 am
Location: My world :)
Contact:

Code: C0000005 (Access Violation - tried to read address)

Post by Alekv »

And so, already there is at least something about bug, about which i wrote earlier!
Only this time I caught him and GZDoom v3.1
Here is a screenshot
Image

And the report
https://drive.google.com/open?id=0B-rJU ... HNnNV9vMlE

I also think that this is the same bug about which i wrote earlier, because It appears under the same conditions, namely it is connected with autosaves!

Unfortunately I can not collect a minimum set for the test of this bug = (
Just playnig the whole game that you just have to go through to see bug.

Previously I thought that there was a problem in my PC.
But I set myself a Windows 10 x64, and also bought a new ssd..
The error is still there, but in a different guise.

Previously a bug appeared on Windows 7 x32
screen:
Image


I hope this bug will be fixed =)

And i just want to ask right away, about the 3d models
From GZDoom version 3.0+ 3d model turned to the other side, could you add an option in to gzdoom, which gzdoom uses the old rotation of 3d models?

turn manual 300+ 3d model .. it's a very, very long time
User avatar
Alekv
Posts: 170
Joined: Mon Jun 08, 2015 12:41 am
Location: My world :)
Contact:

Re: Code: C0000005 (Access Violation - tried to read address

Post by Alekv »

I also want to add I tested on a laptop and it's exactly the same error!
Features of my PC:
RAM: 4GB
CPU: 2 cores at 2.7Hz amd athlon x 64
Video card: Nvidia GTX 750 ti 2gb
Ssd kingston 240gb
OS: Win 10 x64

Laptop Features:
CPU: intel core i7-3517U 2.40GHz 4 cores
CPU: 4gb
OS: Win 8.1
VideoCard: Intel HD Graphics 4000

laptop crash report:
https://drive.google.com/open?id=0B-rJU ... lYzeE5IWWc

The user Korshun also testing on his PC, he has 16 GB of RAM and this error is not appear!

To catch this bug, you need to download the archive with my game, load the save and just press F2 (bind autosave), but this should be done on a PC with a small count RAM i.e. less 6gb

Give you a link, to the game for testing the bug?
Will you try to fix this bug?
_mental_
 
 
Posts: 3820
Joined: Sun Aug 07, 2011 4:32 am

Re: Code: C0000005 (Access Violation - tried to read address

Post by _mental_ »

Alekv wrote:Give you a link, to the game for testing the bug?
Will you try to fix this bug?
Send me PM with everything needed to reproduce the crash.
I can't promise quick resolution though, probably will check on weekend.
Alekv wrote:And i just want to ask right away, about the 3d models
From GZDoom version 3.0+ 3d model turned to the other side, could you add an option in to gzdoom, which gzdoom uses the old rotation of 3d models?
Please make separate bug report with a minimal sample attached.
User avatar
Alekv
Posts: 170
Joined: Mon Jun 08, 2015 12:41 am
Location: My world :)
Contact:

Re: Code: C0000005 (Access Violation - tried to read address

Post by Alekv »

Many thanks, I sent a private message with all the details
_mental_
 
 
Posts: 3820
Joined: Sun Aug 07, 2011 4:32 am

Re: Code: C0000005 (Access Violation - tried to read address

Post by _mental_ »

The crash is caused by drawing of particle during offscreen rendering for save game's thumbnail at gl_sprite.cpp:331:

Code: Select all

sector_t *cursec = actor ? actor->Sector : particle ? particle->subsector->sector : nullptr;
There was nullptr in particle->subsector.
Spoiler: Callstack
The particle in question was not processed yet in P_ThinkParticles() function, i.e. it had initial lifetime value and subsector was nullptr.
The crash itself is fairly random so I cannot say for sure but it seems like P_SpawnParticle() was called after P_ThinkParticles().

IMHO the best solution will be to add the following line to P_SpawnParticle() function:

Code: Select all

particle->subsector = R_PointInSubsector(particle->Pos);
Alternatively, we can add checks for nullptr in subsector member everywhere. But it's hardly the right way to solve initialization problems.
_mental_
 
 
Posts: 3820
Joined: Sun Aug 07, 2011 4:32 am

Re: Code: C0000005 (Access Violation - tried to read address

Post by _mental_ »

About the issue with 3D models: I'm not quite sure what was changed to them.
Could you please post screenshots from different versions of GZDoom with the same model?
User avatar
Alekv
Posts: 170
Joined: Mon Jun 08, 2015 12:41 am
Location: My world :)
Contact:

Re: Code: C0000005 (Access Violation - tried to read address

Post by Alekv »

_mental_ wrote:About the issue with 3D models: I'm not quite sure what was changed to them.
Could you please post screenshots from different versions of GZDoom with the same model?
It seems to me that the models have different angle and scaling in GZDoom 3.0 and 3.1
This screen GZDoom 3.1:
Spoiler:
This screen GZDoom 2.3:
Spoiler:
_mental_
 
 
Posts: 3820
Joined: Sun Aug 07, 2011 4:32 am

Re: Code: C0000005 (Access Violation - tried to read address

Post by _mental_ »

So, only some of models are affected, right?
Please give me names of a few actors with models oriented incorrectly.
User avatar
Alekv
Posts: 170
Joined: Mon Jun 08, 2015 12:41 am
Location: My world :)
Contact:

Re: Code: C0000005 (Access Violation - tried to read address

Post by Alekv »

_mental_ wrote:So, only some of models are affected, right?
Please give me names of a few actors with models oriented incorrectly.
Maybe. Some models are still displayed normally.
But many those that are not correct.
For fix bug need does full list models or enough 2-3?

Here are names of some models that are not shown correctly.

Code: Select all

PL1_Old_Center2
LogForBridgeVertical
Land1
_mental_
 
 
Posts: 3820
Joined: Sun Aug 07, 2011 4:32 am

Re: Code: C0000005 (Access Violation - tried to read address

Post by _mental_ »

Models themselves are fine. The problem is caused by inverted applying of actor's pitch.
This was fixed for 3.0 but you are utilized the effect of this bug.

I'm afraid there will no compatibility option for this.
For projects with small number of models I would suggest to fix maps by setting correct pitch.
I guess this is an overkill for your case. You can use deprecated INHERITACTORPITCH flag for all models instead of USEACTORPITCH.
This flag activates old behavior, i.e. wrong model rotation you need.
User avatar
Alekv
Posts: 170
Joined: Mon Jun 08, 2015 12:41 am
Location: My world :)
Contact:

Re: Code: C0000005 (Access Violation - tried to read address

Post by Alekv »

_mental_ wrote:Models themselves are fine. The problem is caused by inverted applying of actor's pitch.
This was fixed for 3.0 but you are utilized the effect of this bug.

I'm afraid there will no compatibility option for this.
For projects with small number of models I would suggest to fix maps by setting correct pitch.
I guess this is an overkill for your case. You can use deprecated INHERITACTORPITCH flag for all models instead of USEACTORPITCH.
This flag activates old behavior, i.e. wrong model rotation you need.
Thanks for the answer!
About the difference between the flags INHERITACTORPITCH and USEACTORPITCH l did not know. Previously they were identical.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49225
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Code: C0000005 (Access Violation - tried to read address

Post by Graf Zahl »

They were identical because when implementing USEACTORPITCH the incorrect code got copied and not fixed by accident.
User avatar
Nash
 
 
Posts: 17487
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Code: C0000005 (Access Violation - tried to read address

Post by Nash »

I guess if one is inclined, they can do a text search-and-replace in all of the UDMF to fix the pitch of the actors involved... need to be careful though (and always keep a backup if it messes up)
User avatar
Alekv
Posts: 170
Joined: Mon Jun 08, 2015 12:41 am
Location: My world :)
Contact:

Re: Code: C0000005 (Access Violation - tried to read address

Post by Alekv »

Tell me please in this version bug corrected?

Code: Select all

Name						Posted				Size
gzdoom-g3.0pre-211-gfc86392.7z	May 20 2017 03:39:19	4,172,883
https://devbuilds.drdteam.org/gzdoom/gz ... fc86392.7z

I downloaded this version, tried it, but still has a bug = (
Image

CrashReport:
https://drive.google.com/open?id=0B-rJU ... FZXU2lWOUE
_mental_
 
 
Posts: 3820
Joined: Sun Aug 07, 2011 4:32 am

Re: Code: C0000005 (Access Violation - tried to read address

Post by _mental_ »

No, it was fixed after that. There is no build with the fix yet.
Post Reply

Return to “Closed Bugs [GZDoom]”