Log in or register to post comments

Crazy colours on first app run (random issue)

July 8, 2015 - 7:37pm #1

Dear Support Team, we're facing an intermitent issue, and we need to deliver the app by Monday.

We've bought the Classic license (499), and developed a video play app using Unity 5.1.1f +Vuforia 4.2.3, as recommended in your forum (we've followed all those issues described in the thread you highlight in green)

Basically we've started from your video demo, and removed vuforia's scene manager from the scene, and created our own based on Unity's new GUI (couple of pannels, and some buttons)

The issues we face:
Most of the times the app runs very nice, but some times it doesn't.

After installing the app, the first time I run it some times it shows some crazy colours on the screen (garbage).

Other times, let's say the following days, the first time we run the app, it provides either crazy colours on the screen, or a black screen + the video (without rendering what's on the camera)

Could this issue be related to the way you check the licenses?

We've been able to see the same random issue with a moto G device (android 5), and with a Samsung Duos (android 4).

Thanks in advance,


Crazy colours on first app run (random issue)

July 16, 2015 - 11:56am #12

Based on what you say, we should tend to rule out the role of the glErrors, as those messages are also seen when things work correctly.

Other than that however, I've chcked again all your logs, and I only see successful Vuforia initialization messages; also Vuforia is started and the camera seems to be correctly initialized at each initialization, according to the logs.

So, it seems there is nothing "obviously" wrong that leads directly to a Vuforia error state.

Also, once Vuforia is initialized, the fact that the network is not very stable (as you say, GPRS sometimes not working) should not affect Vuforia either. The "network errors" I see in the logs seem to be relted to other background services or activities, but nothing that seems to point directly to your application code or to Vuforia itself .

Given this information, and given the "randomness" of the occurrencem the only way would be to try to isolate the issue with simple reproducible case, as otherwise we can only make wild guesses; in general, there might be many elements of the application code that might play some role, so, the test with the Video Playback sample (+ a simple UI canvas) would be a better way to try to reproduce and isolate the issue.


Crazy colours on first app run (random issue)

July 15, 2015 - 10:34am #11

Thanks Alessandro,

here're our comments and answers:

1) Coould the issue be related to something else? Please check the stats from my previous post. Most of the errors appeared while in GPRS (GPRS connection is bad in Latin America)

2) We are playing only 1 video stored locally on device's storage (no streaming)

3) The video has the auto start, but the app only attempts to play it after focusing on the Target (during the tests we would focus on the Target after the failure)

4) We've seen the same gl errors even while working OK.


Replacing the videos and other stuff is not needed as it always plays OK, the failure hapens before the play. 

We're now experiencing a heavy work load, I may delay some answers related to the last point you're requesting.


Take care,


Crazy colours on first app run (random issue)

July 14, 2015 - 12:29am #10


thank you for the Logs;

the logs do not reveal any Vuforia error (Vuforia appears to be initialized correctly every time, as confirmed by the several "QCAR initialized successfully" message that follow the "Initializing Vuforia...." messages). 

Looking at other possible error conditions, I saw a few occurrences of glError (0x500) which seems related to a texture copy operation in the Vuforia media library; this is basically the sample code that copies the video frames onto a texture. Note that the glError(0x500) message is a very generic OpenGL error which might not necessarily suggest a malfunctioning, however it is a hint of a potential problem, which could explain the occasional "crazy color" and/or "black" background occurrence;

in this case, it might indicate some problem with texture memory handling.

It is however hard to say exactly what the root cause of the issue is, but the video playback and the related texture handling might be one element to look at; 

a few things to try:

- replace your videos with the ones included in the Vuforia VideoPlayback sample app, and check if you see the same/similar error, to verify if the issue is somehow related to the specific videos being used

- are the videos streamed from the internet, or are they loaded from a local device storage ? if they are played via streaming from a network location, a good test would be to try to copy the video files locally on the device and load/play them from the local storage, and verify if the same error (crazy color or black screen) still occurs

- also, are you loading/playing multiple videos at the same time ? 

- is your App trying to play the videos at application start, potentially before Vuforia has been initialized ?


One last question:

if you take the Vuforia Video Playback sample app, and you just add a very basic UI Canvas with say a half-transparent Panel and one or two buttons in it, can you observe the same/similar problem as in your App ?


Crazy colours on first app run (random issue)

July 13, 2015 - 4:54pm #9

Dear Alessandro, thanks for the info.

We've been able to collect failures using logcat.

We've excecuted several tests in different network conditions, and results are as follows:

-No internet (failed 1 out of 20 tests)

-WIFI (failed 1 out of 20 tests)

-GPRS connection (High Speed Downlink Packet Access) failed 5 out of 20 tests.

With this new information we noticed it fails any time, not only the first run. It seems to be that the failures are related to the network, but can't undertand why. 

We've collected logcat logs while running some tests (I've stopped logging and then opened a new one for the next test)

Please note that I'm attaching one screenshot from my PC to show what I call crazy colours. The logs on the other hand have been produced while the screen was black.

In any case AR worked fine, but the background was either crazy colors or black.


We had to deliver our app today regardless of this issue, I hope you can understand the logs provided and they point to the solution (for Vuforia's community)


Best regards,



Package icon crazy-black WIFI.zip1.42 MB

Crazy colours on first app run (random issue)

July 13, 2015 - 12:34pm #8

Crazy colours on first app run (random issue)

July 13, 2015 - 12:20pm #7

Thanks Alessandro, my last test just failed, I'm attaching the cell screen as captured by my PC.

I'm trying to set up that tool you've mentioned to get the logs.

I wasn't able to get any error out of the "SampleInitErrorHandler" on screen.

Would you like to get the APK and test it on your phone? it fails about 1 out of 10 tries..


Best regards,


Image icon Snapshot_20150713_161241.jpg194.94 KB

Crazy colours on first app run (random issue)

July 13, 2015 - 11:50am #6

The SampleInitErrorHandler should show a UI window / dialog showing the initialization error message (e.g. License Error for example, Network connection error or other ....);


at the same time, you can check the Logs of your device using ADB logcat; this will include any message logged by the application and by Vuforia itself.



Crazy colours on first app run (random issue)

July 13, 2015 - 11:45am #5

Done, I've added the script SampleInitErrorHandler to an empty in the scene, but still I have the same questions about how to collect the logs this script generates.

I'll post you any issues I could read  on the screen (I think this script sends init messages to the GUI)




Crazy colours on first app run (random issue)

July 12, 2015 - 12:41am #4

On the other hand, we've seen this happening either when going from no internet -> having internet, and from having internet to no internet. Only the firs time every day or after installing.



  • Can you provide the logs for this event? any error message in the logs ?
  • Do you have any Initialization Error Handler in your project ? Normally you should have an Init Error Handler attached to the ARCamera or to another scene object; the Sample App also contains a SampleInitErrorHandler; could you check this in your project ?


Crazy colours on first app run (random issue)

July 10, 2015 - 8:39am #3

Thanks for your prompt response Alessandro, I could provide you the entire project to look at if you will.

Let me answer your questions 1 by 1:

1) We are not using any other plug in.

2) Our UI consists of a Canvas (screen space overlay)

The Canvas has 3 child pannels:

a) Shot Menu Panel (which has an image with color = full transparent) + 1 small button at the bottom right corner.

b) The main menu panel, that has an image + A play button + a WWW button + Exit button.

c) Debug Menu Panel that has 4 text elements (these stay on top always, and I can either make it fully transparent or change alpha to 100% to debug how things go on)

The way it works is like this:

-c is always on top (transparent)

-a and b are mutually exclusive. I animate which one stays visible and which one goes away. The way I've animated it is as appearing from bottom.


Hope it helps.

On the other hand, we've seen this happening either when going from no internet -> having internet, and from having internet to no internet. Only the firs time every day or after installing.





Best regards,






Image icon screen.jpg54.2 KB

Crazy colours on first app run (random issue)

July 9, 2015 - 11:14pm #2


  • are you using any 3rd party plugins, in addition to Vuforia, in your project ?
  • could you provide a high-level description of how your UI is structured (i.e. what elements it contains, e.g. buttons, text elements, panel, vertical or horizontal layout, and the like) ?


Log in or register to post comments