Android build hang on splash screen

Hi,Guys. I’m new to Unity. I create a new terrain and set “Flatten Hightmap…” to 30. Then I add a texture and use "Paint height " to create some channels with height 25. Also I put a mobile third person controller in the channels.(Exactly I modified on the demo scene of unity third person controller and add all things above)
The app can run on my device after these steps.
But I found if I use “Place trees” to put even a single tree, my app will hang on splash screen. I enabled the loading indicator, it disappear quickly, but after that it just hang. Home button is not responding and my only choice is pulling out my cell.
BTW I use Unity free version and the splash screen is a big unity logo. My device is HTC Desire S with Android V4.04.
My PC build doesn’t have this issue. I would appreciate it if you guys could give me a bit of good advice.
Thanks

Did your check the console for any errors and build as debug build ?

Thanks for your reply. There are no errors in the console when I use debug build.
I export the eclipse project and debug it, got followed exceptions on emulator.
But when I debug the same project on my device. Just hang, No error. After several minutes my device reboot automatically.

07-15 10:59:00.884: W/dalvikvm(630): threadid=1: thread exiting with uncaught exception (group=0x409c01f8)
07-15 10:59:01.003: E/AndroidRuntime(630): FATAL EXCEPTION: main
07-15 10:59:01.003: E/AndroidRuntime(630): java.lang.Error: FATAL EXCEPTION [main]
07-15 10:59:01.003: E/AndroidRuntime(630): Unity version : 4.1.5f1
07-15 10:59:01.003: E/AndroidRuntime(630): Device model : unknown sdk
07-15 10:59:01.003: E/AndroidRuntime(630): Device fingerprint: generic/sdk/generic:4.0.4/MR1/302030:eng/test-keys
07-15 10:59:01.003: E/AndroidRuntime(630): Caused by: java.lang.UnsatisfiedLinkError: Couldn’t load mono: findLibrary returned null
07-15 10:59:01.003: E/AndroidRuntime(630): at java.lang.Runtime.loadLibrary(Runtime.java:365)
07-15 10:59:01.003: E/AndroidRuntime(630): at java.lang.System.loadLibrary(System.java:535)
07-15 10:59:01.003: E/AndroidRuntime(630): at com.unity3d.player.UnityPlayer.j(Unknown Source)
07-15 10:59:01.003: E/AndroidRuntime(630): at com.unity3d.player.UnityPlayer.(Unknown Source)
07-15 10:59:01.003: E/AndroidRuntime(630): at com.FartCat.Demo.DemoNativeActivity.onCreate(DemoNativeActivity.java:21)
07-15 10:59:01.003: E/AndroidRuntime(630): at android.app.Activity.performCreate(Activity.java:4465)
07-15 10:59:01.003: E/AndroidRuntime(630): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
07-15 10:59:01.003: E/AndroidRuntime(630): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
07-15 10:59:01.003: E/AndroidRuntime(630): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
07-15 10:59:01.003: E/AndroidRuntime(630): at android.app.ActivityThread.access$600(ActivityThread.java:123)
07-15 10:59:01.003: E/AndroidRuntime(630): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
07-15 10:59:01.003: E/AndroidRuntime(630): at android.os.Handler.dispatchMessage(Handler.java:99)
07-15 10:59:01.003: E/AndroidRuntime(630): at android.os.Looper.loop(Looper.java:137)
07-15 10:59:01.003: E/AndroidRuntime(630): at android.app.ActivityThread.main(ActivityThread.java:4424)
07-15 10:59:01.003: E/AndroidRuntime(630): at java.lang.reflect.Method.invokeNative(Native Method)
07-15 10:59:01.003: E/AndroidRuntime(630): at java.lang.reflect.Method.invoke(Method.java:511)
07-15 10:59:01.003: E/AndroidRuntime(630): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
07-15 10:59:01.003: E/AndroidRuntime(630): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
07-15 10:59:01.003: E/AndroidRuntime(630): at dalvik.system.NativeStart.main(Native Method)

As i dont know your project exactly, did you try to get rid of some gameobjects or scripts one after the other the make clear what could be causing this problem? Anyway, you could send me your apk and ill try it on my device if that helps.

Thanks you very much. I attached my project. As far as I know if I don’t place trees it can run normally. Even if I plant single one tree(BigTree or Palm), it will hang.

1298910–60190–$GreedyMouse.part1.rar (8 MB)
1298910–60191–$GreedyMouse.part2.rar (8 MB)
1298910–60193–$GreedyMouse.part3.rar (8 MB)
1298910–60194–$GreedyMouse.part4.rar (4.12 MB)

So it worked without trees on your device right?

Yes, without trees it worked on my device

Okay, just downloaded it and give it a try now. Get to you asap

Thanks a lot.:stuck_out_tongue:

Ok, tried it on my device and it is working. Maybe your export options do not fit your devices’ specs? Like OpenGL Version or sth? Maybe you can try to activate developer tools on your device and have a look at cpu and gpu usage. You can activate some bars on the top left (as far as i know thats on my phone HTC One XL) and look if theres something weird going on. I can see the tree that you placed and its running fine.

And the last post for now :smile: I’ve got some errors in Unity that may help you figure out whats going on:

You should use SetActive instead of active, you can look for that in the docs. And I think your palmbranch is the one thats killing your phone as said in the errors 2 and 3.

Here is a Shader I am Using for some hair in my game that may help you got rid of this palm shader.

1298950–60197–$MobileAlpha.shader (1017 Bytes)

OK, I will have a try. You are really a good guy. Thank you so much.:stuck_out_tongue:

I found if I don’t import the tree creator package I can run a terrain with palm tree of standard asset on my device. If I import the tree creator package and place a big tree, it will hang on splash screen. Log it here, maybe it can help someone else.:stuck_out_tongue: