What ConstantTick does? Can you post that. I think problem should be there
Okay im sure it is not caused by setting float to 0.
That can happen only when memory / memory addresses corrupted and float is invalid… but this is a constant variable, so it is impossibru except if your physical memory has trouble and this float always try to save there lol (cant be)
GC also dont will collect this type of variable, but for sure mark with empty UPROPERTY()
And sometimes compiler doing weird thing and cache wrong headers etc.
I suggest to do full clean and full rebuild, sometimes will help.
If this will not help, debug did a mistake and stopped in wrong line and crash happens because of some async operation, timer or in constant tick function
I am getting a “Fatal error!/Unhandled Exception: EXCEPTION_ACCESS_VIOLATION” in my crash log. The crash occurs within a few minutes after the game has begun. The log then points me to a line in the code where I am setting a float to 0. My main question, is the crash log reliable, or should I be looking somewhere else for the bug? Or do I have some fundamental misunderstanding of c++/ue4? Thanks in advance for any help. I am using 4.14
My code:
// Called every frame
void ALife::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
LocalTickTimer += DeltaTime;
if (LocalTickTimer >= LocalTickTimerCD) //This is called every .1 seconds
{
ConstantTick(LocalTickTimer); //The culprit?
LocalTickTimer = 0.0f; -------------------------- //This is line 84
}
}
The crash log:
[2017.07.13-07.58.31:762][591]LogWindows:Error: === Critical error: ===
[2017.07.13-07.58.31:762][591]LogWindows:Error:
[2017.07.13-07.58.31:762][591]LogWindows:Error: Fatal error!
[2017.07.13-07.58.31:762][591]LogWindows:Error:
[2017.07.13-07.58.31:762][591]LogWindows:Error: Unhandled Exception: EXCEPTION_ACCESS_VIOLATION 0x00000000
[2017.07.13-07.58.31:762][591]LogWindows:Error:
[2017.07.13-07.58.31:762][591]LogWindows:Error:
[2017.07.13-07.58.31:762][591]LogWindows:Error: DFRPG6.exe!ALife::Tick() [c:\\documents\unreal projects\dfrpg6\source\dfrpg6\life.cpp:84]
[2017.07.13-07.58.31:762][591]LogWindows:Error: DFRPG6.exe!AActor::TickActor()
[2017.07.13-07.58.31:762][591]LogWindows:Error: DFRPG6.exe!FActorTickFunction::ExecuteTick()
[2017.07.13-07.58.31:762][591]LogWindows:Error: DFRPG6.exe!FTickFunctionTask::DoTask()
[2017.07.13-07.58.31:762][591]LogWindows:Error: DFRPG6.exe!TGraphTask<FTickFunctionTask>::ExecuteTask()
[2017.07.13-07.58.31:762][591]LogWindows:Error: DFRPG6.exe!FNamedTaskThread::ProcessTasksNamedThread()
[2017.07.13-07.58.31:762][591]LogWindows:Error: DFRPG6.exe!FNamedTaskThread::ProcessTasksUntilQuit()
[2017.07.13-07.58.31:762][591]LogWindows:Error: DFRPG6.exe!FTaskGraphImplementation::WaitUntilTasksComplete()
[2017.07.13-07.58.31:762][591]LogWindows:Error: DFRPG6.exe!FTickTaskSequencer::ReleaseTickGroup()
[2017.07.13-07.58.31:762][591]LogWindows:Error: DFRPG6.exe!FTickTaskManager::RunTickGroup()
[2017.07.13-07.58.31:762][591]LogWindows:Error: DFRPG6.exe!UWorld::RunTickGroup()
[2017.07.13-07.58.31:762][591]LogWindows:Error: DFRPG6.exe!UWorld::Tick()
[2017.07.13-07.58.31:762][591]LogWindows:Error: DFRPG6.exe!UGameEngine::Tick()
[2017.07.13-07.58.31:762][591]LogWindows:Error: DFRPG6.exe!FEngineLoop::Tick()
[2017.07.13-07.58.31:762][591]LogWindows:Error: DFRPG6.exe!GuardedMain()
[2017.07.13-07.58.31:763][591]LogWindows:Error: DFRPG6.exe!GuardedMainWrapper()
[2017.07.13-07.58.31:763][591]LogWindows:Error: DFRPG6.exe!WinMain()
[2017.07.13-07.58.31:763][591]LogWindows:Error: DFRPG6.exe!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:255]
[2017.07.13-07.58.31:763][591]LogWindows:Error: KERNEL32.DLL
[2017.07.13-07.58.31:763][591]LogWindows:Error: ntdll.dll
[2017.07.13-07.58.31:763][591]LogWindows:Error: ntdll.dll
[2017.07.13-07.58.31:763][591]LogWindows:Error:
[2017.07.13-07.58.31:896][591]LogExit: Executing StaticShutdownAfterError
[2017.07.13-07.58.32:487][591]LogWindows: FPlatformMisc::RequestExit(1)
[2017.07.13-07.58.32:501][591]Log file closed, 07/13/17 02:58:32
Hey, thanks for answering. If the log can say line 84 but mean ConstantTick (line 82), it can be any number of things. I won’t bother you guys with debugging that, I was just making sure that would be the case before I pull my hair out debugging it. Thanks.