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

Failure delivering result ResultInfo{who=null, request=69, result=-1, data=Intent { (has extras) }} to activity #271

Closed
litingjun2015 opened this issue Mar 14, 2017 · 2 comments

Comments

@litingjun2015
Copy link

litingjun2015 commented Mar 14, 2017

Version

Tell us which versions you are using:

  • react-native-image-crop-picker 0.11.2
  • react-native 0.39.2

Platform

Tell us to which platform this issue is related

  • Android

Expected behaviour

take picture and choose

Actual behaviour

take picture, choose and crash

Steps to reproduce

1.take picture
2.choose
3.crash

Attachments

// stacktrace or any other useful debug info

Xiaomi 2 log:

first time:

I/openSDK_LOG.UIListenerManager(18156): onActivityResult req=61111 res=-1
E/openSDK_LOG.UIListenerManager(18156): getListner action is null! rquestCode=61111
D/AndroidRuntime(18156): Shutting down VM
E/AndroidRuntime(18156): FATAL EXCEPTION: main
E/AndroidRuntime(18156): Process: com.duanglink.bizappv3, PID: 18156
E/AndroidRuntime(18156): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=61111, result=-1, data=null} to activity {com.duanglink.bizappv3/com.duanglink.bizappv3.MainActivity}: java.lang.IllegalStateException: Queue full
E/AndroidRuntime(18156):       	at android.app.ActivityThread.deliverResults(ActivityThread.java:3554)
E/AndroidRuntime(18156):       	at android.app.ActivityThread.handleSendResult(ActivityThread.java:3597)
E/AndroidRuntime(18156):       	at android.app.ActivityThread.access$1300(ActivityThread.java:147)
E/AndroidRuntime(18156):       	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1334)
E/AndroidRuntime(18156):       	at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(18156):       	at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime(18156):       	at android.app.ActivityThread.main(ActivityThread.java:5248)
E/AndroidRuntime(18156):       	at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(18156):       	at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime(18156):       	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:909)
E/AndroidRuntime(18156):       	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:704)
E/AndroidRuntime(18156): Caused by: java.lang.IllegalStateException: Queue full
E/AndroidRuntime(18156):       	at java.util.AbstractQueue.add(AbstractQueue.java:69)
E/AndroidRuntime(18156):       	at java.util.concurrent.ArrayBlockingQueue.add(ArrayBlockingQueue.java:282)
E/AndroidRuntime(18156):       	at com.duanglink.bizappv3.MainActivity.onActivityResult(MainActivity.java:80)
E/AndroidRuntime(18156):       	at android.app.Activity.dispatchActivityResult(Activity.java:6141)
E/AndroidRuntime(18156):       	at android.app.ActivityThread.deliverResults(ActivityThread.java:3550)
E/AndroidRuntime(18156):       	... 10 more
I/octvm_klo( 3227): klo lock
I/WtEventController( 1595): Receive am_crash event for pid: 18156
I/octvm_klo( 3227): get wanted event[mask:128, name:data_app_crash@1489459639135.txt] from the watchset
I/octvm_klo( 3227): start gathering logcat log...
W/ActivityManager(  855): Activity pause timeout for ActivityRecord{3a367941 u0 com.duanglink.bizappv3/.MainActivity t575}
D/WtProcessController( 1595): onAMRestartActivity callback
I/Timeline(  855): Timeline: App_transition_ready time:15814353
I/Timeline(  855): Timeline: App_transition_ready time:15814364
I/Timeline(  855): Timeline: App_transition_ready time:15814367
I/OpenGLRenderer(  855): Initialized EGL, version 1.4
I/Timeline(  855): Timeline: App_transition_ready time:15814436
I/Timeline(  855): Timeline: App_transition_ready time:15814441
I/ServiceManager(17228): Waiting for service AtCmdFwd...
I/Timeline(  855): Timeline: App_transition_ready time:15814663
I/art     (  855): Explicit concurrent mark sweep GC freed 56039(3MB) AllocSpace objects, 0(0B) LOS objects, 31% free, 34MB/50MB, paused 2.349ms total 220.550ms
V/MI_STAT (19027): trigger upload job with retry: true
W/MI_STAT (19027): upload job start, set Uploading true
V/MI_STAT (19027): AsyncJobDispatcher.mHander is null, add job to pending queue
V/MI_STAT (19027): mPendingJob(cnt=1) not empty, clone a job list and clear original list
V/MI_STAT (19027): execute a pending job
D/MI_STAT_EventDAO(19027): get 0 DB events by timestamp 9223372036854775807
V/MI_STAT (19027): No data available to be packed
V/MI_STAT_RDUM(19027): packing completed with empty data, set Uploading false
I/octvm_klo( 3227): gathering logcat log done
I/octvm_klo( 3227): klo unlock
I/ServiceManager(17228): Waiting for service AtCmdFwd...

second time:

I/ServiceManager(28621): Waiting for service AtCmdFwd...
I/Sensors (  458): sns_pwr.c(279):acquiring wakelock
I/art     (17923): Explicit concurrent mark sweep GC freed 45426(1633KB) AllocSpace objects, 0(0B) LOS objects, 24% free, 11MB/15MB, paused 488us total 48.278ms
D/wpa_supplicant( 1153): wlan0: Control interface command 'SIGNAL_POLL'
I/ServiceManager(28621): Waiting for service AtCmdFwd...
I/UCropActivity(  626): Mutate() is not supported for older platform - Therefore, override color resource (ucrop_color_toolbar_widget) in your app to make it work on pre-L devices
W/ExifInterface(  626): Skip the tag entry since tag number is not defined: 2
I/BitmapCropTask(  626): Should crop: true
D/uCrop JNI(  626): Crop image with CImg
W/System.err(  346): android.content.pm.PackageManager$NameNotFoundException: com.google.android.gms.persistent
W/System.err(  346):   	at android.app.ApplicationPackageManager.getApplicationInfo(ApplicationPackageManager.java:281)
W/System.err(  346):   	at com.tencent.nucleus.manager.usagestats.UsagestatsSTManager.a(ProGuard:731)
W/System.err(  346):   	at com.tencent.nucleus.manager.floatingwindow.manager.t.handleMessage(ProGuard:358)
W/System.err(  346):   	at android.os.Handler.dispatchMessage(Handler.java:102)
W/System.err(  346):   	at android.os.Looper.loop(Looper.java:135)
W/System.err(  346):   	at android.os.HandlerThread.run(HandlerThread.java:61)
I/art     (  855): Explicit concurrent mark sweep GC freed 50987(2MB) AllocSpace objects, 0(0B) LOS objects, 31% free, 34MB/50MB, paused 2.777ms total 177.124ms
D/WtProcessController( 1595): onAMPauseActivity callback
D/WtProcessController( 1595): onAMResumeActivity callback
I/Timeline(  855): Timeline: App_transition_ready time:17039019
D/image-crop-picker(  626): Skipping image compression
I/openSDK_LOG.Tencent(  626): onActivityResultData() reqcode = 69, resultcode = -1, data = null ? false, listener = null ? false
I/openSDK_LOG.UIListenerManager(  626): onActivityResult req=69 res=-1
E/openSDK_LOG.UIListenerManager(  626): getListner action is null! rquestCode=69
I/ServiceManager(28621): Waiting for service AtCmdFwd...
I/ReactNativeJS(  626): 'received image', { size: 3099,
I/ReactNativeJS(  626):   mime: 'image/jpeg',
I/ReactNativeJS(  626):   height: 90,
I/ReactNativeJS(  626):   width: 90,
I/ReactNativeJS(  626):   path: 'file:///data/data/com.duanglink.bizappv3/cache/react-native-image-crop-picker/3f9d5474-df67-4a46-9d19-5bdc88ad560d.jpg' }
D/AndroidRuntime(  626): Shutting down VM
E/AndroidRuntime(  626): FATAL EXCEPTION: main
E/AndroidRuntime(  626): Process: com.duanglink.bizappv3, PID: 626
E/AndroidRuntime(  626): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=69, result=-1, data=Intent { (has extras) }} to activity {com.duanglink.bizappv3/com.duanglink.bizappv3.MainActivity}: java.lang.IllegalStateException: Queue full
E/AndroidRuntime(  626):       	at android.app.ActivityThread.deliverResults(ActivityThread.java:3554)
E/AndroidRuntime(  626):       	at android.app.ActivityThread.handleSendResult(ActivityThread.java:3597)
E/AndroidRuntime(  626):       	at android.app.ActivityThread.access$1300(ActivityThread.java:147)
E/AndroidRuntime(  626):       	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1334)
E/AndroidRuntime(  626):       	at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(  626):       	at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime(  626):       	at android.app.ActivityThread.main(ActivityThread.java:5248)
E/AndroidRuntime(  626):       	at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(  626):       	at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime(  626):       	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:909)
E/AndroidRuntime(  626):       	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:704)
E/AndroidRuntime(  626): Caused by: java.lang.IllegalStateException: Queue full
E/AndroidRuntime(  626):       	at java.util.AbstractQueue.add(AbstractQueue.java:69)
E/AndroidRuntime(  626):       	at java.util.concurrent.ArrayBlockingQueue.add(ArrayBlockingQueue.java:282)
E/AndroidRuntime(  626):       	at com.duanglink.bizappv3.MainActivity.onActivityResult(MainActivity.java:80)
E/AndroidRuntime(  626):       	at android.app.Activity.dispatchActivityResult(Activity.java:6141)
E/AndroidRuntime(  626):       	at android.app.ActivityThread.deliverResults(ActivityThread.java:3550)
E/AndroidRuntime(  626):       	... 10 more
I/octvm_klo( 3227): klo lock
I/WtEventController( 1595): Receive am_crash event for pid: 626
I/ReactNativeJS(  626): file:///data/data/com.duanglink.bizappv3/cache/react-native-image-crop-picker/3f9d5474-df67-4a46-9d19-5bdc88ad560d.jpg
W/ActivityManager(  855):   Force finishing activity com.duanglink.bizappv3/.MainActivity
E/ActivityManager(  855): Invalid thumbnail dimensions: 0x0
@litingjun2015
Copy link
Author

litingjun2015 commented Mar 14, 2017

I guess it would be related to my update of MainActivity.java:

    @Override
    public void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        if (resultCode == RESULT_OK && requestCode == 200) {
            String result = data.getStringExtra("umc_result");
            if (result != null && !result.equals("")) {
                mQueue.add(result);
            } else {
                mQueue.add("无数据啦");
            }
        } else {
            mQueue.add("没有回调...");
        }
    }
D/AndroidRuntime(  626): Shutting down VM
E/AndroidRuntime(  626): FATAL EXCEPTION: main
E/AndroidRuntime(  626): Process: com.duanglink.bizappv3, PID: 626
E/AndroidRuntime(  626): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=69, result=-1, data=Intent { (has extras) }} to activity {com.duanglink.bizappv3/com.duanglink.bizappv3.MainActivity}: 

I'll check it out.

@litingjun2015 litingjun2015 changed the title Xiaomi 2, SUMSUNG SM-C5000, Huawei T1(T1-701u), oppo R7s take photo and try to select Failure delivering result ResultInfo{who=null, request=69, result=-1, data=Intent { (has extras) }} to activity Mar 14, 2017
@litingjun2015
Copy link
Author

solved.

@Override
    public void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        if (resultCode == RESULT_OK && requestCode == 200) {
            String result = data.getStringExtra("umc_result");
            if (result != null && !result.equals("")) {
                mQueue.add(result);
            } else {
                //mQueue.add("无数据啦");
            }
        } else {
           // mQueue.add("没有回调...");
        }
    }

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

1 participant