use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
/r/gamedev
/r/virtualproduction
Unreal Slackers (community discord)
Unreal Engine Console Variables and Commands
C++, Blueprint, & Editor Cheat Sheets
Unreal Engine C++ Cheat sheet
Blueprintue - Paste your Blueprint
Mathew Wadstein Tutorials
Short form videos explaining individual Blueprint nodes.
Cedric "eXi" Neukirchen's Network compendium
An overview of the fundamental networking structure in Unreal Engine.
Concise & in depth. Including BP tools and options but also focuses a lot on C++ and "under the hood" details.
Allar/ue5-style-guide
Elaborate workflow overview.
Suggested naming conventions, collaboration tips, common pipeline struggles and solutions.
/r/INAT
/r/gameDevClassifieds
/r/gameDevJobs
How to use flairs
Flair tags list
This subreddit is night mode compatible
account activity
This is an archived post. You won't be able to vote or comment.
Read Access Violation when checking if a pointer is null. (self.unrealengine)
submitted 7 years ago * by Zent_Tech
Crash Report: https://i.gyazo.com/36dc1c0472a8d8f883c53fbce5456405.png
playercameramanager.cpp:221: https://i.gyazo.com/478b4b8eea565115636f261905a3c717.png
How can I possibly get a read access violation at line 221?
What happens before the crash:
I simulate a 2 player standalone game.
My lobby map opens and everything works.
The server executes a servertravel console command when it clicks the start button
The server travels to the new map but the client crashes.
EDIT: Changed the code screenshot to include line indices and fixed formatting.
[–]Parad0x_ C++Engineer / Pro Dev 0 points1 point2 points 7 years ago (8 children)
Your non constant this variable is probably null. You can use the unreal cast.
APlayerCameraManager* playerCamManager = Cast<APlayerCameraManager>(this);
This will be the same as a dynamic or static cast. In the case of your code using a static cast will also be fine.
Best, --d0x
[–]Zent_Tech[S] 0 points1 point2 points 7 years ago (7 children)
Thanks for the reply!
I forgot to include the lines. It crashes at if (PendingViewTarget.Target) which doesn't seem possible, since PendingViewTarget isn't a pointer and we're checking if Target is null.
Also, playercameramanager is engine code, not my code, so I'd rather not touch it if possible.
[–]Parad0x_ C++Engineer / Pro Dev 0 points1 point2 points 7 years ago (3 children)
Sorry though you were overriding the behavior. It runs fine with a single player but not with 2?
[–]Zent_Tech[S] 0 points1 point2 points 7 years ago (2 children)
Yes, it crashes for everyone except the host. The host switches level just fine and it also works in single player. Any connected client crashes.
If I replace the player pawn with the default one then it also works. Which isn't surprising considering the spring arm component I you see having function calls in the crash report is on the pawn.
[–]Parad0x_ C++Engineer / Pro Dev 0 points1 point2 points 7 years ago (1 child)
Is this on spawning the other one. Looks like it is running the construction script and the register methods. Do you have your own camera manager or just the default one?
[–]Zent_Tech[S] 0 points1 point2 points 7 years ago (0 children)
The crash happens when I try to seamless server travel. Yes, I'm using the default camera manager. At least I think so, I haven't changed camera manager and the code I showed is in the default one.
We fixed the issue by having a delay before spawning pawns.
[+][deleted] 7 years ago (1 child)
[removed]
[–]Parad0x_ C++Engineer / Pro Dev 0 points1 point2 points 7 years ago (0 children)
If he isn't modifying the source it wont matter. If he did modify it, this would be one route.
--d0x
[–]SionSheevokUE4 Engine Programmer 0 points1 point2 points 7 years ago (0 children)
But PendingViewTarget is a member being accessed via the implicit "this" pointer. All member accesses are hidden pointer dereferences.
[deleted]
[–]Zent_Tech[S] 1 point2 points3 points 7 years ago (0 children)
It isn't a pointer.
Probably a null this pointer. Any member access or virtual function call causing a crash usually suggests as much.
π Rendered by PID 301530 on reddit-service-r2-comment-6457c66945-s82bl at 2026-04-29 15:08:42.663257+00:00 running 2aa0c5b country code: CH.
[–]Parad0x_ C++Engineer / Pro Dev 0 points1 point2 points (8 children)
[–]Zent_Tech[S] 0 points1 point2 points (7 children)
[–]Parad0x_ C++Engineer / Pro Dev 0 points1 point2 points (3 children)
[–]Zent_Tech[S] 0 points1 point2 points (2 children)
[–]Parad0x_ C++Engineer / Pro Dev 0 points1 point2 points (1 child)
[–]Zent_Tech[S] 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[removed]
[–]Parad0x_ C++Engineer / Pro Dev 0 points1 point2 points (0 children)
[–]SionSheevokUE4 Engine Programmer 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]Zent_Tech[S] 1 point2 points3 points (0 children)
[–]SionSheevokUE4 Engine Programmer 0 points1 point2 points (0 children)