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

Getting this issue for several times in production release (Caused by java.util.concurrent.RejectedExecutionException) #848

Closed
tsdmrfth opened this issue Jul 23, 2018 · 2 comments

Comments

@tsdmrfth
Copy link

tsdmrfth commented Jul 23, 2018

#################################################
Fatal Exception: android.view.InflateException: Binary XML file line #36: Binary XML file line #36: Error inflating class
at android.view.LayoutInflater.inflate(LayoutInflater.java:539)
at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
at ui.careprodashboard.adapter.SuggestedJobPostsAdapter.onCreateViewHolder(SuggestedJobPostsAdapter.java:56)
at android.support.v7.widget.RecyclerView$Adapter.createViewHolder(RecyclerView.java:6685)
at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:5869)
at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5752)
at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5748)
at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2232)
at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1559)
at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1519)
at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:614)
at android.support.v7.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:3812)
at android.support.v7.widget.RecyclerView.onMeasure(RecyclerView.java:3225)
at android.view.View.measure(View.java:19219)
at android.support.v4.widget.NestedScrollView.measureChildWithMargins(NestedScrollView.java:1450)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:223)
at android.support.v4.widget.NestedScrollView.onMeasure(NestedScrollView.java:516)
at android.view.View.measure(View.java:19219)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6113)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:223)
at android.support.v7.widget.CardView.onMeasure(CardView.java:258)
at android.view.View.measure(View.java:19219)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6113)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1723)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:788)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:648)
at android.view.View.measure(View.java:19219)
at android.support.v4.widget.NestedScrollView.measureChildWithMargins(NestedScrollView.java:1450)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:223)
at android.support.v4.widget.NestedScrollView.onMeasure(NestedScrollView.java:516)
at android.view.View.measure(View.java:19219)
at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:825)
at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:511)
at android.view.View.measure(View.java:19219)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6113)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:223)
at android.view.View.measure(View.java:19219)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6113)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1723)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:788)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:648)
at android.view.View.measure(View.java:19219)
at android.support.v4.widget.DrawerLayout.onMeasure(DrawerLayout.java:1059)
at android.view.View.measure(View.java:19219)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6113)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:223)
at android.support.v7.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:141)
at android.view.View.measure(View.java:19219)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6113)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1723)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:788)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:648)
at android.view.View.measure(View.java:19219)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6113)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:223)
at android.view.View.measure(View.java:19219)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6113)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1723)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:788)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:648)
at android.view.View.measure(View.java:19219)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6113)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:223)
at com.android.internal.policy.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2697)
at android.view.View.measure(View.java:19219)
at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2476)
at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1440)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1694)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1321)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6703)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:894)
at android.view.Choreographer.doCallbacks(Choreographer.java:696)
at android.view.Choreographer.doFrame(Choreographer.java:631)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:880)
at android.os.Handler.handleCallback(Handler.java:815)
at android.os.Handler.dispatchMessage(Handler.java:104)
at android.os.Looper.loop(Looper.java:207)
at android.app.ActivityThread.main(ActivityThread.java:5763)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)

And another stack trace from Fabric.
#################################################

Caused by java.util.concurrent.RejectedExecutionException: Task android.os.AsyncTask$3@1f10315 rejected from java.util.concurrent.ThreadPoolExecutor@9cce62a[Running, pool size = 17, active threads = 17, queued tasks = 128, completed tasks = 2989]
at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2014)
at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:794)
at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1340)
at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:607)
at com.airbnb.lottie.LottieComposition$Factory.fromJsonReader(LottieComposition.java:220)
at com.airbnb.lottie.LottieComposition$Factory.fromInputStream(LottieComposition.java:192)
at com.airbnb.lottie.LottieComposition$Factory.fromRawFile(LottieComposition.java:182)
at com.airbnb.lottie.LottieAnimationView.setAnimation(LottieAnimationView.java:372)
at com.airbnb.lottie.LottieAnimationView.setAnimation(LottieAnimationView.java:344)
at com.airbnb.lottie.LottieAnimationView.init(LottieAnimationView.java:129)
at com.airbnb.lottie.LottieAnimationView.(LottieAnimationView.java:106)
at java.lang.reflect.Constructor.newInstance(Constructor.java)
at android.view.LayoutInflater.createView(LayoutInflater.java:619)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:764)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:835)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:838)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:838)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
at ui.careprodashboard.adapter.SuggestedJobPostsAdapter.onCreateViewHolder(SuggestedJobPostsAdapter.java:56)
at android.support.v7.widget.RecyclerView$Adapter.createViewHolder(RecyclerView.java:6685)
at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:5869)
at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5752)
at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5748)
at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2232)
at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1559)
at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1519)
at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:614)
at android.support.v7.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:3812)
at android.support.v7.widget.RecyclerView.onMeasure(RecyclerView.java:3225)
at android.view.View.measure(View.java:19219)
at android.support.v4.widget.NestedScrollView.measureChildWithMargins(NestedScrollView.java:1450)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:223)
at android.support.v4.widget.NestedScrollView.onMeasure(NestedScrollView.java:516)
at android.view.View.measure(View.java:19219)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6113)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:223)
at android.support.v7.widget.CardView.onMeasure(CardView.java:258)
at android.view.View.measure(View.java:19219)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6113)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1723)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:788)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:648)
at android.view.View.measure(View.java:19219)
at android.support.v4.widget.NestedScrollView.measureChildWithMargins(NestedScrollView.java:1450)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:223)
at android.support.v4.widget.NestedScrollView.onMeasure(NestedScrollView.java:516)
at android.view.View.measure(View.java:19219)
at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:825)
at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:511)
at android.view.View.measure(View.java:19219)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6113)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:223)
at android.view.View.measure(View.java:19219)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6113)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1723)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:788)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:648)
at android.view.View.measure(View.java:19219)
at android.support.v4.widget.DrawerLayout.onMeasure(DrawerLayout.java:1059)
at android.view.View.measure(View.java:19219)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6113)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:223)
at android.support.v7.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:141)
at android.view.View.measure(View.java:19219)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6113)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1723)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:788)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:648)
at android.view.View.measure(View.java:19219)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6113)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:223)
at android.view.View.measure(View.java:19219)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6113)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1723)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:788)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:648)
at android.view.View.measure(View.java:19219)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6113)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:223)
at com.android.internal.policy.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2697)
at android.view.View.measure(View.java:19219)
at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2476)
at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1440)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1694)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1321)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6703)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:894)
at android.view.Choreographer.doCallbacks(Choreographer.java:696)
at android.view.Choreographer.doFrame(Choreographer.java:631)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:880)
at android.os.Handler.handleCallback(Handler.java:815)
at android.os.Handler.dispatchMessage(Handler.java:104)
at android.os.Looper.loop(Looper.java:207)
at android.app.ActivityThread.main(ActivityThread.java:5763)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)

apply.json.zip

My layout file
########################################

        <com.airbnb.lottie.LottieAnimationView
            android:id="@+id/showDetailsAnimationView"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            app:lottie_autoPlay="false"
            app:lottie_cacheStrategy="weak"
            android:layout_weight="1"
            app:lottie_enableMergePathsForKitKatAndAbove="true"
            app:lottie_loop="false"
            app:lottie_rawRes="@raw/show_detail" />

        <com.airbnb.lottie.LottieAnimationView
            android:id="@+id/applyJobPostAnimationView"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            app:lottie_autoPlay="false"
            app:lottie_cacheStrategy="weak"
            android:layout_weight="1"
            app:lottie_enableMergePathsForKitKatAndAbove="true"
            app:lottie_loop="false"
            app:lottie_rawRes="@raw/apply" />

    </LinearLayout>
@tsdmrfth tsdmrfth changed the title Getting this issue for several times in production release Getting this issue for several times in production release (Caused by java.util.concurrent.RejectedExecutionException) Jul 23, 2018
@gpeal
Copy link
Collaborator

gpeal commented Jul 24, 2018

@tsdmrfth Use LottieComposition.Factory and parse the composition on its own first. Something is causing you to try and deserialize 17 compositions simultaneously.

Lottie 2.6.0 coming out soon will have improved APIs to pre-warm the composition cache.

@gpeal gpeal closed this as completed Jul 24, 2018
@gpeal
Copy link
Collaborator

gpeal commented Jul 24, 2018

#849

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