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"

[4.9.0] - Undo In Certain Case Causes Crash

Hey Guys,

Found a bug in 4.9. I created an asset after deleting one. I was going to rename the new asset the as the new one but forgot that I needed to submit to source control. Without thinking, I accidently hit Ctrl+Z to undo and it caused an editor crash.

More specifically, its in Transactor.h at the following line of code... Res = ReferencedObjects[ObjectIndex].GetObject();

 FArchive& operator<<( class UObject*& Res ) override
             {
                 int32 ObjectIndex = 0;
                 (FArchive&)*this << ObjectIndex;
                 Res = ReferencedObjects[ObjectIndex].GetObject();
                 return *this;
             }

ObjectIndex was showing a value of 65537 and the size at the time of the ReferencedObjects array was 2

Hope this helps and the team is having a great week :D

Thanks!

Product Version: UE 4.9
Tags:
more ▼

asked Sep 02 '15 at 01:07 AM in Bug Reports

avatar image

MC Stryker
453 22 37 48

avatar image Tim C ♦♦ STAFF Sep 02 '15 at 10:46 PM

Hi MC Stryker,

I tried to reproduce this in a new test project, but was unable to do so. After creating several assets, saving, closing and reopening the project, I deleted one of the assets, then created a new asset and pressed Ctrl-Z. Nothing happened. When I checked the Undo history, it was empty. Would you be able to provide some additional information?

  • Do you recall specifically what type of asset you had deleted and created just prior to the crash?

  • Do you recall if you had made any edits to the deleted asset just before it was deleted?

Tim

avatar image MC Stryker Sep 03 '15 at 08:15 PM

Hey Tim, long time buddy.

Let me think here... okay I think I remember a couple other details about what I was doing at that moment. I had created a Blueprint (Pawn based Actor) a while back and wanted to replace it with another that had the same name. Mind you, on this game, its using Perforce and was active at the time during this (in case Perforce is related).

I didn't have any of those Actors in the scene at the time so no instances present and what I usually do is rename an Asset to 'Name'_DEPRECIATED and on the next build check-in, I then usually re-reference that asset in any levels/actor instances current (in a case like this where I wanted it to be re-created). I think I was moving real quick and deleted the original asset, created a new one, attempted to rename it but was told about conflicts and at that moment, I hit undo (Ctrl+Z) accidently and was presented with this error.

Anyways, let me know your thoughts and its possible that extra information will help out. Hope you've been well since we last spoke and take it easy Tim!

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

1 answer: sort voted first

Hi MC Stryker,

I have tried to reproduce the crash that you described off and on for a while, and still have not been able to reproduce it. If you happen to have any additional details that may help, regardless of how minor they may seem, that would be great. I will mark this as resolved for now, but I will keep trying to reproduce the crash and will let you know if I am successful.

Tim

more ▼

answered Sep 15 '15 at 10:11 PM

avatar image MC Stryker Sep 15 '15 at 10:48 PM

Hey Tim,

It was an odd case so if it does happen again, I'll be sure to let you know. It is pretty rare thankfully but wish I had some more information.

The only other thing I can think of is it might have been possible when I did this, that the Actor may have been referenced in the level at the time by another Actor. I may have been presented the dialog to replace references and its possible some redirector underneath the covers was unaccounted for possibly.

The second I do happen to see this again, I'll be sure to immediately let you know and attempt to reproduce it if I can hopefully do so. Let me know of course if you do have any progress but in the meantime, one thing that could avoid it is changing the following...

 1. FArchive& operator<<( class UObject*& Res ) override
 2.             {
 3.                 int32 ObjectIndex = 0;
 4.                 (FArchive&)*this << ObjectIndex;
 5.                 Res = ReferencedObjects[ObjectIndex].GetObject();
 6.                 return *this;
 7.             }
 

To this... Note: I have no idea how this would affect the chain so this might not work properly but its a thought :)

 1. FArchive& operator<<( class UObject*& Res ) override
 2.             {
 3.                 int32 ObjectIndex = 0;
 4.                 (FArchive&)*this << ObjectIndex;
 5.                 Res = ReferencedObjects.LastIndex() < ObjectIndex ? nullptr : ReferencedObjects[ObjectIndex].GetObject();
 6.                 return *this;
 7.             }

Anyways, keep me posted and have a great day Tim!

(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