Just trying 4.4 preview on OSX. Something I do a lot, is create static meshes from BSP brushes in Unreal. Got a crash trying to do that with 4.4 Preview).
Steps to repro:
Launch 4.4 Preview
Create new
When in editor, go to Place | Geometry
Drag box into scene
Go to details for box brush
Under brush settings, clickreveal arrow for more options
Unfortunately thus far I have been unable to reproduce this on my end. Does this happen with any bsp brushes or specific ones (cylinder, cone, etc)? Can you post your logs and dxdiag so we can have a look at what may be going on? Thank you!
Hi ! As I stated in the body of the report, I am using OSX, so dxdiag is out of the question. I’ll change the title to reflect that also. As for the BSP type, in my steps to reproduce I said I was using the box brush. Thanks!
Line 5633 in /Engine/Source/Editor/UnrealEd/Private/Editor.cpp:
TSharedPtr RootWindow = FGlobalTabmanager::Get()->GetRootWindow(); <---- RootWindow is NULL!
FSlateApplication::Get().AddWindowAsNativeChild(CreateAssetFromActorWindow.ToSharedRef(), RootWindow.ToSharedRef()); <--- BOOM HERE
RootWindow is always coming back with NULL. Happens with the source version, happens in debug editor, development editor etc.
Which then asserts in debug here on Line 616 of /Engine/Source/Runtime/Core/Public/Templates/SharedPointer.h:
FORCEINLINE TSharedRef< ObjectType, Mode > ToSharedRef() const
{
// If this assert goes off, it means a shared reference was created from a shared pointer that was nullptr.
// Shared references are never allowed to be null. Consider using TSharedPtr instead.
check( IsValid() ); <---- ASSERT HERE
return TSharedRef< ObjectType, Mode >( *this );
}
And here is the cause, line 93 /Engine/Source/Editor/MainFrame/Private/MainFrameModule.cpp:
#if !PLATFORM_MAC // On OS X we don't want Top-Level windows to have a parent, as we don't really support the notion of child windows on that OS
FGlobalTabmanager::Get()->SetRootWindow(RootWindow);
FSlateNotificationManager::Get().SetRootWindow(RootWindow);
#endif
This means the FGlobalTabmanager will ALWAYS return NULL, causing the issue mentioned above. The #define, explains why you don’t see this issue on windows.
I was able to successfully reproduce this and have attached this as well as my own findings to a crash report for assessment. I will also mention your pull request in the bug report so we can get this resolved quickly. Thank you and have a great day!
Many thanks, but that’s not a correct fix for this issue. We don’t want RootWindow to be set on Mac. It should be NULL. I just committed a proper fix, it should be on GitHub soon - the code in Editor.cpp should check if RootWindow is valid and, if it’s not, use AddWindow() instead of AddWindowAsNativeChild().