Status Update
Comments
to...@gmail.com <to...@gmail.com> #3
Is there an ETA for the next release?
si...@google.com <si...@google.com> #4
se...@google.com <se...@google.com> #5
Branch: androidx-master-dev
commit a1957df3709a06f4e6482fb0e4d39ded4f230a70
Author: Rahul Ravikumar <rahulrav@google.com>
Date: Mon Jul 29 09:48:05 2019
Workaround NPE in PersistableBundle.getExtras().
Test: Existing unit tests pass. Ran integration test app.
Fixes:
Change-Id: I0b48e0009a7d83c343a3d26112b94c057470c281
M work/workmanager/src/main/java/androidx/work/impl/background/systemjob/SystemJobService.java
to...@gmail.com <to...@gmail.com> #6
se...@google.com <se...@google.com> #7
Thanks! That's helpful to know it's reproing on both 11 and 12 - no need to test on others. We'll have to explore a bit.
to...@gmail.com <to...@gmail.com> #8
Any feedback on this? Appcompat 1.6 is around the corner with Android T. Migrating away from CharArrayBuffer is a ton of work to try to keep the huge performance gain it provide for my use case.
se...@google.com <se...@google.com>
se...@google.com <se...@google.com> #9
Going out in next release.
se...@google.com <se...@google.com> #10
There's no code workaround that enables emoji and allows that setText overload to be used in the current version.
Other options:
emojiCompatEnabled=false
in your theme will skip emoji processing (please enable it again once fix goes out)- Don't use setText(char[]) (sounds like this is not really an option for you)
- Hold back appcompat upgrade until the fix goes out.
The fix will go out in emoji2:emoji2-views-helpers 1.2-alpha02 so you may be able to bump that dependency early to test it.
ap...@google.com <ap...@google.com> #11
Branch: androidx-main
commit 297989f164a9913a4c4c90e3fdd571203dca0830
Author: Sean McQuillan <seanmcq@google.com>
Date: Thu Mar 03 13:21:07 2022
Safely process no emoji from TextView$CharWrapper
This avoids calling TextView.setText when the text has not been updated
by emoji2. This has the impact of avoiding an extra text layout on emoji
font loading.
Fixes:
Test: ./gradlew :e2:e2-v-h:cAT
Relnote: "Fix crash when emoji2 loads font and TextView.setText(char[])
was used."
Change-Id: Id511e36ce9a9077309855082de88f00c26024c9d
M emoji2/emoji2-views-helper/src/main/java/androidx/emoji2/viewsintegration/EmojiInputFilter.java
M emoji2/emoji2-views-helper/src/androidTest/java/androidx/emoji2/viewsintegration/EmojiInputFilterTest.java
to...@gmail.com <to...@gmail.com> #12
Thanks for the fix I can wait as nothing mandatory in appcompat 1.4 for my use case.
Is there some compatibility matrix between appcompat and emoji ? (Mostly will emoji 1.2 work with app compat 1.4 in case there's blocking stuff to support T and appcompat 1.6?)
se...@google.com <se...@google.com> #13
Great to hear!
I don't have a compat spreadsheet, but 1.2 is going to be 1.1 with bugfixes like this so no concerns here.
se...@google.com <se...@google.com> #14
Future readers:
Currently not planning on doing a appcompat 1.4.2 bugfix release containing this patch, but we can roll one if it's becomes necessary for some reason.
Please re-open ticket if this is blocking you.
to...@gmail.com <to...@gmail.com> #15
Sorry to post again here but the root issue now also impact Pixel phones when changing the text after having used a char array. (So will crash with Emoji too when it actually do change the text as the fix only fix when the content does not change)
Since there was no reaction there for a long time
se...@google.com <se...@google.com> #16
Thanks for the ping :looking:
Description
Component used: Appcompat 1.4.0 / Constraint layout 2.1.1 Version used: Devices/Android versions reproduced on: All
Since this is a long post I'll start by the end: Doing a bisect, the issue was introduced in 1.4.0 alpha 3 and is not present in 1.4.0 alpha 2.
I'm trying to build a repro but don't really understand what is going on, randomly on first start I have crashes from Textview whose data is set via setText(buffer.data, 0, buffer.sizeCopied). If I catch the error and just log it, then navigating or returning to the same state won't crash again. But killing the app and restart it can trigger it. So only happens on first run.
The buffer is stable and not edited anywhere it was working since ages and works nicely when reverting to app compat 1.3.1.
Strangely the crash have no reference to appcompat stuff, but it's the update to 1.4.0 that cause this.
Since I have no idea of a possible cause and this happens randomly in a very deep part of the app, I'd like some pointers about changes in appcompat 1.4.0 to narrow the possible cause and be able to create a repro. Sounds like there where changes to delay loading of things or maybe side effect of the emoji stuff that double init the textviews after the emoji library is loaded or not found? Or maybe some kind of data cache now and the crash occurs when the same final string is displayed multiple times?
Anyway any pointer to be able to help me provide more info and / or build a repro would be nice.
Crash log: