Accessed None error causing Log Spam

I’m starting to have more problems with the editor. Since I upgraded to 4.7.2, the editor has started to use a LOT of memory, reaching 12GB (out of my 16GB). It seems to be related to some random error that is flooding the logs. I managed to clear the last one, but this one is really confusing me. My output log is being flooded with this:

Everything was running fine this morning. no errors, didnt seem to be running slow like it does when it starts using 12GB. I took a break for lunch, and didnt use the editor for about an hour. When I came back to it, the map Example_Map, was almost completely unresponsive. And the output log was being flooded. I tried changing a few of the GetPlayerCharacter nodes, and that didnt seem to do anything. I refreshed all nodes in my controller and then mycharacter BP, and it cleared. I saved, and restarted the editor, the error came back.

I just deleted all the GetPlayerCharacter nodes, and the error went away.
This seems to be showing up in the log when I compile mycontroller or mycharacter:

LogActorComponent: UnregisterComponent: (/Engine/Transient.CharMoveComp) Not registered. Aborting.
LogActorComponent: UnregisterComponent: (/Engine/Transient.MyInventory_0) Not registered. Aborting.

Ok one by one replaced the GetPlayerCharacter nodes. The problem starts up when I Get character movement.
…ok nope nevermind. I deleted that and the error popped back up.

I have no ********* clue whats going on. This is not the first that I’ve literally done nothing and it seems like my whole ********* blueprint is corrupt.

The editor has now had 2 days to think about what its done, and I’ve loaded it up to see if the issue still persists. I get these errors/warnings when I first loaded the project today:

LogDirectoryWatcher:Warning: Failed to begin reading directory changes for …/…/…/Engine/Plugins/Experimental/CharacterAI/Content/. Error: 0
LogTargetPlatformManager:Display: Building Assets For Windows
LogTargetPlatformManager:Display: Building Assets For Windows
LogLinker:Warning: Can’t find file ‘/Game/TwinStickBP/TwinStickOverview’
LogLinker:Warning: Can’t find file ‘/Game/TwinStickBP/TwinStickOverview’
LogUObjectGlobals:Warning: Failed to find object ‘Class /Game/TwinStickBP/TwinStickOverview.TwinStickOverview_C’
LogSlate:Warning: Failed to load font data from ‘…/…/…/Engine/Content/Editor/Slate/Fonts/Roboto-Regular.ttf’
LogSlate:Warning: Failed to load font data from ‘…/…/…/Engine/Content/Editor/Slate/Fonts/Roboto-Bold.ttf’
LogCook:Display: Done creating registry. It took 0.00s.
LogLinker:Warning: Asset ‘…/…/…/Engine/Content/EngineMeshes/Humanoid.uasset’ has been saved with empty engine version. The asset will be loaded but may be incompatible.
LogCrashTracker: Crashtracker disabled due to settings.
LogSlate:Warning: Failed to load font data from ‘Veranda’
LogUObjectGlobals:Warning: Failed to find object ‘Class None.’
LogLoad: Full Startup: 16.43 seconds (BP compile: 0.26 seconds)

the Twinstick template has nothing to do with this project at all. Sometime over the weekend I created the twinstick template to check something (I dont remember what).

Project ran before opening of any BPs. Open up PlayerController Blueprint and problems is still existant. Deleting GetPlayerCharacter nodes still clears error, but makes blueprint unable to compile.

Edit:
Project still runs while the editor is spamming the error in original post. And while the play in editor is running, the error stops.

Hey Interitus,

Do you think we could get your dxdiag info, a copy of your logs([Project]/saved/logs), and a copy of your project? When you upload it, you can PM me the link on the forums.

Hey Interitus,

So we were able to reproduce this. I’m continuing to investigate the issue. We think that because the “MyCharacterRef” technically points to nothing when the game isn’t running, it’s returning a null value. As for it spamming the log with that when you’re simply editing the BP, that’s what I’m entering a bug report for.

For a workaround, inserting “Is Valid” nodes has helped with “Access None” errors in the past. I went through your MyController blueprint and found where inserting this node would help get rid of the log spam.

After inserting this, can you still keep an eye on your resource consumption? I’d like to make sure this workaround didn’t just mask the problem.

EDIT: Bug entered as UE-11912 (listed here for tracking purposes)

Awesome I’m glad you could reproduce the problem!

So the problem is MyCharacterRef? Is doing this considered bad practice, and better to cast to MyCharacter each time? I’ve been doing it mainly to simplify the blueprints, and reduce the number of casts.

As for resource consumption, the editor was using about 540MB prior to loading up MyController. In the time it took me to add the IsValid nodes, it jumped up to about 965MB. I cleared the output log, and it dropped a few MBs.

I’ll try and keep an eye on memory as I use the editor, but I probably wont be able to spend any solid amount of time until the weekend :frowning:

Well, in places that you could potentially be accessing a “null” value (like with a reference to the character, which only exists when you’re in game), it’s recommended that it be guarded by an ?IsValid node.

I don’t believe it’s bad practice, but it tends to return a null value. You should be fine now though.

This particular log spam was eating up a lot of resources. I don’t believe that’ll be a problem with the ?IsValid check in place though. Let me know if your memory usage still goes up.

I’ve had the chance to use the editor for extended period over the last few days, and with the IsValid nodes, the log spam is gone and so is the overzealous memory usage. It typically starts at about 550MB, then slowly climbs to about 1.2GB as I use the editor, but I havent seen it go over. Thanks a lot!

That’s awesome! Feel free to let us know of any other issues that you may have!