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"

AddLocalRotation on SkeletalMeshComponent crashes editor

Hi guys. First of all, I am still new to both, UE and C++ programming, so I would assume there might be better ways of doing this (please do let me know if that is the case) The problem is that I have a Character class which has a reference to a Sekeletal Mesh Component (Exposed as a property in the editor) and whenever I apply a AddLocalRotation on the mesh it just crashes the editor. I'd appreciate if you could help me find out what my error is.

EDIT: I have used the IsValid method and it seems that the Mesh is null, however, I am setting the Mesh in the scene editor since it is exposed as a UPROPERTY. I am still not sure if there is something wrong with what I am doing or if I am supposed to set the Mesh in a different way to ensure it is not null when executing the code.

This is the crash log: LoginId:a9df9150408b737bb1336c9b018b8bf9 EpicAccountId:e8a03f309a104cb6be75d16a2c961c7c

 Access violation - code c0000005 (first/second chance not available)
 
 UE4Editor_Engine!USceneComponent::AddLocalRotation() [d:\build\++ue4\sync\engine\source\runtime\engine\private\components\scenecomponent.cpp:1287]
 UE4Editor_Deathguard_1861!APlayerCharacter::MoveBackwards() [c:\users\grimg\documents\unreal projects\deathguard\source\deathguard\playercharacter.cpp:66]
 UE4Editor_Deathguard_1861!AMainPC::MoveBackwards() [c:\users\grimg\documents\unreal projects\deathguard\source\deathguard\mainpc.cpp:62]
 UE4Editor_Engine!UPlayerInput::ProcessInputStack() [d:\build\++ue4\sync\engine\source\runtime\engine\private\userinterface\playerinput.cpp:1311]
 UE4Editor_Engine!APlayerController::ProcessPlayerInput() [d:\build\++ue4\sync\engine\source\runtime\engine\private\playercontroller.cpp:2476]
 UE4Editor_Engine!APlayerController::TickPlayerInput() [d:\build\++ue4\sync\engine\source\runtime\engine\private\playercontroller.cpp:4404]
 UE4Editor_Engine!APlayerController::PlayerTick() [d:\build\++ue4\sync\engine\source\runtime\engine\private\playercontroller.cpp:2137]
 UE4Editor_Engine!APlayerController::TickActor() [d:\build\++ue4\sync\engine\source\runtime\engine\private\playercontroller.cpp:4543]
 UE4Editor_Engine!FActorTickFunction::ExecuteTick() [d:\build\++ue4\sync\engine\source\runtime\engine\private\actor.cpp:137]
 UE4Editor_Engine!TGraphTask<FTickFunctionTask>::ExecuteTask() [d:\build\++ue4\sync\engine\source\runtime\core\public\async\taskgraphinterfaces.h:829]
 UE4Editor_Core!FNamedTaskThread::ProcessTasksNamedThread() [d:\build\++ue4\sync\engine\source\runtime\core\private\async\taskgraph.cpp:679]
 UE4Editor_Core!FNamedTaskThread::ProcessTasksUntilQuit() [d:\build\++ue4\sync\engine\source\runtime\core\private\async\taskgraph.cpp:575]
 UE4Editor_Core!FTaskGraphImplementation::WaitUntilTasksComplete() [d:\build\++ue4\sync\engine\source\runtime\core\private\async\taskgraph.cpp:1444]
 UE4Editor_Engine!FTickTaskSequencer::ReleaseTickGroup() [d:\build\++ue4\sync\engine\source\runtime\engine\private\ticktaskmanager.cpp:556]
 UE4Editor_Engine!FTickTaskManager::RunTickGroup() [d:\build\++ue4\sync\engine\source\runtime\engine\private\ticktaskmanager.cpp:1474]
 UE4Editor_Engine!UWorld::RunTickGroup() [d:\build\++ue4\sync\engine\source\runtime\engine\private\leveltick.cpp:783]
 UE4Editor_Engine!UWorld::Tick() [d:\build\++ue4\sync\engine\source\runtime\engine\private\leveltick.cpp:1460]
 UE4Editor_UnrealEd!UEditorEngine::Tick() [d:\build\++ue4\sync\engine\source\editor\unrealed\private\editorengine.cpp:1726]
 UE4Editor_UnrealEd!UUnrealEdEngine::Tick() [d:\build\++ue4\sync\engine\source\editor\unrealed\private\unrealedengine.cpp:403]
 UE4Editor!FEngineLoop::Tick() [d:\build\++ue4\sync\engine\source\runtime\launch\private\launchengineloop.cpp:3699]
 UE4Editor!GuardedMain() [d:\build\++ue4\sync\engine\source\runtime\launch\private\launch.cpp:174]
 UE4Editor!GuardedMainWrapper() [d:\build\++ue4\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:145]
 UE4Editor!WinMain() [d:\build\++ue4\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:276]
 UE4Editor!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:283]
 kernel32
 ntdll
Product Version: UE 4.21
Tags:
more ▼

asked Apr 11 '19 at 06:39 AM in C++ Programming

avatar image

Jhonathan
1 1 1

avatar image Dune Apr 11 '19 at 02:49 PM

Do you have a link to the code and a screenshot of the blueprint? Is it hard to tell from the callstack of the crash as that is just pointing us to something you already know, the Mesh is empty.

avatar image Jhonathan Apr 12 '19 at 03:57 AM

I don't anymore. It was pure C++ code, now I am using the Mesh property from the Character class I extended from, I also have a blueprint now. I am still curious about what could cause that a SekeletalMeshComponent property set in the World Outliner to be null during the execution of an axis input bound method.

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

1 answer: sort voted first

I am not a hundred percent sure about this but since I could not get an answer to this problem I will post my intuition as the reason for this issue. It seems that when I created an instance of my class (directly, no blueprint involved) in the editor, the mesh assigned to the Skeletal Mesh from it is somehow temporal. Being this the case, whenever I tried to rotate this mesh, and due to its temporal reference nature, a NPE was thrown, which of course crashes the editor.

more ▼

answered Apr 17 '19 at 12:57 AM

avatar image

Jhonathan
1 1 1

(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