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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

UE 4.11.2 Editor crash when loading C++ project

While compiling some C++ code changes the editor just shut down on me. Now I can't load the project because every time I try to open it the editor crashes. I have tried deleting the project \Save and \Intermediate folders with no success.

This is a project migrated from 4.10.4. Have worked on it/compiled code for several days before the crash today.

Mini-dump reports Exception code 0xC0000005, The thread tried to read from or write to a virtual address for which it does not have the appropriate access.

Excerpt of log (entire log is attached):

 [2016.05.03-07.14.18:953][  0]LogStreaming:Warning: Failed to read file '../../../Engine/Content/Editor/Slate/Common/Selection_16x.png' error.
 [2016.05.03-07.14.18:953][  0]LogSlate: Could not find file for Slate resource: ../../../Engine/Content/Editor/Slate/Common/Selection_16x.png
 [2016.05.03-07.14.18:953][  0]LogStreaming:Warning: Failed to read file '../../../Engine/Content/Editor/Slate/Common/Selection_16x.png' error.
 [2016.05.03-07.14.18:953][  0]LogSlate: Could not find file for Slate resource: ../../../Engine/Content/Editor/Slate/Common/Selection_16x.png
 [2016.05.03-07.14.18:953][  0]LogStreaming:Warning: Failed to read file '../../../Engine/Content/Editor/Slate/Common/Selection_16x.png' error.
 [2016.05.03-07.14.18:953][  0]LogSlate: Could not find file for Slate resource: ../../../Engine/Content/Editor/Slate/Common/Selection_16x.png
 [2016.05.03-07.14.19:373][  0]LogUdpMessaging: Initializing bridge on interface 0.0.0.0:0 to multicast group 230.0.0.1:6666.
 [2016.05.03-07.14.19:628][  0]LogWindows:Error: === Critical error: ===
 Fatal error!
 
 [2016.05.03-07.14.19:659][  0]LogExit: Executing StaticShutdownAfterError
 [2016.05.03-07.14.19:660][  0]LogWindows: FPlatformMisc::RequestExit(1)
 [2016.05.03-07.14.19:660][  0]Log file closed, 05/03/16 09:14:19


[1]: /storage/temp/89258-aircombat1cpp.log

Product Version: UE 4.11
Tags:
aircombat1cpp.log (10.2 kB)
more ▼

asked May 03 '16 at 07:34 AM in C++ Programming

avatar image

astroblaster
1 1 3

avatar image astroblaster May 03 '16 at 10:53 AM

I have found a way to reproduce this, works every time. Steps:

1 Create new C++ project using Flying template

2 Edit the Pawn associated source file in Visual Studio (2015), go to constructor and add following after line 17:

 static FConstructorStatics ConstructorStatics; //Add code below after this row
 float tSecs = GetWorld()->GetTimeSeconds(); //<--- Add this

3 Save in VS, switch to UE editor and press compile

4 Watch the editor crash. I can reproduce this 100% of the time.

5 Now try to open the project that just crashed -- the editor will crash while loading.

To recover:

6 Remove the reference to GetWorld()->GetTimeSeconds(), recompile in VS.

7 Try to open the project in UE4 editor now and watch it load just fine.

Okay so I am new to the entire UE4 dev environment but surely the editor should not crash because of a erroneous line of code?

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

1 answer: sort voted first

Hey astroblaster-

The cause of the crash is the GetWorld() call before the world actually exists. If you wrap that specific line inside an if(GetWorld()) call, you should be able to load the editor without the crash. This will ensure that it checks for the world before trying to access it.

Cheers

Doug Wilson

more ▼

answered May 03 '16 at 04:22 PM

avatar image astroblaster May 04 '16 at 07:56 AM

Hey Doug,

Thanks, yes I finally figured out that calling this method in the constructor was a big no no so initial problem solved.

But I think the main issue remains and should be filed as a bug. The editor should handle misplaced code gracefully instead of crashing, or at the very least generate a clear message in the error dialog about the reason for the crash.

Thanks for looking into this.

(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