Unreal crashes when I step into the trigger volume to open the doors in this lecture.
I tested it and it only happens when the engine tries to run the code Play(); with sounds. So I guess it must be something with the audio engine.
This is the error that it gives when it crashes:
LoginId:9a81ca81844513ea857d1d9327e519fb
EpicAccountId:04bf92fa94fd44dcbe1fcdfa6e123ad6
Caught signal
UOpenDoor::TickComponent(float, ELevelTick, FActorComponentTickFunction*) Address = 0x183f1af74 [/Volumes/LG SSD 01/C++ Course/Building Escape/BuildingEscape/Source/BuildingEscape/OpenDoor.cpp, line 55] [in UE4Editor-BuildingEscape-5926.dylib]
FActorComponentTickFunction::ExecuteTick(float, ELevelTick, ENamedThreads::Type, TRefCountPtr const&) Address = 0x104bdc73c (filename not found) [in UE4Editor-Engine.dylib]
FTickFunctionTask::DoTask(ENamedThreads::Type, TRefCountPtr const&) Address = 0x105a2d820 (filename not found) [in UE4Editor-Engine.dylib]
TGraphTask::ExecuteTask(TArray<FBaseGraphTask*, FDefaultAllocator>&, ENamedThreads::Type) Address = 0x105a2d133 (filename not found) [in UE4Editor-Engine.dylib]
FNamedTaskThread::ProcessTasksNamedThread(int, bool) Address = 0x101a6ef7c (filename not found) [in UE4Editor-Core.dylib]
FNamedTaskThread::ProcessTasksUntilIdle(int) Address = 0x101a6e1a4 (filename not found) [in UE4Editor-Core.dylib]
FTickTaskSequencer::ReleaseTickGroup(ETickingGroup, bool) Address = 0x105a26cfa (filename not found) [in UE4Editor-Engine.dylib]
FTickTaskManager::RunTickGroup(ETickingGroup, bool) Address = 0x105a20918 (filename not found) [in UE4Editor-Engine.dylib]
UWorld::Tick(ELevelTick, float) Address = 0x105100f2b (filename not found) [in UE4Editor-Engine.dylib]
UEditorEngine::Tick(float, bool) Address = 0x10a8a86e7 (filename not found) [in UE4Editor-UnrealEd.dylib]
UUnrealEdEngine::Tick(float, bool) Address = 0x10b29f298 (filename not found) [in UE4Editor-UnrealEd.dylib]
FEngineLoop::Tick() Address = 0x101971d54 (filename not found) [in UE4Editor]
GuardedMain(wchar_t const*) Address = 0x10197bb48 (filename not found) [in UE4Editor]
-[UE4AppDelegate runGameThread:] Address = 0x101985c8e (filename not found) [in UE4Editor]
-[FCocoaGameThread main] Address = 0x101be7801 (filename not found) [in UE4Editor-Core.dylib]
Unknown() Address = 0x7fff31927882 (filename not found) [in Foundation]
_pthread_start Address = 0x7fff693e8109 (filename not found) [in libsystem_pthread.dylib]
thread_start Address = 0x7fff693e3b8b (filename not found) [in libsystem_pthread.dylib]
Need some help here.
Hardware:
Model Name: | MacBook Pro |
---|---|
Model Identifier: | MacBookPro11,2 |
Processor Name: | Quad-Core Intel Core i7 |
Processor Speed: | 2.2 GHz |
Number of Processors: | 1 |
Total Number of Cores: | 4 |
L2 Cache (per Core): | 256 KB |
L3 Cache: | 6 MB |
Hyper-Threading Technology: | Enabled |
Memory: | 16 GB |
Boot ROM Version: | 159.0.0.0.0 |
SMC Version (system): | 2.18f15 |
Serial Number (system): | C02P866FG3QC |
Hardware UUID: | 36D9A928-709C-54BC-A7AD-2E5591F7BD8F |
System Software:
System Version: | macOS 10.15.4 (19E287) |
---|---|
Kernel Version: | Darwin 19.4.0 |
Boot Volume: | Macintosh HD |
Boot Mode: | Normal |
Computer Name: | Luichy’s MacBook Pro |
User Name: | Luis Guzman (LGuzman) |
Secure Virtual Memory: | Enabled |
System Integrity Protection: | Enabled |
Time since boot: | 4:30 |
UPDATE 1:
I went and applied all Lecture Project Changes and now it doesn’t crash but not playing sound.
This is my .cpp code for audio triggering (I have all my includes):
- void UOpenDoor::BeginPlay()
- void UOpenDoor::FindAudioComponent()
- {
- AudioComponent = GetOwner()->FindComponentByClass();
- if (!AudioComponent)
- {
- UE_LOG(LogTemp, Error, TEXT(“There is no audio component present on %s!”), *GetOwner()->GetName());
- }
- }
- void UOpenDoor::OpenDoor(float DeltaTime)
- {
- CloseDoorSound = false;
- if (!AudioComponent) {return;}
- if (!OpenDoorSound)
- {
- AudioComponent->Play();
- OpenDoorSound = true;
- }
- }
- void UOpenDoor::CloseDoor(float DeltaTime)
- {
- OpenDoorSound = false;
- if (!AudioComponent) {return;}
- if (!CloseDoorSound)
- {
- AudioComponent->Play();
- OpenDoorSound = true;
- }
- }
UPDATE 2:
Solved! Some lines of code were missing.