OSVR / OSVR-Unreal

OSVR plugin for Unreal Engine
Apache License 2.0
89 stars 45 forks source link

Unreal crashes and looks like it's because of OSVR Plugin #133

Open SFR75 opened 8 years ago

SFR75 commented 8 years ago

Hello,

I'm using OSVR plugin for artistic installation done in Unreal4 engine. However after 10-20 minutes of usage the package crashes with following call stack. Can you please take a look at it ? It's a bit urgent, since the expo opens on 10 of December and worry about this crashes.

Thanks M

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

Speaker!FModuleManager::GetModule() Speaker!FModuleManager::GetModuleChecked() Speaker!FModuleManager::LoadModuleChecked() Speaker!FOSVRHMD::UpdateHeadPose() Speaker!FOSVRHMD::PreRenderViewFamily_RenderThread() Speaker!FRelevancePacket::RenderThreadFinalize() Speaker!TGraphTask<FRendererModule::BeginRenderingViewFamily'::21'::EURCMacro_FDrawSceneCommand>::ExecuteTask() Speaker!FNamedTaskThread::ProcessTasksNamedThread() Speaker!FNamedTaskThread::ProcessTasksUntilQuit() Speaker!RenderingThreadMain() Speaker!FRenderingThread::Run() Speaker!FRunnableThreadWin::Run()

JeroMiya commented 8 years ago

This is fixed in the master branch, but not yet in the Unreal source code drop: https://github.com/OSVR/OSVR-Unreal/issues/87

Switch to a local project plugin and build it from source (master branch). Should solve your problem. See these instructions for how to build from source: https://github.com/OSVR/OSVR-Unreal/blob/master/README.md

If the ImportFromSDK.cmd script is broken, which it probably is since it hasn't been updated in a while, let me know and I'll talk you through it. I'll leave this issue open for that. Good luck at your expo!

SFR75 commented 8 years ago

Hello Jeremy! Thanks for your answer. I downloaded source and compiled the plugin. It seems to be working on my system. However the other person who handles the build can't package it. He get's a packaging error. Is it still the case that you need to convert blueprint project to C++ project in order for it to work or not ? And maybe you fixed osrv plugin has been integrated into UE 4.14 ? Thanks M

JeroMiya commented 8 years ago

We haven't submitted a new code drop yet, so it won't be in 4.14. Yes, for local plugins you need to create at least one C++ class, otherwise it won't create a visual studio project or build the plugin into your final package. As an alternative, if you have Unreal Engine source code access, you can also update the OSVR plugin in the engine code and use that to build a custom engine. The OSVR plugin is located in the following places in the engine:

/Engine/Plugins/Experimental/OSVR
/Engine/Source/ThirdParty/OSVRClientKit
/Engine/Binaries/ThirdParty/OSVRClientKit

Edit: note the C++ class doesn't have to do anything. When I make a new build of ShowDownVR for example, I just add a new class from the file menu and leave it at the default template.

SFR75 commented 7 years ago

Hello again,

I think I followed all the steps. I have project plugin, which appears there. However when I launch the preview in VR mode, Unreal crashes. I checked everything is up to date: SDK, runtime.... I'm currently download debugging symbols for unreal to see callstack...

Thnaks M

SFR75 commented 7 years ago

MachineId:49326872447E563F13CEC6BEBB3D40DF EpicAccountId:be08ff2f030143bfb2830257fbae77ae

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

UE4Editor_OSVR!FOSVRHMD::CalculateRenderTargetSize() [d:\base\crowd_prj\dev\osvr-unreal-master\osvrunreal\plugins\osvr\source\osvr\private\osvrrender.cpp:155] UE4Editor_Engine!FSceneViewport::InitDynamicRHI() [d:\build++ue4+release-4.13+compile\sync\engine\source\runtime\engine\private\slate\sceneviewport.cpp:1549] UE4Editor_RenderCore!FRenderResource::InitResource() [d:\build++ue4+release-4.13+compile\sync\engine\source\runtime\rendercore\private\renderresource.cpp:29] UE4Editor_RenderCore!BeginInitResource() [d:\build++ue4+release-4.13+compile\sync\engine\source\runtime\rendercore\private\renderresource.cpp:124] UE4Editor_Engine!FSceneViewport::UpdateViewportRHI() [d:\build++ue4+release-4.13+compile\sync\engine\source\runtime\engine\private\slate\sceneviewport.cpp:1307] UE4Editor_Engine!FSceneViewport::EnqueueBeginRenderFrame() [d:\build++ue4+release-4.13+compile\sync\engine\source\runtime\engine\private\slate\sceneviewport.cpp:1365] UE4Editor_Engine!FViewport::Draw() [d:\build++ue4+release-4.13+compile\sync\engine\source\runtime\engine\private\unrealclient.cpp:1138] UE4Editor_Engine!FSceneViewport::ResizeViewport() [d:\build++ue4+release-4.13+compile\sync\engine\source\runtime\engine\private\slate\sceneviewport.cpp:1226] UE4Editor_Engine!FSceneViewport::SetViewportSize() [d:\build++ue4+release-4.13+compile\sync\engine\source\runtime\engine\private\slate\sceneviewport.cpp:1180] UE4Editor_OSVR!FOSVRHMD::EnableStereo() [d:\base\crowd_prj\dev\osvr-unreal-master\osvrunreal\plugins\osvr\source\osvr\private\osvrhmd.cpp:600] UE4Editor_UnrealEd!UEditorEngine::CreatePIEGameInstance() [d:\build++ue4+release-4.13+compile\sync\engine\source\editor\unrealed\private\playlevel.cpp:3285] UE4Editor_UnrealEd!UEditorEngine::PlayInEditor() [d:\build++ue4+release-4.13+compile\sync\engine\source\editor\unrealed\private\playlevel.cpp:2426] UE4Editor_UnrealEd!UEditorEngine::StartQueuedPlayMapRequest() [d:\build++ue4+release-4.13+compile\sync\engine\source\editor\unrealed\private\playlevel.cpp:1141] UE4Editor_UnrealEd!UEditorEngine::Tick() [d:\build++ue4+release-4.13+compile\sync\engine\source\editor\unrealed\private\editorengine.cpp:1306] UE4Editor_UnrealEd!UUnrealEdEngine::Tick() [d:\build++ue4+release-4.13+compile\sync\engine\source\editor\unrealed\private\unrealedengine.cpp:371] UE4Editor!FEngineLoop::Tick() [d:\build++ue4+release-4.13+compile\sync\engine\source\runtime\launch\private\launchengineloop.cpp:2834] UE4Editor!GuardedMain() [d:\build++ue4+release-4.13+compile\sync\engine\source\runtime\launch\private\launch.cpp:156] UE4Editor!GuardedMainWrapper() [d:\build++ue4+release-4.13+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:126] UE4Editor!WinMain() [d:\build++ue4+release-4.13+compile\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:202] UE4Editor!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:264] kernel32 ntdll

JeroMiya commented 7 years ago

@SFR75 Could you check if the latest code on master fixes your issue? That last error may have been a repro of this bug: https://github.com/OSVR/OSVR-Unreal/issues/141

SFR75 commented 7 years ago

Hello. Yes I can check.... at the same time strangely enough the OSVR plugin which is released with Unreal (4.13) stopped crashing... I just ran it for 15 hours continously... it's good and bad at the same time.. good that it works, bad that we don't know why it crashed before and what caused it to stop doing it...