I am building for Gear VR (so, Android ETC2). At the beginning of my game, I have a MediaPlayer starting in auto, opening a file with a URL. If the device is connected to W-Fi when I start the game, everything works fine; if it is not connected, the game crashes and the Home screen appears.
Not sure it is related, but the only information that I found in the logcat that could be related to the problem is:
05-11 15:42:14.241 3088 16735 V MediaPlayerService: [57] notify (0xec6d6b00, 100, 1, -1005)
05-11 15:42:14.241 3088 16735 E NuPlayer: Network errror is occured (-1004)
05-11 15:42:14.241 3088 16735 D NuPlayer: set mHTTPStreaming = FALSE
05-11 15:42:14.241 16686 16698 V MediaPlayer: message received msg=100, ext1=1, ext2=-1005
05-11 15:42:14.241 16686 16698 E MediaPlayer: error (1, -1005)
05-11 15:42:14.241 16686 16698 V MediaPlayer: signal application thread
05-11 15:42:14.241 16686 16702 V MediaPlayer: prepare complete - status=1
05-11 15:42:14.241 16686 16702 W System.err: java.io.IOException: Prepare failed.: status=0x1
05-11 15:42:14.241 16686 16702 W System.err: at android.media.MediaPlayer._prepare(Native Method)
05-11 15:42:14.241 16686 16702 W System.err: at android.media.MediaPlayer.prepare(MediaPlayer.java:1369)
05-11 15:42:14.251 16686 16702 D UE4 : Assertion failed: false && "Java JNI call failed with an exception." [File:D:\BuildFarm\buildmachine_++UE4+Release-4.11\Engine\Source\Runtime\Core\Private\Android\AndroidJava.cpp] [Line: 139]
05-11 15:42:14.251 16686 16702 D UE4 : libUE4.so!FDebug::LogAssertFailedMessage(char const*, char const*, int, wchar_t const*, ...)
05-11 15:42:14.251 16686 16702 D UE4 : libUE4.so!void FJavaClassObject::CallMethod<void>(FJavaClassMethod, ...)
05-11 15:42:14.251 16686 16702 D UE4 : libUE4.so!FJavaAndroidMediaPlayer::Prepare()
05-11 15:42:14.251 16686 16702 D UE4 : libUE4.so!FAndroidMediaPlayer::Open(FString const&)
05-11 15:42:14.251 16686 16702 D UE4 : libUE4.so!non-virtual thunk to FAndroidMediaPlayer::Open(FString const&)
05-11 15:42:14.251 16686 16702 D UE4 : libUE4.so!UMediaPlayer::InitializePlayer()
05-11 15:42:14.251 16686 16702 D UE4 : libUE4.so!UMediaPlayer::PostLoad()
05-11 15:42:14.251 16686 16702 D UE4 : libUE4.so!UObject::ConditionalPostLoad()
05-11 15:42:14.251 16686 16702 D UE4 : libUE4.so!EndLoad()
05-11 15:42:14.251 16686 16702 D UE4 : libUE4.so!LoadPackageInternal(UPackage*, wchar_t const*, unsigned int, FLinkerLoad*, TSet<FName, DefaultKeyFuncs<FName, false>, FDefaultSetAllocator>&, IAssetRegistryInterface*)
05-11 15:42:14.251 16686 16702 D UE4 : libUE4.so!LoadPackageInternal(UPackage*, wchar_t const*, unsigned int, FLinkerLoad*)
05-11 15:42:14.251 16686 16702 D UE4 : libUE4.so!LoadPackage(UPackage*, wchar_t const*, unsigned int)
05-11 15:42:14.251 16686 16702 D UE4 : libUE4.so!UEngine::LoadMap(FWorldContext&, FURL, UPendingNetGame*, FString&)
05-11 15:42:14.251 16686 16702 D UE4 : libUE4.so!UEngine::Browse(FWorldContext&, FURL, FString&)
05-11 15:42:14.251 16686 16702 D UE4 : libUE4.so!UGameInstance::StartGameInstance()
05-11 15:42:14.251 16686 16702 D UE4 : libUE4.so!UGameEngine::Init(IEngineLoop*)
05-11 15:42:14.251 16686 16702 D UE4 : libUE4.so!FEngineLoop::Init()
05-11 15:42:14.251 16686 16702 D UE4 : libUE4.so!AndroidMain(android_app*)
05-11 15:42:14.251 16686 16702 D UE4 : libUE4.so!android_main()
05-11 15:42:14.251 16686 16702 D UE4 : libUE4.so![Unknown]()
05-11 15:42:14.251 16686 16702 D UE4 : libc.so![Unknown]()
05-11 15:42:14.251 16686 16702 D UE4 : libc.so![Unknown]()
05-11 15:42:14.251 16686 16702 D UE4 : [2016.05.11-13.42.14:258][ 0]Assertion failed: Assertion failed: false && "Java JNI call failed with an exception." [File:D:\BuildFarm\buildmachine_++UE4+Release-4.11\Engine\Source\Runtime\Core\Private\Android\AndroidJava.cpp] [Line: 139]
05-11 15:42:14.251 16686 16702 D UE4 : [2016.05.11-13.42.14:259][ 0]LogWindows: FAndroidMisc::RequestExit(1)
05-11 15:42:14.251 16686 16702 I art : System.exit called, status: 0
05-11 15:42:14.251 16686 16702 I AndroidRuntime: VM exiting with result code 0, cleanup skipped.
EDIT: after the request from Tim, I added some details. You can find attached the UEgame logs and logcat logs. You can also find a simplified version of my level blueprint before and after the āisValidā suggestion.
Blueprints before:
Blueprints after:
Here are the steps to reproduce my problem:
- Create a new project using the First Person Template. Create an empty scene or use the default one.
- Create a new MediaPlayer in the content browser. Create the texture and the material as usual. Apply the material to a mesh in the scene. Everything is set as in the documentation: [Media Framework | Unreal Engine Documentation][3] , but donāt use a movie file imported in the content browser; instead, use an URL (the ones starting with āhttp : / /ā ) in the āsourceā field of the Media Player. I cannot give you the file for copyright reasons, but the file Iām pointing at is an mp4 movie with H.264 encoding, frame rate 25, resolution 1920x1080.
- Add a reference to the Media Player in the level blueprints and set the Media Player to play on begin, as shown in the blueprints attached.
- Setup, package and install the project for the GearVR as described in the documentation ([https://docs.unrealengine.com/latest/INT/Platforms/GearVR/QuickStart/index.html][4])
- Disable any kind of internet / Wi-Fi connection on the Android device.
- Start the app. If the app is launched in the Gear VR, after a black screen the Oculus Home appears; if the app is launched in debug mode while connected to the pc, the app crashes (it can still be found in the list of opened apps) and the phone home screen appears.
[UE4game logs][5]
[Logcat][6]