x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Resizing array of classes and then saving gives warning

I currently have a struct that takes a class. I then save this class without anything in it (NULL) and any time I later try to get the save object it shows the warning:

 LogUObjectGlobals:Warning: Failed to find object 'Object None.None'.

From testing I find this gives the warning whenever an empty class has been saved. For my inventory I need to be able to resize an array and fill with empty classes and keep that structure when I save. Is there any way I can fix this?

Edit: Here are the steps needed to reproduce on a fresh project

  • Create new project

  • Create Save Game

  • Add two variables inside the save game, one a string with any text inside and the second an array of actor classes.

  • Open the player character and repeat what is shown in this image.

  • In the output log it will say LogUObjectGlobals:Warning: Failed to find object 'Object None.None'.

It looks like resizing the array causes this warning. How can I and others get around it?

My current engine version is 4.14.3. It also occurred in the first 2 releases of 4.14.

This warning didn't occur in UE 4.12.5 or 4.13.

Product Version: UE 4.14
Tags:
more ▼

asked Jan 10 '17 at 09:14 AM in Blueprint Scripting

avatar image

ALegendsTale
113 5 9 13

avatar image CitéNoir Jan 11 '17 at 03:19 PM

hm, just for understanding. why do you need to save the class if its empty?
and what else is inside the struct?

avatar image ALegendsTale Jan 11 '17 at 03:29 PM

If I have 30 inventory slots and numbers 1, 9, and 15 have items inside, when I reload the inventory after saving I want those items to still be at 1, 9, and 15. The way my inventory is based off is the item class and stack amount in a slot. So for slots without items I leave the class and stack at nothing but they still must be there as filler inbetween the slots that have items.

I suppose one way I can solve is by having a dummy class, but that wouldn't be my preference. This warning only appears after my upgrade to 4.14 from 4.12.

avatar image JeromeParent Jan 11 '17 at 04:27 PM

It shouldn't return a warning unless you are actually trying to access the contents at that empty index. I'm sure you are accessing every index so you can see if there's something in it, but you should be able to prevent the warning by using IsValid or !=None on the class variable for each index before actually trying to do something with it.

avatar image ALegendsTale Jan 11 '17 at 04:33 PM

The warning happens whenever I access my save game object. I have a pure function that I use to get the save game and when using it to print a separate unrelated boolean it will still warn me.

The only thing that would make sense is if the function that gets my save game was compromised, but the base of it is done in c++ so there shouldn't be a reason for that.

Additionally most if not all of my inventory functions check if the class is valid but maybe a couple slipped past. I will check anyways, thanks for the suggestion!

avatar image CitéNoir Jan 11 '17 at 06:42 PM

i know this is not helpful for your problem, but i also only got the warning, after updating from 4.13 to 4.14. in 4.13 it worked without warning.

avatar image ALegendsTale Jan 13 '17 at 03:53 AM

Thank you for this information, I will added it to the main question

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

So I ended up posting the question to Reddit with different phrasing and someone helped me fix it. This is a month after I first had the problem and I've just tried to ignore it since then. I had hopes 4.15 would change things but it didn't.

The gilded comment in this thread helped me solve the issue.

more ▼

answered Feb 22 '17 at 06:31 AM

avatar image

ALegendsTale
113 5 9 13

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question