Help with Unreal crash (Unhandled Exception: EXCEPTION_ACCESS_VIOLATION)

Hey everyone,
So I got this weird crash in Unreal. Everything’s compiling correctly but then when I press play the editor crashes :

So I go to the line 330 of my c++ class and comment it out. When I try pressing play again it crashes and points to the line below it. I comment this one out. Then it’s the one above…

Then when I try to press play, the error becomes :


Which points to the parent function itself, in Tick. So ok, I go there and comment it out then everything works fine again.
unreal crash_line 85

Now, what’s weird is that HandleCamera() was working for several hours. I haven’t touched this part of code since, but now it suddenly crashes.

(It’s interesting to note the change of adress in the Unhandled Exception between the first and second picture I posted.)

I’m at a loss to determine what exactly is causing this error.
If anyone knows how to fix this I’d very much appreciate it!

(Browsing the web I’ve seen several posts about the Unhandled Exceptions but it was mostly GPU drivers issues or things like this, which I’d assume is clearly not the problem here.)

Ok, so I think I found a solution.

The problem seemed to come from the UCameraComponent variable I was using. I remember changing the “in-editor name” (whatever you call this in the TEXT() section of CreateDefaultSubobject()) not long before everything went to sh*t.

So I deleted the variable entirely and created another one and now everything’s working like a charm (for how long one might ask hehe).

So what I understand is that you have to be extremely careful when handling any changes in already existing variables, especially UComponents I guess. Unreal doesn’t seem to be able to find references to them if something as trivial as this has changed.

Anyway now I can finally go back to working on other things!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.