TTF font does not get copied properly
adrien-f opened this issue · comments
Hello,
I'm using a standard blank application with IntelliJ/Android Studio and when building and launching an activity with an icon it crashes:
03-11 11:50:27.390 2713-2713/com.x.geekquote.app E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.x.geekquote.app, PID: 2713
java.lang.RuntimeException: Font not found /data/data/com.x.geekquote.app/files/icon_tmp/material-design-iconic-font-1.0.1.ttf
at android.graphics.Typeface.createFromFile(Typeface.java:217)
at android.graphics.Typeface.createFromFile(Typeface.java:200)
at com.malinskiy.materialicons.Iconify.getTypeface(Iconify.java:67)
at com.malinskiy.materialicons.IconDrawable.<init>(IconDrawable.java:46)
at com.x.geekquote.app.activities.QuoteActivity.onCreateOptionsMenu(QuoteActivity.java:53)
Looking in adb the file mentioned, looks like the file was created but not properly copied:
root@generic_x86_64:/data/data/com.x.geekquote.app/files/icon_tmp #
ls -la
-rw-rw-rw- u0_a53 u0_a53 0 2015-03-11 11:49 material-design-iconic-font-1.0.1.ttf
I solved this by manually adb push
the file and the app did not crash anymore but that doesn't really solve it.
Let me know if you need more details !
Thanks
Hello @adrien-f!
Thanks for filing a bug.
I used the project many times and didn't face this issue. Let's try to debug it. Do you have this on a specific device or on all of your devices?
I can only see a case where the process is killed during copying of ttf in function. Could you please run a debugger on this function and check what's happening there on the first run?
Thanks.
Thanks you for your response. I'm afraid I'm unable to reproduce this issue again with a new project (API 21) and a fresh emulator. Welp.
Thanks you for your time, I'll be sure to check in if it happens again in the future.