x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Access violation - code c0000005 (first/second chance not available)

Hey, i got an error with code of c0000005 (first/second chance not available). When I look at log reports i decided to its related with RenderCustomDepth error. Thats happening when I'm playing over 4,5 mins later.

I have a method on Event Tick which called CheckForInteractable. I'm invoking this method on my Event Tick and in this method i get a component with using raytracing and changing CustomDepth of StaticMeshComponent.

Crash Reporter Log -> https://paste.ubuntu.com/24988889/

(FirstPersonCharacter.cpp) CheckForInteractable Method -> https://paste.ubuntu.com/24988995/

(Pickup.cpp) -> https://paste.ubuntu.com/24989009/

Product Version: UE 4.16
Tags:
more ▼

asked Jun 30 '17 at 01:16 PM in C++ Programming

avatar image

Khubur
145 7 11 13

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

What you really need to do is attach a debugger and diagnose the issue. It will break on the exception and you'll be able to see what's gone wrong. Whilst logs are handy if it's something obvious, looking at logs is no real replacement for debugging.

Based on what you've posted however, in case you don't know, 0xc0000005 is STATUS_ACCESS_VIOLATION (defined in winnt.h); an error occurred because of an attempt to access memory outside the process's memory address space. This indicates that a pointer (or reference in some cases) is invalid.

In your case, I would assume that the log is one line out, and the error is actually on line 3126 where UPrimitiveComponent accesses its member bRenderCustomDepth; which would indicate that the UPrimitiveComponent pointer is null or garbage. So I'd double check the PickupMesh pointer in both your APickup functions before dereferencing (->) the pointer.

 void APickup::SetCustomRenderFalse()
 {
     check(PickupMesh);
     ...

But really this is an (informed) stab in the dark; like I say what you really need to do is attach a debugger (Visual Studio: Debug | Attach To Process -> UE4Editor.exe). Then recreate the error, check the "this" pointer in the Watch Window and step up the Callstack. The issue should present itself.

more ▼

answered Jul 03 '17 at 12:03 PM

avatar image

DerPurpelHelmut
521 8 12 25

avatar image Plosnita Jul 03 '17 at 01:42 PM

Really nice answer. I would accept this if it was my question.

avatar image Khubur Jul 11 '17 at 10:07 AM

Thanks for helping out. Question feedback was very helpful.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question