Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Bug Unity crashes whenever I switch to Android Build. C++ Runtime Library Error.

Discussion in 'Android' started by Gera1997, Mar 3, 2023.

  1. Gera1997

    Gera1997

    Joined:
    May 20, 2015
    Posts:
    4
    Every time I try to switch from iOS or PC to an Android build, Unity crashes with the following error.



    I've already uninstalled Unity and reinstalled it, didn't work. I tried repairing all my c++ libraries in applications and features, did not work either.

    I'm losing my mind here, I've looked as much as I could but it seems no one has encountered anything like this before.
     
  2. Gordyus

    Gordyus

    Joined:
    Mar 3, 2016
    Posts:
    8
    Hi, I'm migrating my project from 2022.1.24 to 2022.3.4 and I've got the exact same issue when switching to the Android platform.

    Assertion failed!
    etccompress.dll
    line 1664
    Expression: !m_boolPunchThroughPixels

    I have tried to delete the library folder to force reimport the whole project and reinstall editor, but it doesn't help.

    Did you find a solution ?
     
  3. Gordyus

    Gordyus

    Joined:
    Mar 3, 2016
    Posts:
    8
    Ok, after digging threw the crash/editor.log, I found that the import process fails for some textures with format set to RGB + 1-bit Alpha Compressed ECT2 4 bits.
    Changing the format for those textures to RGBA Compressed ETC2 8 bits fixed my problem...

    After the import process, I tried to roll back the format to RGB +1 but the error appears as soon as I click on the apply button, so I guess this format is broke for Android :/

    I've submitted a bug report.
     
  4. TimGS

    TimGS

    Joined:
    Apr 24, 2014
    Posts:
    70
    I confirm this error exists. Even on WebGL. As soon as I try to apply ETC2 RGB + 1 bit aplha the error appears and editor crashes.
    Unity 2022.3.10 LTS and it's not even in Known Issues list