Start a new topic

Unity: Samples crash

Unity: Samples crash


Hey,

I wanted to check out the samples of the Unity, but when I run it on my phone(Lg g4 android 6.0) i get the Unity SplashScreen and then "Leider wurde das Programm Wikitude beendet" (german app crash message).

What I did was downloading the Unity pakackage Unity-Wikitude_1.2.1-1.1.0_2016_03_21_16_40_46.zip and import that in a new Unity Project (tried with Unity 5.3.1p3 , 5.3.4p1 and new installation 5.3.4f1). I entered the main Scene and added all other scenes to the build settings (scenes in build). Also I changed package to de.nico.vr . Then I choose Android as platform and build & run.

I do get this in abd logcat - maybe it helps:

...

05-17 15:02:23.190 442-442/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
05-17 15:02:23.190 442-442/? A/DEBUG: Build fingerprint: 'lge/p1_global_com/p1:6.0/MRA58K/1601518232117:user/release-keys'
05-17 15:02:23.190 442-442/? A/DEBUG: Revision: '11'
05-17 15:02:23.190 442-442/? A/DEBUG: ABI: 'arm'
05-17 15:02:23.190 442-442/? A/DEBUG: pid: 21756, tid: 21770, name: UnityMain  >>> de.nico.vr <<<
05-17 15:02:23.190 442-442/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
05-17 15:02:23.215 442-442/? A/DEBUG:     r0 bc57d080  r1 00000000  r2 00000000  r3 00000000
05-17 15:02:23.215 442-442/? A/DEBUG:     r4 00000040  r5 00000000  r6 00000001  r7 e3bb1c38
05-17 15:02:23.215 442-442/? A/DEBUG:     r8 00000000  r9 d8096c80  sl 00000002  fp d5b56570
05-17 15:02:23.215 442-442/? A/DEBUG:     ip e568dda4  sp eedbe510  lr e530d165  pc f6f957b4  cpsr 60070010
05-17 15:02:23.219 442-442/? A/DEBUG: backtrace:
05-17 15:02:23.219 442-442/? A/DEBUG:     #00 pc 000177b4  /system/lib/libc.so (__memcpy_base+88)
05-17 15:02:23.219 442-442/? A/DEBUG:     #01 pc 00129161  /system/vendor/lib/egl/libGLESv2_adreno.so (EsxVertexArrayObject::UpdateInternalVbos(EsxDrawDescriptor const*, unsigned int, EsxAttributeDesc const*)+1116)
05-17 15:02:23.219 442-442/? A/DEBUG:     #02 pc 0015bd51  /system/vendor/lib/egl/libGLESv2_adreno.so (A4xVertexArrayObject::CalcVfdRegs(EsxDrawDescriptor const*, A4xVfdRegs*, int)+872)
05-17 15:02:23.219 442-442/? A/DEBUG:     #03 pc 0016144b  /system/vendor/lib/egl/libGLESv2_adreno.so (A4xContext::ValidateVfdState(EsxDrawDescriptor const*, int)+38)
05-17 15:02:23.219 442-442/? A/DEBUG:     #04 pc 0016b00d  /system/vendor/lib/egl/libGLESv2_adreno.so (A4xContext::ValidateState(EsxDrawDescriptor const*)+1148)
05-17 15:02:23.219 442-442/? A/DEBUG:     #05 pc 0016b57d  /system/vendor/lib/egl/libGLESv2_adreno.so (A4xContext::HwValidateGfxState(EsxDrawDescriptor const*)+4)
05-17 15:02:23.219 442-442/? A/DEBUG:     #06 pc 000e93cf  /system/vendor/lib/egl/libGLESv2_adreno.so (EsxContext::ValidateGfxState(EsxDrawDescriptor const*)+454)
05-17 15:02:23.219 442-442/? A/DEBUG:     #07 pc 000de681  /system/vendor/lib/egl/libGLESv2_adreno.so (EsxContext::DrawArraysInstanced(EsxPrimType, int, unsigned int, unsigned int)+104)
05-17 15:02:23.219 442-442/? A/DEBUG:     #08 pc 000caae7  /system/vendor/lib/egl/libGLESv2_adreno.so (EsxContext::GlDrawArrays(unsigned int, int, int)+62)
05-17 15:02:23.219 442-442/? A/DEBUG:     #09 pc 001a35b5  /mnt/asec/de.nico.vr-2/lib/arm/libnativesdk.so (wikitude::sdk_render_core::impl::Watermark::drawWatermark(float)+272)
05-17 15:02:23.219 442-442/? A/DEBUG:     #10 pc 0018555b  /mnt/asec/de.nico.vr-2/lib/arm/libnativesdk.so (wikitude::native_sdk_core::impl::NativeSDKEngine::draw()+34)
05-17 15:02:23.219 442-442/? A/DEBUG:     #11 pc 0003ad17  /data/dalvik-cache/arm/mnt@asec@de.nico.vr-2@base.apk@classes.dex (offset 0x34000)

...

05-17 15:02:23.864 1318-21882/? W/ActivityManager:   Force finishing activity de.nico.vr/com.wikitude.unity.WikitudeActivity

 

Somebody can help me there?

Thanks ;)

Hi, 

Thank you for the report.
Have you tried opening the sample project that is also provided, instead of importing the package in a new project? Does that have the same problem?

Best regards,
Alexandru

Hey,

thanks fot the hint with the example project - it works. One mistake was that I had the menu scene not as scene 0 (not really a mistake, but it would directly jump into another scene), the other mistake was to not use my own license key.

The license key in the unitypackage seems to be mapped to the bundleIdentifier com.wikitude.unityexample, as used in the example project. I'm not sure if this is good to provide a license key in the unitypackage, which has to result in an error (as noone would set the bundleIdentifier to your sample one :)). Would be great to get a message in this case (invalid license) and not just crash.

But using my own key (instructions) and pasting it into your example project (i did paste it in the simple-scenes camera) results also in a crash when starting the simple-scene. I did try the same with a changed bundleIdentifier(de.nico.vr) but same thing happens. I wonder why, because the instructions say "Each trial license key is valid for every application ID on every operating system. You can use the same trial license key in multiple apps." so I should be able to use your example project, change license to my key and run it withour problems?

Hi,

As long as the license key in the WikitudeCamera corresponds to the Bundle Identifier specified in the Player Settings in Unity, it should work. Are you sure you changed the key in all the scenes?

I am surprised that it crashes, because normally a watermark should appear on top of the camera feed, specifying that the license key is invalid. I will look into this, maybe it's something specific to Android 6.0.

Best regards,
Alexandru

I did use my own trial license (key_ID_Any_PLATFORM_Any.txt from the license generation page) in the Simple-Tracking scene of the example project (as i only run this scene). It crashed. Why? As I understand this trial key should work for ANY appId? "Each trial license key is valid for every application ID on every operating system". I do think that the application id is the bundle identifier in unity?

Today I made a new scene as described here (WikitudeCamera and ClientTracker-prefab) with my trial license - crash. My only solution is to use your example license with your bundle identifier (both from the example project) as my trial license always crashes.

I then used your magazine.wtc as target collection and attached a log-script to all of the events:

05-21 16:03:21.507: I/Unity(20848): OnTrackerFinishedLoading: /storage/emulated/0/Android/data/com.wikitude.unityexample/files/Wikitudemagazine.wtc
05-21 16:03:21.508: I/Unity(20848): OnTrackerLoadingError: Failed to load data set.

So it is finished loading and then error loading? Sure thing.

I would blame the plugin, but as the example runs.. I'm not sure. I feel like wasting time getting this to run

 

Hi,

I'm sorry you are having difficulties getting it to run. The second issue is indeed a plugin bug on Windows only. To work around it, please move the wtc files directly in the StreamingAssets folder, instead of the "Wikitude" subdirectory and reassign it in the client tracker. This issue is fixed internally and will be out in the next update.

As for the license key issue, I couldn't reproduce it, so I will test on a Windows machine to see if it's specific to the OS as well.

Best regards,
Alexandru

Moving it to the StreamingAssets directly worked. Thank you. I wonder why the example project works, because there the .wtc files are also in the StreamingAssets/Wikitude folder.

Hi,

I'm glad to hear it works now. The bug happenes because when setting the wtc path on Windows, it includes backslashes that don't get properly converted when running on Android. If you leave it as is, the path doesn't include any backslashes and works. You can see this in the logs you sent in the previous post.

Best regards,
Alexandru
Login or Signup to post a comment