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

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.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Code: C0000005 (Access Violation - tried to read address)

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

by Alekv » Mon May 22, 2017 8:16 am

Thanks for the reply =)

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

by _mental_ » Mon May 22, 2017 7:47 am

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

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

by Alekv » Mon May 22, 2017 6:49 am

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

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

by Nash » Sat May 20, 2017 11:36 am

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)

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

by Graf Zahl » Sat May 20, 2017 9:47 am

They were identical because when implementing USEACTORPITCH the incorrect code got copied and not fixed by accident.

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

by Alekv » Sat May 20, 2017 8:38 am

_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.

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

by _mental_ » Sat May 20, 2017 8:22 am

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.

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

by Alekv » Sat May 20, 2017 6:11 am

_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

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

by _mental_ » Sat May 20, 2017 5:18 am

So, only some of models are affected, right?
Please give me names of a few actors with models oriented incorrectly.

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

by Alekv » Sat May 20, 2017 3:04 am

_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:

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

by _mental_ » Sat May 20, 2017 1:29 am

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?

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

by _mental_ » Wed May 17, 2017 6:23 am

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.

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

by Alekv » Wed May 17, 2017 3:14 am

Many thanks, I sent a private message with all the details

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

by _mental_ » Wed May 17, 2017 1:14 am

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.

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

by Alekv » Tue May 16, 2017 5:15 pm

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?

Top