Get/Set blackboard with invalid key crashes editor

Pretty minor really but no matter how many times I do it I keep forgetting to set my blackboard key selector variables as public and when you hit a get/set blackboard variable it crashes the editor.

It would be nice if it could handle this gracefully somehow, either displaying a warning, just crashing the game rather than the whole editor or something like that.

Branch: Binary

Build: 4.1.1

Steps: Create a BlackboardKeySelector variable on a blueprint task or service and forget to make it public. When it tries to use this key the editor crashes.


Hi Danie1,

I haven’t been able to reproduce this issue yet. Could you post a screenshot of your exact Blueprint setup using the variable.

Thanks, TJ

It took a while, because like all good bugs, I couldn’t reproduce it myself when I wanted to!

I don’t know if this helps at all but I submitted the crash report at 18:50 03/06/14 UTC with this data
“We apologize for the inconvenience.

I tried to recreate it by following these steps:

New project, include starter content
New Misc, Data Asset, BlackboardData
Add Key, Name = Target Point, Type = Vector
Preferences, experimental, enable btree editor
New Blueprint, BTTask_BlueprintBase parent
New Misc, BTree
  Add Selector
  Add task, using above blueprint
In the bluepring
  New variable, type blackboard key selector, don't make it visible/public
  Add event reveive execute
  Add set blackboard value as vector
  Hook up the variable as the key
  Wire in the set
  Wire in the execute finish, just in case
New Blueprint, AIControler parent
  In this blueprints graph
  Add Event being play
  Add Run behavior tree and choose the btree
New Blueprint, Character parent
  In this characters defaults, set AIController class to the one created above
In the level blueprint
  From event begin play
  Spawn actor with the above character class
  (I spawned at player start)  
  Spawn a default controller 

But it worked fine!

Then I remembered a little change I made to my project after I’d finished implementing the AI - I delete a “None = ??” node from the blackboard.

I added another entry to my test blackboard and hit simulate and it crashed straight away.

It seems to be a combination of a null/invalid key and querying a blackboard that contains a None/None key/value.

This is why I hit it loads of times when I was using it the other night, I had accidentally added one too many keys when I originally set up the blackboard.

Thanks for looking into it. :slight_smile:

First of all it’s quite possible we’ve already fixed that since we’re still constantly iterating on this code.

Having said that I’ll look into making double sure we have appropriate sanity checks in place.

Thanks for reporting this!