Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash in font manager #5210

Open
deveee opened this issue Nov 18, 2024 · 1 comment
Open

Crash in font manager #5210

deveee opened this issue Nov 18, 2024 · 1 comment
Milestone

Comments

@deveee
Copy link
Member

deveee commented Nov 18, 2024

From google play console, STK 1.5-beta1

addr2line shows

font_manager.cpp:863

Full backtace

  *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 21826 >>> org.supertuxkart.stk_beta <<<

backtrace:
  #00  pc 0x0000000000a481bc  /data/app/~~8Xd6Ugc7ZWeUzhKZCbwIRQ==/org.supertuxkart.stk_beta-4tJwwPrxMOERQ5IF5K6PRw==/split_config.arm64_v8a.apk!libmain.so (FontManager::loadFonts()+863) (BuildId: 4fce2e98f252f98e398ac1d82a4ae863f0481505)
  #01  pc 0x0000000000b11dd4  /data/app/~~8Xd6Ugc7ZWeUzhKZCbwIRQ==/org.supertuxkart.stk_beta-4tJwwPrxMOERQ5IF5K6PRw==/split_config.arm64_v8a.apk!libmain.so (GUIEngine::init(irr::IrrlichtDevice*, irr::video::IVideoDriver*, GUIEngine::AbstractStateManager*, bool)+1145) (BuildId: 4fce2e98f252f98e398ac1d82a4ae863f0481505)
  #02  pc 0x00000000009e88d0  /data/app/~~8Xd6Ugc7ZWeUzhKZCbwIRQ==/org.supertuxkart.stk_beta-4tJwwPrxMOERQ5IF5K6PRw==/split_config.arm64_v8a.apk!libmain.so (initRest()+1888) (BuildId: 4fce2e98f252f98e398ac1d82a4ae863f0481505)
  #03  pc 0x00000000009e9a48  /data/app/~~8Xd6Ugc7ZWeUzhKZCbwIRQ==/org.supertuxkart.stk_beta-4tJwwPrxMOERQ5IF5K6PRw==/split_config.arm64_v8a.apk!libmain.so (android_main(int, char**)+2271) (BuildId: 4fce2e98f252f98e398ac1d82a4ae863f0481505)
  #04  pc 0x0000000000083140  /data/app/~~8Xd6Ugc7ZWeUzhKZCbwIRQ==/org.supertuxkart.stk_beta-4tJwwPrxMOERQ5IF5K6PRw==/split_config.arm64_v8a.apk!libSDL2.so (Java_org_libsdl_app_SDLActivity_nativeRunMain+803) (BuildId: 807fab39398966d8350e1585a880c5e1f3b42b70)
  #05  pc 0x000000000038c088  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (art_jni_trampoline+152)
  #06  pc 0x00000000000131e8  /data/app/~~8Xd6Ugc7ZWeUzhKZCbwIRQ==/org.supertuxkart.stk_beta-4tJwwPrxMOERQ5IF5K6PRw==/oat/arm64/base.odex (org.libsdl.app.SDLMain.run+664)
  #07  pc 0x00000000004f7a68  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (java.lang.Thread.run+72)
  #08  pc 0x000000000036db74  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+612)
  #09  pc 0x0000000000359324  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+132)
  #10  pc 0x0000000000944438  /apex/com.android.art/lib64/libart.so (art::detail::ShortyTraits<(char)86>::Type art::ArtMethod::InvokeInstance<(char)86>(art::Thread*, art::ObjPtr<art::mirror::Object>, art::detail::ShortyTraits<>::Type...)+60)
  #11  pc 0x00000000006209f4  /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1344)
  #12  pc 0x0000000000101c2c  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+204)
  #13  pc 0x0000000000095a00  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)
@Alayan-stk-2 Alayan-stk-2 added this to the 1.5 milestone Dec 20, 2024
@Alayan-stk-2
Copy link
Collaborator

    for (FT_Face face : normal_ttf)
    {
>>>>    if (!FT_HAS_COLOR(face) ||
            (FT_HAS_COLOR(face) && face->num_fixed_sizes == 0))
        {
            checkFTError(FT_Set_Pixel_Sizes(face, 0, m_shaping_dpi),
                "setting DPI");
        }
        m_hb_fonts.push_back(hb_ft_font_create(face, NULL));
    }

The BT crashes on the highlighted line. That's a call to FreeType, and this particular code has not changed in 4 years (since 369c346 )

I would assume it could crash if the "normal_ttf" variable somehow gets things that are not font faces loaded in, but I'm not familiar with that code and how that could happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants