Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

h5py produce crash of ue 4.20.2 #35

Open
selimbek opened this issue Sep 5, 2018 · 4 comments
Open

h5py produce crash of ue 4.20.2 #35

selimbek opened this issue Sep 5, 2018 · 4 comments
Labels

Comments

@selimbek
Copy link

selimbek commented Sep 5, 2018

Hi,

I used this pluggin with Unreal Engine 4.18 where I was able to load keras models with the load_weights function. This one use h5py module so it was installed as well. And everything worked fine :)

Today i tryed to migrate my work to UE 4.20.2 and tensorflow-ue4 v0.9.0. Python modules seems to be correctly installed, and basic examples works fine.
But when I install h5py module and run my project, the engine crash instantly (even if i dont import/use it in my python script)
I tried to install manually keras and cython too... with no positive effects

This problem disapear when I uninstall h5py (but i can't load my weights anymore).

Have you an idea to solve this issue, or have you some suggestions to save/load keras models without using h5py dependencie ?

Thank you in advance,
--Selim

@getnamo
Copy link
Owner

getnamo commented Sep 6, 2018

Strange, perhaps you used a different Tensorflow version for earlier models and this could have, for some reason, cause an incompatibility. The 4.18 build used either https://github.com/getnamo/tensorflow-ue4/releases/tag/0.5.0, https://github.com/getnamo/tensorflow-ue4/releases/tag/0.6.0, or https://github.com/getnamo/tensorflow-ue4/releases/tag/0.7.0 so the matching tensorflow version is between 1.4-1.6. Let's try to downgrade the 4.20 tensorflow version.

  1. For the updated project delete Plugins\UnrealEnginePython\Binaries\Win64\Lib\site-packages
  2. Update https://github.com/getnamo/tensorflow-ue4/blob/master/Content/Scripts/upymodule.json to an older version (1.4, 1.5 or 1.6)
  3. launch the project and wait for all dependencies to install.

Let me know if that solves it, if not see what your logs say under Saved/Logs

@vincentlorant
Copy link

vincentlorant commented Nov 22, 2018

Hello,

I get a similar issue with UE 4.21.0. I successfully load my model using model_from_json() and the prediction works fine with default weights. However, when I install h5py to load my trained weights using load_weights(), UE crash.

@getnamo I tried to follow your method but UE crash with tensorflow 1.5 & 1.6.
For "tensorflow": "1.4.0", I got the following error in the log: LogPython: Error: module 'enum' has no attribute 'IntFlag'

Any updates on how to solve this issue?

Thanks!

EDIT: I get the following errors in the crash reporter:

Access violation - code c0000005 (first/second chance not available)

_conv_cp36_win_amd64
_conv_cp36_win_amd64
python36
... //repeat many times python36
python36
UE4Editor_UnrealEnginePython
UE4Editor_Engine!AActor::InitializeComponents() [d:\build\++ue4\sync\engine\source\runtime\engine\private\actor.cpp:4315]
UE4Editor_Engine!ULevel::RouteActorInitialize() [d:\build\++ue4\sync\engine\source\runtime\engine\private\level.cpp:1822]
UE4Editor_Engine!UWorld::InitializeActorsForPlay() [d:\build\++ue4\sync\engine\source\runtime\engine\private\world.cpp:3642]
UE4Editor_Engine!UGameInstance::StartPlayInEditorGameInstance() [d:\build\++ue4\sync\engine\source\runtime\engine\private\gameinstance.cpp:376]
UE4Editor_UnrealEd!UEditorEngine::CreatePIEGameInstance() [d:\build\++ue4\sync\engine\source\editor\unrealed\private\playlevel.cpp:3332]
UE4Editor_UnrealEd!UEditorEngine::PlayInEditor() [d:\build\++ue4\sync\engine\source\editor\unrealed\private\playlevel.cpp:2459]
UE4Editor_UnrealEd!UEditorEngine::StartQueuedPlayMapRequest() [d:\build\++ue4\sync\engine\source\editor\unrealed\private\playlevel.cpp:1270]
UE4Editor_UnrealEd!UEditorEngine::Tick() [d:\build\++ue4\sync\engine\source\editor\unrealed\private\editorengine.cpp:1640]
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

@codewing
Copy link

codewing commented Dec 1, 2018

I am facing the same error currently with UE4.21.0

@getnamo
Copy link
Owner

getnamo commented Apr 13, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants