This code was working and broke dunno why.
Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000000000000318
UE4Editor_SemiSimpleShitpost_7273!ABasePawn::Fire() [C:\Users\rawsk\Documents\Unreal Projects\SemiSimpleShitpost\Source\SemiSimpleShitpost\BasePawn.cpp:67]
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Core
UE4Editor_Core
UE4Editor_Core
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_UnrealEd
UE4Editor_UnrealEd
UE4Editor
UE4Editor
UE4Editor
UE4Editor
UE4Editor
kernel32
ntdll
Fire Function
void ABasePawn::Fire()
{
if (CanShoot = true)
{
switch (FireModeNumber)
{
case 1:
PullTrigger();
break;
case 2:
BurstFire();
break;
case 3:
PullTrigger();
GetWorld()->GetTimerManager().SetTimer(TimerHandle, this, &ABasePawn::PullTrigger, ShootDelay, true);
break;
}
}
}
Please help.
Well, first off
if (CanShoot = true)
Is always going to be true because you are ASSIGNING true rather than testing which would be:
if (CanShoot == true)
Other than that, the world may be invalid somehow. You can test for that in your if statement:
if (CanShoot && GetWorld() != nullptr)
{
// ...
}
ExtraLifeMatt:
Well, first off
if (CanShoot = true)
Is always going to be true because you are ASSIGNING true rather than testing which would be:
if (CanShoot == true)
Other than that, the world may be invalid somehow. You can test for that in your if statement:
if (CanShoot && GetWorld() != nullptr)
{
// ...
}
Thanks for help.
I was aware of first problem and I’ve fixed it.
Sadly second advice you gave me did nothing
LoginId:543a8f4a4000770473de0f93e1e895d4
EpicAccountId:e40fd9dc9b5b4cc18fed88e6c8a9c757
Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000000000000318
UE4Editor_SemiSimpleShitpost_2046!ABasePawn::Fire() [C:\Users\rawsk\Documents\Unreal Projects\SemiSimpleShitpost\Source\SemiSimpleShitpost\BasePawn.cpp:67]
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Core
UE4Editor_Core
UE4Editor_Core
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_Engine
UE4Editor_UnrealEd
UE4Editor_UnrealEd
UE4Editor
UE4Editor
UE4Editor
UE4Editor
UE4Editor
kernel32
ntdll
I’ve got this error.
bool CanShoot is declared in header file in private section.
Could be the object itself is invalid. Hard to say. Make sure you go into the Epic Launcher -> Select your UE4 Engine Install -> And add the option for “Editor Debug Symbols”
Hi, I’m new to Unreal Engine and would like to know how to debug the engine code. I can debug my project’s game code with no problem by attaching the Visual Studio debugger to it, but when I try to put a breakpoint in an engine file (example:...
Reading time: 1 mins 🕑
Likes: 1 ❤
What does it change?
Also ,I think this function broke after i created player controller.
I did it, what next?
I deleted Binaries and Intermediate and crash massage changed.
LoginId:543a8f4a4000770473de0f93e1e895d4
EpicAccountId:e40fd9dc9b5b4cc18fed88e6c8a9c757
Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000000000000318
UE4Editor_SemiSimpleShitpost_2623!ABasePawn::Fire() [C:\Users\rawsk\Documents\Unreal Projects\SemiSimpleShitpost\Source\SemiSimpleShitpost\BasePawn.cpp:67]
UE4Editor_Engine!FInputActionUnifiedDelegate::Execute() [D:\Build++UE4\Sync\Engine\Source\Runtime\Engine\Classes\Components\InputComponent.h:288]
UE4Editor_Engine!UPlayerInput::ProcessInputStack() [D:\Build++UE4\Sync\Engine\Source\Runtime\Engine\Private\UserInterface\PlayerInput.cpp:1379]
UE4Editor_Engine!APlayerController::ProcessPlayerInput() [D:\Build++UE4\Sync\Engine\Source\Runtime\Engine\Private\PlayerController.cpp:2531]
UE4Editor_Engine!APlayerController::TickPlayerInput() [D:\Build++UE4\Sync\Engine\Source\Runtime\Engine\Private\PlayerController.cpp:4550]
UE4Editor_Engine!APlayerController::PlayerTick() [D:\Build++UE4\Sync\Engine\Source\Runtime\Engine\Private\PlayerController.cpp:2179]
UE4Editor_Engine!APlayerController::TickActor() [D:\Build++UE4\Sync\Engine\Source\Runtime\Engine\Private\PlayerController.cpp:4702]
UE4Editor_Engine!FActorTickFunction::ExecuteTick() [D:\Build++UE4\Sync\Engine\Source\Runtime\Engine\Private\Actor.cpp:173]
UE4Editor_Engine!FTickFunctionTask:: DoTask() [D:\Build++UE4\Sync\Engine\Source\Runtime\Engine\Private\TickTaskManager.cpp:284]
UE4Editor_Engine!TGraphTask<FTickFunctionTask>::ExecuteTask() [D:\Build++UE4\Sync\Engine\Source\Runtime\Core\Public\Async\TaskGraphInterfaces.h:886]
UE4Editor_Core!FNamedTaskThread::ProcessTasksNamedThread() [D:\Build++UE4\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:709]
UE4Editor_Core!FNamedTaskThread::ProcessTasksUntilQuit() [D:\Build++UE4\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:601]
UE4Editor_Core!FTaskGraphImplementation::WaitUntilTasksComplete() [D:\Build++UE4\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:1525]
UE4Editor_Engine!FTickTaskSequencer::ReleaseTickGroup() [D:\Build++UE4\Sync\Engine\Source\Runtime\Engine\Private\TickTaskManager.cpp:564]
UE4Editor_Engine!FTickTaskManager::RunTickGroup() [D:\Build++UE4\Sync\Engine\Source\Runtime\Engine\Private\TickTaskManager.cpp:1578]
UE4Editor_Engine!UWorld::RunTickGroup() [D:\Build++UE4\Sync\Engine\Source\Runtime\Engine\Private\LevelTick.cpp:782]
UE4Editor_Engine!UWorld::Tick() [D:\Build++UE4\Sync\Engine\Source\Runtime\Engine\Private\LevelTick.cpp:1457]
UE4Editor_UnrealEd!UEditorEngine::Tick() [D:\Build++UE4\Sync\Engine\Source\Editor\UnrealEd\Private\EditorEngine.cpp:1720]
UE4Editor_UnrealEd!UUnrealEdEngine::Tick() [D:\Build++UE4\Sync\Engine\Source\Editor\UnrealEd\Private\UnrealEdEngine.cpp:426]
UE4Editor!FEngineLoop::Tick() [D:\Build++UE4\Sync\Engine\Source\Runtime\Launch\Private\LaunchEngineLoop.cpp:4834]
UE4Editor!GuardedMain() [D:\Build++UE4\Sync\Engine\Source\Runtime\Launch\Private\Launch.cpp:169]
UE4Editor!GuardedMainWrapper() [D:\Build++UE4\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:137]
UE4Editor!WinMain() [D:\Build++UE4\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:268]
UE4Editor!__scrt_common_main_seh() [d:\agent_work\5\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
kernel32
ntdll
No idea, it looks like you have something going on when you use your input. Whatever the problem is, it’s at line 67 of your BasePawn.cpp, so you likely have some invalid object on that line.
STRiFE.x
(STRiFE)
January 28, 2021, 4:22pm
8
You can’t really debug code like this. Run the editor through Visual Studio, and see what causes the crash. Just press F5 in visual studio. Once the crash occurs, Visual Studio will pause the program execution, and show you whats going on.
STRiFE.x:
You can’t really debug code like this. Run the editor through Visual Studio, and see what causes the crash. Just press F5 in visual studio. Once the crash occurs, Visual Studio will pause the program execution, and show you whats going on.
Gives me this massage
Unused is indeed empty.
I think visual studio don’t know real UE4’s directory.
I found bug. It is too dumb to tell here.
1 Like