Android - Gear VR - Assertion failed: FileLength

Gear VR with a S6 Edge. When launching the app, it crashes. This was packaged on UE 4.10 Android ETC2. I am currently doing a Full Rebuild package option and will report back. I enabled Dev mode and exported the following logs (I added the bold text)

--------- beginning of system

--------- beginning of main

D/VRSVC (30877): at (ManageActivity.java:15) onCreate() [onCreate()]

V/VRSVC (30877): at (ManageFragment.java:82) onCreate() [onCreate]

V/VRSVC (30877): at (ManageFragment.java:560) MFdC() [1 KB]

V/VRSVC (30877): at (ManageFragment.java:109) onCreate() [you are developer=true debugUser=false hiddenUser=false!]

V/VRSVC (30877): at (ManageFragment.java:359) onPreferenceChange() [developer mode! true]

V/VRSVC (30877): at (HmtDeveloperService.java:43) onCreate() [onCreate()]

V/VRSVC (30877): at (HmtDeveloperService.java:55) onStartCommand() [onStartCommand()]

V/VRSVC (30877): at (HmtDeveloperService.java:98) yTqX() [handleDeveloperMode developerMode=true]

V/VRSVC (30877): at (HmtDeveloperService.java:100) yTqX() [setVRMode enable=true]

V/VRSVC (31516): at (VRServiceApplication.java:13) onCreate() [onCreate()]

V/VRSVC (31516): at (VRSystemService.java:19) onCreate() [onCreate]

V/VRSVC (31516): at (VRManagerService.java:217) () [VRManagerService created]

V/VRSVC (31516): at (VRManagerService.java:246) BRMq() [VRManagerService systemReady VR_API_VERSION=1]

V/VRSVC (31516): at (VRSystemService.java:32) onBind() [onBind]

E/VRSVC (31516): at (VRManagerService.java:1223) wtkw() [HMT disconnect, Release cpu/gpu. HMT MODE is :false]

V/VRSVC (31516): at (VRManagerService.java:1250) wtkw() [setVRMode enable=true]

V/VRSVC (31516): at (VRManagerService.java:1381) ZzLN() [updateComfortableView enable=false]

V/VRSVC (31516): at (VRManagerService.java:1332) snDW() [updateColorTemperature value=4]

V/VRSVC (31516): at (VRManagerService.java:1414) IOpR() [updateLowPersistence enable=true]

W/VRSVC (31516): at (VRManagerService.java:1424) IOpR() [/sys/class/lcd/panel/hmt_low_persistence doesn’t exist. updateLowPersistence ignored]

V/VRSVC (31516): at (VRManagerService.java:1298) vqCz() [updateBright value=180]

V/VRSVC (31516): at (VRManagerService.java:1051) wtkw() [setSystemOption option=inflight value=2]

W/VRSVC (31516): at (VRManagerService.java:1065) wtkw() [set inflight ignored. hardware=samsungexynos7420]

W/VRSVC (30877): at (Util.java:727) vqCz() [configDir created!]

V/VRSVC (30877): at (Util.java:738) vqCz() [configFile updated! numBinsPerSubmit=4]

D/VRSVC (30877): at (HmtDeveloperService.java:120) bHGb() [killVRProcess]

I/VRSVC (30877): at (Util.java:399) bHGb() [killVRProcess ignored! packageName=com.samsung.android.hmt.vrsvc id=187 pid=30877 base=com.samsung.android.hmt.vrsvc/.ManageActivity top=com.android.settings/.Settings]

I/VRSVC (30877): at (Util.java:399) bHGb() [killVRProcess ignored! packageName=com.sec.android.app.launcher id=47 pid=4439 base=com.sec.android.app.launcher/.activities.LauncherActivity top=com.sec.android.app.launcher/.activities.LauncherActivity]

I/VRSVC (30877): at (Util.java:399) bHGb() [killVRProcess ignored! packageName=com.samsung.android.hmt.vrsvc id=189 pid=30877 base=com.samsung.android.hmt.vrsvc/.ManageActivity top=com.samsung.android.hmt.vrsvc/.ManageActivity]

I/VRSVC (30877): at (Util.java:399) bHGb() [killVRProcess ignored! packageName=flipboard.boxer.app id=144 pid=23090 base=flipboard.boxer.app/flipboard.boxer.gui.FeedActivity top=flipboard.boxer.app/flipboard.boxer.gui.FeedActivity]

I/VRSVC (30877): at (Util.java:399) bHGb() [killVRProcess ignored! packageName=com.oculus.horizon id=172 pid=25277 base=com.oculus.horizon/.main.MainActivity top=com.oculus.horizon/.main.MainActivity]

I/VRSVC (30877): at (Util.java:399) bHGb() [killVRProcess ignored! packageName=com.google.android.googlequicksearchbox id=171 pid=null base=com.google.android.googlequicksearchbox/com.google.android.apps.gsa.searchnow.SearchNowActivity top=com.google.android.googlequicksearchbox/com.google.android.apps.gsa.searchnow.SearchNowActivity]

I/VRSVC (30877): at (Util.java:399) bHGb() [killVRProcess ignored! packageName=com.android.systemui id=56 pid=3910 base=com.android.systemui/.recents.RecentsActivity top=com.android.systemui/.recents.RecentsActivity]

V/VRSVC (30877): at (Util.java:415) bHGb() [killVRProcess elapsedTime=29]

D/UE4 (31757): In the JNI_OnLoad function

D/UE4 (31757): Path found as ‘/storage/emulated/0’

D/UE4 (31757): Font Path found as ‘/system/fonts/’

D/UE4 (31757): In the JNI_OnLoad function 5

D/UE4 (31757): Entering native app glue main function

D/UE4 (31757): Created event thread

D/UE4 (31757): Entering event processing thread engine entry point

D/UE4 (31757): Entered AndroidMain()

D/UE4 (31757): Prepared looper for event thread

D/UE4 (31757): Passed callback initialization

D/UE4 (31757): Controller interface supported

D/UE4 (31757): Found DepthBufferPreference = 0

D/UE4 (31757): Found bPackageDataInsideApk = 0

D/UE4 (31757): Found ProjectName = LiquidProvisions0126

D/UE4 (31757): Found bHasOBBFiles = 1

D/UE4 (31757): Found bVerifyOBBOnStartUp = false

D/UE4 (31757): UI hiding set to false

D/UE4 (31757): Found GearVR mode = vr_only

D/UE4 (31757): Asking if osOBBInAPK? false

D/UE4 (31757): ExternalFilePath found as ‘/storage/emulated/0/Android/data/com.YourCompany.LiquidProvisions0126/files’

D/UE4 (31757): App is running in Landscape

D/UE4 (31757): Android version is 5.1.1

D/UE4 (31757): Android manufacturer is samsung

D/UE4 (31757): Android model is SAMSUNG-SM-G925A

D/UE4 (31757): OS language is set to en_US

D/UE4 (31757): Passed sensor initialization

D/UE4 (31757): ==============> GameActive.onCreate complete!

D/UE4 (31757): OnAppCommandCB cmd: 10

D/UE4 (31757): LogAndroidEvents: EnqueueAppEvent : 9, 0

D/UE4 (31757): ==================================> Inside onStart function in GameActivity

D/UE4 (31757): App is running in Landscape

D/UE4 (31757): OnAppCommandCB cmd: 11

D/UE4 (31757): LogAndroidEvents: EnqueueAppEvent : 7, 0

D/UE4 (31757): ==============> Starting activity to check files and download if required

D/UE4 (31757): ==============> GameActive.onResume complete!

D/UE4 (31757): OnAppCommandCB cmd: 12

D/UE4 (31757): LogAndroidEvents: EnqueueAppEvent : 12, 0

D/UE4 (31757): OnAppCommandCB cmd: 13

D/UE4 (31757): ==============> GameActive.onPause complete!

D/UE4 (31757): LogAndroidEvents: EnqueueAppEvent : 6, 0

D/UE4 (31757): Starting DownloaderActivity…

D/UE4 (31757): … UI setup. Checking for files.

D/UE4 (31757): Checking for file : main.1.com.YourCompany.LiquidProvisions0126.obb

D/UE4 (31757): which is really being resolved to : /storage/emulated/0/Android/obb/com.YourCompany.LiquidProvisions0126/main.1.com.YourCompany.LiquidProvisions0126.obb

D/UE4 (31757): Or : /storage/emulated/0/obb/com.YourCompany.LiquidProvisions0126/main.1.com.YourCompany.LiquidProvisions0126.obb

D/UE4 (31757): … Can has! Check 'em Dano!

D/UE4 (31757): Checking for file : main.1.com.YourCompany.LiquidProvisions0126.obb

D/UE4 (31757): DownloadActivity Returned with Download Files Present

D/UE4 (31757): OnAppCommandCB cmd: 11

D/UE4 (31757): App is running in Landscape

D/UE4 (31757): LogAndroidEvents: EnqueueAppEvent : 7, 0

D/UE4 (31757): ==============> Resuming main init

D/UE4 (31757): Final commandline:

D/UE4 (31757): Created sync event

D/UE4 (31757): Assertion failed: FileLength >= kEOCDLen [File:D:\BuildFarm\buildmachine_++depot+UE4-Releases+4.10\Engine\Source\Runtime\Core\Private\Android\AndroidFile.cpp] [Line: 547]

D/UE4 (31757): Signal 11 caught!

D/UE4 (31757): ==============> GameActive.onResume complete!

D/UE4 (31757): OnAppCommandCB cmd: 0

D/UE4 (31757): OnAppCommandCB cmd: 1

D/UE4 (31757): LogAndroidEvents: EnqueueAppEvent : 0, 4102739976

D/UE4 (31757): OnAppCommandCB cmd: 6

D/UE4 (31757): LogAndroidEvents: EnqueueAppEvent : 11, 0

I just ran into this one myself on 4.10.4. A brief look at that assert in the code shows the filesize is not being regarded as big enough to be a zip file. I can only assume it’s looking at the .obb file, but in my case it’s well over 2GBs, which should pass the check. If you get any updates regarding this, let us know.

I have the similar issue on 4.10.2. My OBB is also over 2GBs. Could it be a bug that the obb file is too big to be correctly recognized?

I had the same problem and getting the obb file back under 2gb fixed it (ours is now 1.5gb). If i had to take a guess as to why this check fails:

void AddPatchFile(TSharedPtr<FFileHandleAndroid> file)
{
	
	int64 FileLength = file->Size();

	// Is it big enough to be a ZIP?
	check( FileLength >= kEOCDLen );

I would guess that file->Size(); is returning a signed 32bit value which overflows at about 2gb. resulting in a value of 0 or a negative number. which is less than kEOCDLen.