[SOLVED] Crash on iOs/Android

Hi all!

I’m having trouble with a project.
Basically, it works ok on PC/Mac but as soon as I open it with IOS the following message appears:
"A problem repeatedly occurred on URL "

Any idea on how one would go to start debugging for such issue?

The only warning that I can see in iOs console are this:
“responseType: arraybuffer being served with Content-Type: image/vnd.ms-dds”
“DEPRECATED: pc.RenderTarget constructor no longer accepts GraphicsDevice parameter.”
“Lightmapper’s BAKE_COLORDIR mode is not compatible with Light’s bakeNumSamples larger than one. Forcing it to one.”

I tried:

  • Removing almost anything, it starts playing as soon as I have only three walls and no floor. Changing or resetting materials has almost no effect - sometimes it runs - sometimes it doesnt
  • Using lightmapping and not using it - no effect
  • Preferring WebGL 2, high performance etc etc, no effect

It seems OS dependent, it runs well on my Mac M1, but crashes on my iPad M1.
A friend of mine also just told me it doesn’t work in Android as well.

Any useful resource on what to check for these issues?

Thank you so much!!
Best

Hi @viggo,

Indeed it crashes on my iPhone too. Have you tried running the PlayCanvas profiler to get performance stats?

https://developer.playcanvas.com/en/user-manual/optimization/profiler/

Like video memory (iOS can be quite punishing on that). I can see the scene downloading a lot of uncompressed (.png) textures, you can easily enable texture compression in PlayCanvas:

https://developer.playcanvas.com/en/user-manual/assets/textures/texture-compression/

2 Likes

Thank you for the input!

Unfortunately, enabling texture compression as specified doesn’t change the issue.

I am not able to profile the app as it doesn’t load on iOs or Android.

Thank you,
Achille

Normally you will be profiling on desktop to understand the various metrics (polycount, draw calls, VRAM) that will be similar on mobile.

How much is your total VRAM if you enable the profiler on desktop?

Ok, so profiles says 1.5gb total vram.

Which is strange, i have less than 20 texture images, not more than 8 Mbytes of files

Yeeeessss I did it :smiley:

It was too much vram being used, I went beserk with the lightmap quality and didn’t think it would impact much. Thank you for the help!

1 Like

Glad you’ve found it! Yes, 1.5GB is too much for any mobile device.

Better target something <200-300MB the most for mobile.