Results 50 comments of Drakeet

I have provided the exact solution: > Don't use paddingCompat can fix this. I am using this library in my app Pure Writer, and got the same bug on Android...

+1,曾经也遇到这个问题。

@liyujiang-gzu **如果可以的话,请提供一个最小化的可复现工程**,这样便于我们确定问题和验证修复。 我记得我曾经也遇到这个问题,而且是 native 级别的崩溃,所以当时还很难捕捉到它,于是我改为自己实现的另一个 FastScroller 解决了(实际上我本来就做过这方面的工作,只是当时有一个新场景未能直接使用原有的,于是就尝试使用 zhanghai/AndroidFastScroll 这个版本),也就是说,其实并没有直接解决 zhanghai/AndroidFastScroll 的这个问题。具体问题我记不太清楚了,可能需要找一下 commit 记录,待确认。

我想起我曾经还为此开了一个 issue,只是当时我并没有找到它的准确 root cause,所以就自行关闭了,现在既然有人遇到和我一样的问题,有必要切实排查一下了: [onPreDraw is called indefinitely, causing ANR and exception #23 ](https://github.com/zhanghai/AndroidFastScroll/issues/23) @zhanghai 看起来这位朋友遇到的错误栈和我当时的到的是一样的,而且都是 native 级别的 crash——这样的 crash 往往更加难以发现和捕捉,可能会导致使用了这个库的项目发生错误而找不到根源。

应该需要搭配 https://github.com/noties/Markwon 这个项目进行复现,我当时也是使用到 Markwon 才遇到这个问题。当承载 Markdown 的 TextView 长度一变,就可能触发 FastScroller 异常。

I also encountered this problem, and the solution was to downgrade to version 1.0, that is, without Kotlin version, it was resolved. @jbarr21 @ZacSweers

I'm pretty sure this is a problem with version 2.0, and it took me a long time to track this ANR, and it took me to finally find a solution...

Sorry, it is hard, because It only happened on my user's device, I contacted him remotely to verify it, but I never found the root cause. Hope someone will help...

Hi @ghackett, what scenario would you access the `getSystemService(LAYOUT_INFLATER_SERVICE)` in two threads? BTW, this is the old Java version, the change in Kotlin does bring about a behavior change. https://github.com/InflationX/ViewPump/blob/ada2e6580b4fe4dfcd0cdaf63060c3028cda65ff/viewpump/src/main/java/io/github/inflationx/viewpump/ViewPumpContextWrapper.java#L86-L94

I tested the above code on an Android 7.1.2 device and got: ``` before: true after: false ```