OceanLabs / Android-Print-SDK

Android Print SDK. Easily to add print on demand functionality to your app within minutes! Print Postcards, Magnets, Photo Prints, Posters, Stickers, T-Shirts, PhotoBooks, etc.
https://www.kite.ly
Other
61 stars 35 forks source link

Crash during checkout #61

Closed UrK closed 6 years ago

UrK commented 8 years ago

Crash when starting creating a case. Size of the image passed is 1440x2392

OS: Android Nougat Device: Nexus 6p

    Process: bazaart.me.patternator, PID: 27562
    java.lang.RuntimeException: android.os.TransactionTooLargeException: data parcel size 763700 bytes
        at android.app.ActivityThread$StopInfo.run(ActivityThread.java:3752)
        at android.os.Handler.handleCallback(Handler.java:751)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at android.os.Looper.loop(Looper.java:154)
        at android.app.ActivityThread.main(ActivityThread.java:6077)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
     Caused by: android.os.TransactionTooLargeException: data parcel size 763700 bytes
        at android.os.BinderProxy.transactNative(Native Method)
        at android.os.BinderProxy.transact(Binder.java:615)
        at android.app.ActivityManagerProxy.activityStopped(ActivityManagerNative.java:3606)
        at android.app.ActivityThread$StopInfo.run(ActivityThread.java:3744)
        at android.os.Handler.handleCallback(Handler.java:751) 
        at android.os.Handler.dispatchMessage(Handler.java:95) 
        at android.os.Looper.loop(Looper.java:154) 
        at android.app.ActivityThread.main(ActivityThread.java:6077) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755) 
UrK commented 8 years ago

This is how I start the process:

Bimap bitmap = ...
ArrayList<Asset> assets = new ArrayList<>();
assets.add(new Asset(bitmap));

KiteSDK
    .getInstance(context, BuildConfig.KITE_KEY, environment)
    .startShopping(context, assets);
ghost commented 8 years ago

Could you show me how you create your asset list "assets"?

On 07/09/16 11:13, Uri wrote:

This is how I start the process:

|KiteSDK .getInstance(context, BuildConfig.KITE_KEY, environment) .startShopping(context, assets); |

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/OceanLabs/Android-Print-SDK/issues/61#issuecomment-245236585, or mute the thread https://github.com/notifications/unsubscribe-auth/AMWb-tJM8dEpCMBLk43LKXy_XSU8mQcnks5qno5HgaJpZM4J2taA.

UrK commented 8 years ago

@JLKite I've immediately updated the comment, but you were quicker than me. 😄

UrK commented 8 years ago

Pay attention that this does happen immediately on entering the SDK, but after selecting a product and tapping "Start Creating".

ghost commented 8 years ago

I've created a bitmap like this:

Bitmap bitmap = Bitmap.createBitmap( 1440, 2392, Bitmap.Config.RGB_565 );

Added it as an asset, and it goes through correctly - I can create and check-out OK. I'm running it on a Nexus 9 with Nougat.

Could you tell me what version of the SDK you're using? Are you building from the source, or Maven?

UrK commented 8 years ago

Until today I was using older version (5.2.6 from gradle) which did not have this problem. Today I converted to gradle and pulled version 5.4.x:

compile 'ly.kite:kite-print-sdk:5.+'
UrK commented 8 years ago

By the way, the activity appears with correct image and only then crashes: screenshot_20160907-141138

ghost commented 8 years ago

Could you attach the full log from the device, including the crash exception, but with some of the log on either side too, so I can see what it's trying to do?

UrK commented 8 years ago
09-07 14:37:01.243 31038-31043/xxx.me.yyy I/art: Do full code cache collection, code=248KB, data=223KB
09-07 14:37:01.249 31038-31043/xxx.me.yyy I/art: After code cache collection, code=191KB, data=144KB
09-07 14:37:04.871 31038-31043/xxx.me.yyy I/art: Do partial code cache collection, code=242KB, data=226KB
09-07 14:37:04.872 31038-31043/xxx.me.yyy I/art: After code cache collection, code=230KB, data=220KB
09-07 14:37:04.872 31038-31043/xxx.me.yyy I/art: Increasing code cache capacity to 1024KB
09-07 14:37:04.872 31038-31043/xxx.me.yyy I/art: Compiler allocated 6MB to compile void android.view.ViewRootImpl.performTraversals()
09-07 14:37:12.353 31038-31038/xxx.me.yyy I/CatalogueLoader: -- Product ( Magnet Frames / Magnet Frame 10x10cm ) discarded: inactive --
09-07 14:37:12.369 31038-31038/xxx.me.yyy I/CatalogueLoader: -- Product ( Tote Bags / Square Tote Bag ) discarded: inactive --
09-07 14:37:12.480 31038-31038/xxx.me.yyy E/CatalogueLoader: Unable to parse JSON product: {"product_active":true,"template_id":"samsung_s6eplus_tough_case","images_per_page":1,"sandbox_active":true,"images_required":1,"id":410545,"active":false,"product":{"product_code":"SGS6EP-TCB-CS-G","ios_sdk_ui_class":"PHONE_CASE","size":{"inch":{"width":4.18,"height":7.11},"cm":{"width":10.61,"height":18.05},"px":{"width":1253,"height":2132}},"order":4,"product_background_image_url":"https:\/\/s3.amazonaws.com\/sdk-static\/phone_masks\/tough_cases\/SGS6EP-TCB-CS-G\/SGS6EP-TCB-CS-G_phone.png","product_highlights_url":"https:\/\/s3.amazonaws.com\/sdk-static\/phone_masks\/tough_cases\/SGS6EP-TCB-CS-G\/SGS6EP-TCB-CS-G_shadow.png","ios_sdk_product_type":"Galaxy S6 Edge Plus","mask_url":"https:\/\/s3.amazonaws.com\/sdk-static\/phone_masks\/tough_cases\/SGS6EP-TCB-CS-G\/SGS6EP-TCB-CS-G_mask.png","cover_photo_variants":[{"variant_id":"default","url":"https:\/\/s3.amazonaws.com\/sdk-static\/product_photography\/tough_cases\/cover_galaxys6eplus.jpg"}],"ios_sdk_label_color":[243,164,49],"ios_sdk_product_class":"Tough Cases","ios_sdk_product_shots":["https:\/\/s3.amazonaws.com\/sdk-static\/casestation_photography_v2\/tough_cases\/galaxys6eplus.1.jpg","https:\/\/s3.amazonaws.com\/sdk-static\/casestation_photography_v2\/tough_cases\/galaxys6eplus.2.jpg","https:\/\/s3.amazonaws.com\/sdk-static\/casestation_photography_v2\/tough_cases\/galaxys6eplus.3.jpg"],"mask_bleed":[0,0,0,0]},"name":"Galaxy S6 Edge +","description":"The Tough Case is built for those who like to tough it out. It has two layers for extra durability and protection. Designed with materials made for space, but used on earth, the Tough case is made virtually indestructible. The added liner cushions your phone against impact. The Tough is made for life.","description_markdown":"","shipping_costs":{"rest_of_world":{"CAD":{"amount":"0"},"EUR":{"amount":"0"},"ILS":{"amount":"0"},"INR":{"amount":"0"},"SGD":{"amount":"0"},"AUD":{"amount":"0"},"ZAR":{"amount":"0"},"GBP":{"amount":"0"},"KRW":{"amount":"0"},"USD":{"amount":"0"},"NZD":{"amount":"0"},"DKK":{"amount":"0"},"NGN":{"amount":"0"},"CHF":{"amount":"0"}},"europe":{"CAD":{"amount":"0"},"EUR":{"amount":"0"},"ILS":{"amount":"0"},"INR":{"amount":"0"},"SGD":{"amount":"0"},"AUD":{"amount":"0"},"ZAR":{"amount":"0"},"GBP":{"amount":"0"},"KRW":{"amount":"0"},"USD":{"amount":"0"},"NZD":{"amount":"0"},"DKK":{"amount":"0"},"NGN":{"amount":"0"},"CHF":{"amount":"0"}},"USA":{"CAD":{"amount":"0"},"EUR":{"amount":"0"},"ILS":{"amount":"0"},"INR":{"amount":"0"},"SGD":{"amount":"0"},"AUD":{"amount":"0"},"ZAR":{"amount":"0"},"GBP":{"amount":"0"},"KRW":{"amount":"0"},"USD":{"amount":"0"},"NZD":{"amount":"0"},"DKK":{"amount":"0"},"NGN":{"amount":"0"},"CHF":{"amount":"0"}},"GBR":{"CAD":{"amount":"0"},"EUR":{"amount":"0"},"ILS":{"amount":"0"},"INR":{"amount":"0"},"SGD":{"amount":"0"},"AUD":{"amount":"0"},"ZAR":{"amount":"0"},"GBP":{"amount":"0"},"KRW":{"amount":"0"},"USD":{"amount":"0"},"NZD":{"amount":"0"},"DKK":{"amount":"0"},"NGN":{"amount":"0"},"CHF":{"amount":"0"}}},"product_category":"Tough Cases","resource_uri":"\/v3.0\/template\/samsung_s6eplus_tough_case\/","wholesale_cost":{"CAD":"0.00","EUR":"0.00","ILS":"0.00","INR":"0.00","SGD":"0.00","AUD":"0.00","ZAR":"0.00","GBP":"0.00","KRW":"0.00","USD":"0.00","NZD":"0.00","DKK":"0.00","NGN":"0.00","CHF":"0.00"},"grid_count_x":1,"grid_count_y":1,"wholesale_shipping_costs":{"rest_of_world":{"CAD":{"amount":"0"},"EUR":{"amount":"0"},"ILS":{"amount":"0"},"INR":{"amount":"0"},"SGD":{"amount":"0"},"AUD":{"amount":"0"},"ZAR":{"amount":"0"},"GBP":{"amount":"0"},"KRW":{"amount":"0"},"USD":{"amount":"0"},"NZD":{"amount":"0"},"DKK":{"amount":"0"},"NGN":{"amount":"0"},"CHF":{"amount":"0"}},"europe":{"CAD":{"amount":"0"},"EUR":{"amount":"0"},"ILS":{"amount":"0"},"INR":{"amount":"0"},"SGD":{"amount":"0"},"AUD":{"amount":"0"},"ZAR":{"amount":"0"},"GBP":{"amount":"0"},"KRW":{"amount":"0"},"USD":{"amount":"0"},"NZD":{"amount":"0"},"DKK":{"amount":"0"},"NGN":{"amount":"0"},"CHF":{"amount":"0"}},"USA":{"CAD":{"amount":"0"},"EUR":{"amount"
09-07 14:37:12.482 31038-31038/xxx.me.yyy E/CatalogueLoader: Exception:
                                                                         org.json.JSONException: No value for ios_sdk_class_photo
                                                                             at org.json.JSONObject.get(JSONObject.java:389)
                                                                             at org.json.JSONObject.getString(JSONObject.java:550)
                                                                             at ly.kite.catalogue.CatalogueLoader.parseProducts(CatalogueLoader.java:521)
                                                                             at ly.kite.catalogue.CatalogueLoader.onCatalogue(CatalogueLoader.java:860)
                                                                             at ly.kite.catalogue.CatalogueLoader.onSuccess(CatalogueLoader.java:677)
                                                                             at ly.kite.util.HTTPJSONRequest.onResponseSuccess(HTTPJSONRequest.java:152)
                                                                             at ly.kite.util.HTTPRequest$RequestTask.onPostExecute(HTTPRequest.java:368)
                                                                             at ly.kite.util.HTTPRequest$RequestTask.onPostExecute(HTTPRequest.java:277)
                                                                             at android.os.AsyncTask.finish(AsyncTask.java:660)
                                                                             at android.os.AsyncTask.-wrap1(AsyncTask.java)
                                                                             at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:677)
                                                                             at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                             at android.os.Looper.loop(Looper.java:154)
                                                                             at android.app.ActivityThread.main(ActivityThread.java:6077)
                                                                             at java.lang.reflect.Method.invoke(Native Method)
                                                                             at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
                                                                             at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
09-07 14:37:12.492 31038-31038/xxx.me.yyy I/CatalogueLoader: -- Product ( Snap Cases / Galaxy S6 Edge + ) discarded: inactive --
09-07 14:37:12.624 31038-31038/xxx.me.yyy I/CatalogueLoader: -- Product ( Folio Cases / iPhone SE Folio ) discarded: inactive --
09-07 14:37:12.688 31038-31038/xxx.me.yyy I/CatalogueLoader: -- Product ( BakPak 2 Cases / iPhone 6/6s BakPak 2 ) discarded: inactive --
09-07 14:37:12.698 31038-31038/xxx.me.yyy I/CatalogueLoader: -- Product ( BakPak 2 Cases / Galaxy S6 Edge BakPak 2 ) discarded: inactive --
09-07 14:37:12.708 31038-31038/xxx.me.yyy I/CatalogueLoader: -- Product ( BakPak 2 Cases / Galaxy S6 BakPak 2 ) discarded: inactive --
09-07 14:37:12.713 31038-31038/xxx.me.yyy I/CatalogueLoader: -- Product ( BakPak 2 Cases / iPhone 6+ BakPak 2 ) discarded: inactive --
09-07 14:37:12.734 31038-31038/xxx.me.yyy I/CatalogueLoader: -- Product ( Frames / Frames 50cm (3x3) ) discarded: user journey type not supported: FRAME --
09-07 14:37:12.739 31038-31038/xxx.me.yyy I/CatalogueLoader: -- Product ( Frames / Frames 50cm (2x2) ) discarded: user journey type not supported: FRAME --
09-07 14:37:12.744 31038-31038/xxx.me.yyy I/CatalogueLoader: -- Product ( Frames / Frames 50cm ) discarded: user journey type not supported: FRAME --
09-07 14:37:12.765 31038-31038/xxx.me.yyy I/CatalogueLoader: -- Product ( Posters / A1 Collage (54) ) discarded: user journey type not supported: POSTER --
09-07 14:37:12.791 31038-31038/xxx.me.yyy I/CatalogueLoader: -- Product ( Frames / Frames 50cm (4x4) ) discarded: user journey type not supported: FRAME --
09-07 14:37:12.811 31038-31038/xxx.me.yyy I/CatalogueLoader: -- Product ( Postcards / Postcard ) discarded: user journey type not supported: POSTCARD --
09-07 14:37:12.816 31038-31038/xxx.me.yyy I/CatalogueLoader: -- Product ( Posters / A2 Collage (54) ) discarded: user journey type not supported: POSTER --
09-07 14:37:12.821 31038-31038/xxx.me.yyy I/CatalogueLoader: -- Product ( Posters / A2 Collage (24) ) discarded: user journey type not supported: POSTER --
09-07 14:37:12.827 31038-31038/xxx.me.yyy I/CatalogueLoader: -- Product ( Posters / A2 Collage (35) ) discarded: user journey type not supported: POSTER --
09-07 14:37:12.832 31038-31038/xxx.me.yyy I/CatalogueLoader: -- Product ( Posters / A2 Poster ) discarded: user journey type not supported: POSTER --
09-07 14:37:12.847 31038-31038/xxx.me.yyy I/CatalogueLoader: -- Product ( Posters / A3 Poster ) discarded: user journey type not supported: POSTER --
09-07 14:37:12.853 31038-31038/xxx.me.yyy I/CatalogueLoader: -- Product ( Posters / A1 Collage (70) ) discarded: user journey type not supported: POSTER --
09-07 14:37:12.853 31038-31038/xxx.me.yyy I/CatalogueLoader: Storing custom object: meta = {"total_count":104,"offset":0,"limit":100,"previous":null,"next":"\/v3.0\/template\/?offset=100&limit=100"}
09-07 14:37:12.853 31038-31038/xxx.me.yyy I/CatalogueLoader: Storing custom object: payment_keys = {"stripe":{"public_key":"pk_live_o1egYds0rWu43ln7FjEyOU5E","account_id":null},"paypal":{"public_key":"ASYVBBCHF_KwVUstugKy4qvpQaPlUeE_5beKRJHpIP2d3SA_jZrsaUDTmLQY","account_id":null}}
09-07 14:37:12.883 31038-31038/xxx.me.yyy I/Choreographer: Skipped 40 frames!  The application may be doing too much work on its main thread.
09-07 14:37:13.026 31038-23489/xxx.me.yyy I/ExifInterface_JNI: Raw image not detected
09-07 14:37:13.066 31038-31043/xxx.me.yyy I/art: Compiler allocated 7MB to compile void android.widget.TextView.<init>(android.content.Context, android.util.AttributeSet, int, int)
09-07 14:37:13.068 31038-23489/xxx.me.yyy I/ExifInterface_JNI: Raw image not detected
09-07 14:37:13.097 31038-23489/xxx.me.yyy I/ExifInterface_JNI: Raw image not detected
09-07 14:37:21.998 31038-23651/xxx.me.yyy I/ExifInterface_JNI: Raw image not detected
09-07 14:37:22.031 31038-23651/xxx.me.yyy I/ExifInterface_JNI: Raw image not detected
09-07 14:37:22.060 31038-23651/xxx.me.yyy I/ExifInterface_JNI: Raw image not detected
09-07 14:37:26.797 31038-31043/xxx.me.yyy I/art: Do full code cache collection, code=504KB, data=424KB
09-07 14:37:26.798 31038-31043/xxx.me.yyy I/art: After code cache collection, code=455KB, data=349KB
09-07 14:37:27.259 31038-23723/xxx.me.yyy I/ExifInterface_JNI: Raw image not detected
09-07 14:37:27.391 31038-31045/xxx.me.yyy W/art: Suspending all threads took: 27.920ms
09-07 14:37:27.403 31038-31049/xxx.me.yyy W/art: Suspending all threads took: 11.652ms
09-07 14:37:27.407 31038-31049/xxx.me.yyy I/art: Background partial concurrent mark sweep GC freed 179(5KB) AllocSpace objects, 2(14MB) LOS objects, 24% free, 48MB/64MB, paused 12.116ms total 43.760ms
09-07 14:37:27.822 31038-23723/xxx.me.yyy I/ExifInterface_JNI: Raw image not detected
09-07 14:37:27.887 31038-31045/xxx.me.yyy W/art: Suspending all threads took: 27.669ms
09-07 14:37:29.770 31038-31043/xxx.me.yyy I/art: Do partial code cache collection, code=499KB, data=400KB
09-07 14:37:29.770 31038-31043/xxx.me.yyy I/art: After code cache collection, code=497KB, data=398KB
09-07 14:37:29.770 31038-31043/xxx.me.yyy I/art: Increasing code cache capacity to 2MB
09-07 14:37:30.047 31038-23329/xxx.me.yyy I/ExifInterface_JNI: Raw image not detected
09-07 14:37:30.154 31038-23329/xxx.me.yyy I/ExifInterface_JNI: Raw image not detected
09-07 14:37:30.155 31038-23329/xxx.me.yyy W/ExifInterface: Invalid image: ExifInterface got an unsupported image format file(ExifInterface supports JPEG and some RAW image formats only) or a corrupted JPEG file to ExifInterface.
                                                                       java.io.IOException: Invalid marker: 89
                                                                           at android.media.ExifInterface.getJpegAttributes(ExifInterface.java:1830)
                                                                           at android.media.ExifInterface.loadAttributes(ExifInterface.java:1474)
                                                                           at android.media.ExifInterface.<init>(ExifInterface.java:1111)
                                                                           at ly.kite.image.ImageLoadRequest.getRotationForImage(ImageLoadRequest.java:261)
                                                                           at ly.kite.image.ImageLoadRequest$FileSource.load(ImageLoadRequest.java:729)
                                                                           at ly.kite.image.ImageLoadRequest.getBitmap(ImageLoadRequest.java:534)
                                                                           at ly.kite.image.ImageLoadRequest.processInBackground(ImageLoadRequest.java:433)
                                                                           at ly.kite.image.ImageRequestProcessor$LoaderTask.doInBackground(ImageRequestProcessor.java:190)
                                                                           at ly.kite.image.ImageRequestProcessor$LoaderTask.doInBackground(ImageRequestProcessor.java:157)
                                                                           at android.os.AsyncTask$2.call(AsyncTask.java:304)
                                                                           at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                                                           at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243)
                                                                           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
                                                                           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
                                                                           at java.lang.Thread.run(Thread.java:761)
09-07 14:37:30.253 31038-23329/xxx.me.yyy I/ExifInterface_JNI: Raw image not detected
09-07 14:37:30.254 31038-23329/xxx.me.yyy W/ExifInterface: Invalid image: ExifInterface got an unsupported image format file(ExifInterface supports JPEG and some RAW image formats only) or a corrupted JPEG file to ExifInterface.
                                                                       java.io.IOException: Invalid marker: 89
                                                                           at android.media.ExifInterface.getJpegAttributes(ExifInterface.java:1830)
                                                                           at android.media.ExifInterface.loadAttributes(ExifInterface.java:1474)
                                                                           at android.media.ExifInterface.<init>(ExifInterface.java:1111)
                                                                           at ly.kite.image.ImageLoadRequest.getRotationForImage(ImageLoadRequest.java:261)
                                                                           at ly.kite.image.ImageLoadRequest$FileSource.load(ImageLoadRequest.java:729)
                                                                           at ly.kite.image.ImageLoadRequest.getBitmap(ImageLoadRequest.java:534)
                                                                           at ly.kite.image.ImageLoadRequest.processInBackground(ImageLoadRequest.java:433)
                                                                           at ly.kite.image.ImageRequestProcessor$LoaderTask.doInBackground(ImageRequestProcessor.java:190)
                                                                           at ly.kite.image.ImageRequestProcessor$LoaderTask.doInBackground(ImageRequestProcessor.java:157)
                                                                           at android.os.AsyncTask$2.call(AsyncTask.java:304)
                                                                           at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                                                           at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243)
                                                                           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
                                                                           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
                                                                           at java.lang.Thread.run(Thread.java:761)
09-07 14:37:30.293 31038-23329/xxx.me.yyy I/ExifInterface_JNI: Raw image not detected
09-07 14:37:30.295 31038-23329/xxx.me.yyy W/ExifInterface: Invalid image: ExifInterface got an unsupported image format file(ExifInterface supports JPEG and some RAW image formats only) or a corrupted JPEG file to ExifInterface.
                                                                       java.io.IOException: Invalid marker: 89
                                                                           at android.media.ExifInterface.getJpegAttributes(ExifInterface.java:1830)
                                                                           at android.media.ExifInterface.loadAttributes(ExifInterface.java:1474)
                                                                           at android.media.ExifInterface.<init>(ExifInterface.java:1111)
                                                                           at ly.kite.image.ImageLoadRequest.getRotationForImage(ImageLoadRequest.java:261)
                                                                           at ly.kite.image.ImageLoadRequest$FileSource.load(ImageLoadRequest.java:729)
                                                                           at ly.kite.image.ImageLoadRequest.getBitmap(ImageLoadRequest.java:534)
                                                                           at ly.kite.image.ImageLoadRequest.processInBackground(ImageLoadRequest.java:433)
                                                                           at ly.kite.image.ImageRequestProcessor$LoaderTask.doInBackground(ImageRequestProcessor.java:190)
                                                                           at ly.kite.image.ImageRequestProcessor$LoaderTask.doInBackground(ImageRequestProcessor.java:157)
                                                                           at android.os.AsyncTask$2.call(AsyncTask.java:304)
                                                                           at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                                                           at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243)
                                                                           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
                                                                           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
                                                                           at java.lang.Thread.run(Thread.java:761)
09-07 14:37:30.405 31038-31049/xxx.me.yyy W/art: Suspending all threads took: 99.300ms
09-07 14:37:30.472 31038-31045/xxx.me.yyy W/art: Suspending all threads took: 56.433ms
09-07 14:37:30.488 31038-31049/xxx.me.yyy W/art: Suspending all threads took: 16.769ms
09-07 14:37:30.490 31038-31049/xxx.me.yyy I/art: Background partial concurrent mark sweep GC freed 160(5KB) AllocSpace objects, 1(20KB) LOS objects, 17% free, 77MB/93MB, paused 17.265ms total 74.890ms
09-07 14:37:30.797 31038-31038/xxx.me.yyy E/JavaBinder: !!! FAILED BINDER TRANSACTION !!!  (parcel size = 763700)
09-07 14:37:30.797 31038-31038/xxx.me.yyy D/AndroidRuntime: Shutting down VM
09-07 14:37:30.802 31038-31038/xxx.me.yyy W/System.err: java.lang.RuntimeException: android.os.TransactionTooLargeException: data parcel size 763700 bytes
09-07 14:37:30.802 31038-31038/xxx.me.yyy W/System.err:     at android.app.ActivityThread$StopInfo.run(ActivityThread.java:3752)
09-07 14:37:30.802 31038-31038/xxx.me.yyy W/System.err:     at android.os.Handler.handleCallback(Handler.java:751)
09-07 14:37:30.802 31038-31038/xxx.me.yyy W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:95)
09-07 14:37:30.802 31038-31038/xxx.me.yyy W/System.err:     at android.os.Looper.loop(Looper.java:154)
09-07 14:37:30.802 31038-31038/xxx.me.yyy W/System.err:     at android.app.ActivityThread.main(ActivityThread.java:6077)
09-07 14:37:30.802 31038-31038/xxx.me.yyy W/System.err:     at java.lang.reflect.Method.invoke(Native Method)
09-07 14:37:30.802 31038-31038/xxx.me.yyy W/System.err:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
09-07 14:37:30.802 31038-31038/xxx.me.yyy W/System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
09-07 14:37:30.802 31038-31038/xxx.me.yyy W/System.err: Caused by: android.os.TransactionTooLargeException: data parcel size 763700 bytes
09-07 14:37:30.802 31038-31038/xxx.me.yyy W/System.err:     at android.os.BinderProxy.transactNative(Native Method)
09-07 14:37:30.802 31038-31038/xxx.me.yyy W/System.err:     at android.os.BinderProxy.transact(Binder.java:615)
09-07 14:37:30.802 31038-31038/xxx.me.yyy W/System.err:     at android.app.ActivityManagerProxy.activityStopped(ActivityManagerNative.java:3606)
09-07 14:37:30.803 31038-31038/xxx.me.yyy W/System.err:     at android.app.ActivityThread$StopInfo.run(ActivityThread.java:3744)
09-07 14:37:30.803 31038-31038/xxx.me.yyy W/System.err:     ... 7 more
09-07 14:37:30.812 31038-31038/xxx.me.yyy E/AndroidRuntime: FATAL EXCEPTION: main
                                                                        Process: xxx.me.yyy, PID: 31038
                                                                        java.lang.RuntimeException: android.os.TransactionTooLargeException: data parcel size 763700 bytes
                                                                            at android.app.ActivityThread$StopInfo.run(ActivityThread.java:3752)
                                                                            at android.os.Handler.handleCallback(Handler.java:751)
                                                                            at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                            at android.os.Looper.loop(Looper.java:154)
                                                                            at android.app.ActivityThread.main(ActivityThread.java:6077)
                                                                            at java.lang.reflect.Method.invoke(Native Method)
                                                                            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
                                                                            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
                                                                         Caused by: android.os.TransactionTooLargeException: data parcel size 763700 bytes
                                                                            at android.os.BinderProxy.transactNative(Native Method)
                                                                            at android.os.BinderProxy.transact(Binder.java:615)
                                                                            at android.app.ActivityManagerProxy.activityStopped(ActivityManagerNative.java:3606)
                                                                            at android.app.ActivityThread$StopInfo.run(ActivityThread.java:3744)
                                                                            at android.os.Handler.handleCallback(Handler.java:751) 
                                                                            at android.os.Handler.dispatchMessage(Handler.java:95) 
                                                                            at android.os.Looper.loop(Looper.java:154) 
                                                                            at android.app.ActivityThread.main(ActivityThread.java:6077) 
                                                                            at java.lang.reflect.Method.invoke(Native Method) 
                                                                            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865) 
                                                                            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755) 
ghost commented 8 years ago

I found an issue regarding this problem here: https://code.google.com/p/android/issues/detail?id=212316. It appears that before Android N an exception appeared in the log, but it was ignored and did not cause the app to crash. In fact, if the targetSdkVersion in the app build.gradle is set to 23, it is ignored, but if it is set to 24 the app crashes. So a work-around for now would be to change the targetSdkVersion to 23. In the meantime, I'm trying to work out exactly where the problem is happening (the log isn't particularly useful in this regard).

ghost commented 8 years ago

The problem seems to be that when the previous activity is saving its state in onSaveInstanceState, the size of the fragment manager state ("android:fragments") is around 760KB. I'm currently trying to work out where this is coming from, and what the best resolution for this is.

ghost commented 8 years ago

OK, I've tracked down where the bulk of this fragment state size has come from: the fragment arguments have become extremely large now that the catalogue has increased over time. I'm working on a fix now, and will update you when it's available.

ghost commented 8 years ago

I've now put in an update that should resolve this issue. I've just uploaded version 5.4.5 to Maven, so it should be available in a couple of hours. I'll leave the case open until you've tested it.