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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

GetWorldTimerManager causes "Fatal error!"

Hey everyone, so I'm adding some timers to my game to manage health decay and gain over time.

But I'm getting a "Fatal error!" message when I compile. Then I relaunch the editor, and I get it during loading again. Removing the code and building in VS seems to fix it. But that's obviously not a solution, since I need these timers.

The code that causes a crash is as follows:

 GetWorldTimerManager().SetTimer(m_bloodChangeTimer, this, &ADivisionPlayerState::BloodTick, 1, true);
  

And I get this exception in my log:

 [2016.02.07-03.31.46:620][  0]LogWindows:Error: === Critical error: ===
 Fatal error!
 
 Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x000001b0
 
 UE4Editor-Engine.dll!AActor::GetWorldTimerManager() [c:\users\oyasu_000\documents\unreal_engine\unrealengine\engine\source\runtime\engine\private\actor.cpp:282]
 UE4Editor-Division-8438.dll
 UE4Editor-CoreUObject.dll!UClass::CreateDefaultObject() [c:\users\oyasu_000\documents\unreal_engine\unrealengine\engine\source\runtime\coreuobject\private\uobject\class.cpp:2761]
 UE4Editor-CoreUObject.dll!UObjectLoadAllCompiledInDefaultProperties() [c:\users\oyasu_000\documents\unreal_engine\unrealengine\engine\source\runtime\coreuobject\private\uobject\uobjectbase.cpp:724]
 UE4Editor-CoreUObject.dll!ProcessNewlyLoadedUObjects() [c:\users\oyasu_000\documents\unreal_engine\unrealengine\engine\source\runtime\coreuobject\private\uobject\uobjectbase.cpp:818]
 UE4Editor-CoreUObject.dll!TBaseStaticDelegateInstance<void __cdecl(void)>::ExecuteIfSafe() [c:\users\oyasu_000\documents\unreal_engine\unrealengine\engine\source\runtime\core\public\delegates\delegateinstancesimpl_variadics.inl:1021]
 UE4Editor-Core.dll!TBaseMulticastDelegate<void>::Broadcast() [c:\users\oyasu_000\documents\unreal_engine\unrealengine\engine\source\runtime\core\public\delegates\delegatesignatureimpl_variadics.inl:921]
 UE4Editor-Core.dll!FModuleManager::LoadModuleWithFailureReason() [c:\users\oyasu_000\documents\unreal_engine\unrealengine\engine\source\runtime\core\private\modules\modulemanager.cpp:427]
 UE4Editor-Projects.dll!FModuleDescriptor::LoadModulesForPhase() [c:\users\oyasu_000\documents\unreal_engine\unrealengine\engine\source\runtime\projects\private\moduledescriptor.cpp:395]
 UE4Editor-Projects.dll!FProjectManager::LoadModulesForProject() [c:\users\oyasu_000\documents\unreal_engine\unrealengine\engine\source\runtime\projects\private\projectmanager.cpp:53]
 UE4Editor.exe!FEngineLoop::LoadStartupModules() [c:\users\oyasu_000\documents\unreal_engine\unrealengine\engine\source\runtime\launch\private\launchengineloop.cpp:2078]
 UE4Editor.exe!FEngineLoop::PreInit() [c:\users\oyasu_000\documents\unreal_engine\unrealengine\engine\source\runtime\launch\private\launchengineloop.cpp:1551]
 UE4Editor.exe!GuardedMain() [c:\users\oyasu_000\documents\unreal_engine\unrealengine\engine\source\runtime\launch\private\launch.cpp:110]
 UE4Editor.exe!GuardedMainWrapper() [c:\users\oyasu_000\documents\unreal_engine\unrealengine\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
 UE4Editor.exe!WinMain() [c:\users\oyasu_000\documents\unreal_engine\unrealengine\engine\source\runtime\launch\private\windows\launchwindows.cpp:200]
 UE4Editor.exe!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:264]
 KERNEL32.DLL
 ntdll.dll
 ntdll.dll
  

Anyone have any idea what is wrong?

Thank you very much!

Product Version: UE Github Master branch
Tags:
more ▼

asked Feb 07 '16 at 03:42 AM in C++ Programming

avatar image

oliveryas
1 1 1 1

avatar image alkohol Feb 07 '16 at 03:47 AM

Hello there!

Can you provide more details? Better would be all class definition and implementation, that relates to the timer, code of function that calls GetWorldTimerManager(). Thanks

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

1 answer: sort voted first

Try surrounding it with if(GetWorld ()) { }

more ▼

answered Feb 07 '16 at 07:43 AM

avatar image

lion032
986 31 80 55

(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