Announcement

Collapse
No announcement yet.

Access Violation Reading Location while checking for nullptr

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Access Violation Reading Location while checking for nullptr

    For some reason I cannot explain, this code is erroring out whenever I try and check for a nullptr.

    Does anyone know how I can fix this? It specifically errors out inside that condition. But I know for a fact that these are not null because I'm using the debugger at the same time and can see that they're not.

    Code:
                if (Sidekick != nullptr && FollowerAIControllerClass != nullptr)
                {
                }
    Unhandled exception at 0x00007FFBCBF9ABDA (UE4Editor-Engine.dll) in UE4Editor-Win64-DebugGame.exe: 0xC0000005: Access violation reading location 0x0000000000000000.

    #2
    "UE4Editor-Engine.dll" Unless your code is in the Engine module, it's not your code that is reporting the access violation.

    Comment


      #3
      Originally posted by GBX_botman View Post
      "UE4Editor-Engine.dll" Unless your code is in the Engine module, it's not your code that is reporting the access violation.
      How can I go about resolving this?

      Comment


        #4
        Eh, It's more likely that whatever is calling that code is null, not those objects themselves (which could be garbage values) - the engine is likely just a middle-man. Pretty rare to actually have a crash in one of the engine DLLs.

        You can grab the Engine Debug Symbols from the Epic Launcher if you want more info.
        Able Ability System - A high performance, robust ability system for UE4. Now Available!

        Comment

        Working...
        X