The solution compiles just fine, but I can’t open the unreal project anymore. I’m getting a strange error too. I’ll post the log, but when I try to re-open the project, I crash then I get
UObject() constructor called but it's not the object that's currently being constructed with NewObject. Maybe you are trying to construct it on the stack, which is not supported.
Log LogTcpMessaging Initializing TcpMessaging bridge
Log LogUdpMessaging Initializing bridge on interface 0.0.0.0:0 to multicast group 230.0.0.1:6666.
Log LogWindows Windows GetLastError: The operation completed successfully. (0)
Error LogWindows === Critical error: ===
Error LogWindows
Error LogWindows Fatal error: [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/CoreUObject/Private/UObject/UObjectGlobals.cpp] [Line: 2572]
Error LogWindows UObject() constructor called but it's not the object that's currently being constructed with NewObject. Maybe you are trying to construct it on the stack, which is not supported.
Error LogWindows
Error LogWindows
Error LogWindows [Callstack] 0x00007fffb2714b59 KERNELBASE.dll!UnknownFunction []
Error LogWindows [Callstack] 0x00007fff4134d066 UE4Editor-Core.dll!UnknownFunction []
Error LogWindows [Callstack] 0x00007fff413507a8 UE4Editor-Core.dll!UnknownFunction []
Error LogWindows [Callstack] 0x00007fff4105e8cd UE4Editor-Core.dll!UnknownFunction []
Error LogWindows [Callstack] 0x00007fff41f975f3 UE4Editor-CoreUObject.dll!UnknownFunction []
Error LogWindows [Callstack] 0x00007fff2bdbf428 UE4Editor-Engine.dll!UnknownFunction []
Error LogWindows [Callstack] 0x00007fff0868243f UE4Editor-Escape.dll!UItemGrabber::UItemGrabber() [M:\Unreal Content\Projects\Courses\Escape\Escape\Source\Escape\ItemGrabber.h:47]
Error LogWindows [Callstack] 0x00007fff41cbc203 UE4Editor-CoreUObject.dll!UnknownFunction []
Error LogWindows [Callstack] 0x00007fff41f7fabf UE4Editor-CoreUObject.dll!UnknownFunction []
Error LogWindows [Callstack] 0x00007fff41f6287f UE4Editor-CoreUObject.dll!UnknownFunction []
Error LogWindows [Callstack] 0x00007fff41e92305 UE4Editor-CoreUObject.dll!UnknownFunction []
Error LogWindows [Callstack] 0x00007fff410999ea UE4Editor-Core.dll!UnknownFunction []
Error LogWindows [Callstack] 0x00007fff410c12a8 UE4Editor-Core.dll!UnknownFunction []
Error LogWindows [Callstack] 0x00007fff4580e7d3 UE4Editor-Projects.dll!UnknownFunction []
Error LogWindows [Callstack] 0x00007fff4580eaea UE4Editor-Projects.dll!UnknownFunction []
Error LogWindows [Callstack] 0x00007ff6e3d653a2 UE4Editor.exe!UnknownFunction []
Error LogWindows [Callstack] 0x00007ff6e3d68a62 UE4Editor.exe!UnknownFunction []
Error LogWindows [Callstack] 0x00007ff6e3d60eec UE4Editor.exe!UnknownFunction []
Error LogWindows [Callstack] 0x00007ff6e3d6125a UE4Editor.exe!UnknownFunction []
Error LogWindows [Callstack] 0x00007ff6e3d752bd UE4Editor.exe!UnknownFunction []
Error LogWindows [Callstack] 0x00007ff6e3d77fea UE4Editor.exe!UnknownFunction []
Error LogWindows [Callstack] 0x00007fffb4727034 KERNEL32.DLL!UnknownFunction []
Error LogWindows [Callstack] 0x00007fffb4f42651 ntdll.dll!UnknownFunction []
Error LogWindows
Log LogExit Executing StaticShutdownAfterError
Log LogWindows FPlatformMisc::RequestExit(1)
Log LogCore Engine exit requested (reason: Win RequestExit)
Here’s the full log:
ItemGrabber.h line 47 is just the float declaration for our reach.
Here’s the scripts.
Google searches suggested adding UPROPERTY() to pointers like PhysicsHandle, and Rider is also warning me “Object member ‘PhysicsHandle’ can be garbage collected at any time”, but either way that didn’t solve the crash nor change the error.
I also think this error started happening once I added the check for PhysicsHandle for logging, but I’m not sure… I can’t remember.
I’ve tried commenting out all of those lines and changes added during this video, as well as completely deleting ItemGrabber.cpp and ItemGrabber.h and I still get the same exact error referencing the same ItemGrabber.h file. So far it’s impossible to open the uproject regardless of what the default map is.
Edit: Also asking here. Project no longer opens without crashing after adding UPhysicsHandleComponent logic.. - UE4 AnswerHub
Cleaned and rebuilt entire solution. Some #includes needed to be rearranged, but after a successful rebuild, I still get the same error and crash with the same line number mentioned.