Looking at the method in question:

https://github.com/android/platform_frameworks_support/blob/master/v4/java/android/support/v4/app/FragmentActivity.java#L137

I would guess that you are not using the latest version of the compat
library, because the latest source contains a check for fragment being null
(line 148).

The latest commit's comment is "Fix NPE in `onActivityResult` when target
fragment no longer exists.".

https://github.com/android/platform_frameworks_support/commit/72bf9301f2914d15c6432dbe1c68e2a930f33c17

You might want to debug into the compat library,
first startActivityFromFragment to check the synthetic request code (which
is built to include the fragment index), and then onActivityResult to
follow the fragment lookup logic.

-- K

2012/5/20 Bas Verhoog <[email protected]>

> Forgot to paste the FC LogCat output:
>
> 05-20 19:28:35.279: E/AndroidRuntime(493): FATAL EXCEPTION: main
>>
>> 05-20 19:28:35.279: E/AndroidRuntime(493): java.lang.RuntimeException:
>>> Failure delivering result ResultInfo{who=null, request=262144, result=0,
>>> data=null} to activity
>>> {bas.sie.Antonius/bas.sie.Antonius.AntoniusActivity}:
>>> java.lang.NullPointerException
>>
>> 05-20 19:28:35.279: E/AndroidRuntime(493): at
>>> android.app.ActivityThread.deliverResults(ActivityThread.java:2532)
>>
>> 05-20 19:28:35.279: E/AndroidRuntime(493): at
>>> android.app.ActivityThread.handleSendResult(ActivityThread.java:2574)
>>
>> 05-20 19:28:35.279: E/AndroidRuntime(493): at
>>> android.app.ActivityThread.access**1,570.11€**(ActivityThread.java:117)
>>
>> 05-20 19:28:35.279: E/AndroidRuntime(493): at
>>> android.app.ActivityThread$H.handleMessage(ActivityThread.java:961)
>>
>> 05-20 19:28:35.279: E/AndroidRuntime(493): at
>>> android.os.Handler.dispatchMessage(Handler.java:99)
>>
>> 05-20 19:28:35.279: E/AndroidRuntime(493): at
>>> android.os.Looper.loop(Looper.java:123)
>>
>> 05-20 19:28:35.279: E/AndroidRuntime(493): at
>>> android.app.ActivityThread.main(ActivityThread.java:3683)
>>
>> 05-20 19:28:35.279: E/AndroidRuntime(493): at
>>> java.lang.reflect.Method.invokeNative(Native Method)
>>
>> 05-20 19:28:35.279: E/AndroidRuntime(493): at
>>> java.lang.reflect.Method.invoke(Method.java:507)
>>
>> 05-20 19:28:35.279: E/AndroidRuntime(493): at
>>> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
>>
>> 05-20 19:28:35.279: E/AndroidRuntime(493): at
>>> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
>>
>> 05-20 19:28:35.279: E/AndroidRuntime(493): at
>>> dalvik.system.NativeStart.main(Native Method)
>>
>> 05-20 19:28:35.279: E/AndroidRuntime(493): Caused by:
>>> java.lang.NullPointerException
>>
>> 05-20 19:28:35.279: E/AndroidRuntime(493): at
>>> android.support.v4.app.FragmentActivity.onActivityResult(FragmentActivity.java:152)
>>
>> 05-20 19:28:35.279: E/AndroidRuntime(493): at
>>> android.app.Activity.dispatchActivityResult(Activity.java:3908)
>>
>> 05-20 19:28:35.279: E/AndroidRuntime(493): at
>>> android.app.ActivityThread.deliverResults(ActivityThread.java:2528)
>>
>> 05-20 19:28:35.279: E/AndroidRuntime(493): ... 11 more
>>
>>
>>
> On Sunday, May 20, 2012 9:26:21 PM UTC+2, Bas Verhoog wrote:
>>
>> Hello everyone,
>>
>> Does anyone know of a problem regarding the cooperation of a Dialog and a
>> WebView?
>>
>> I have an ActionBarSherlock project with tabs (Fragments), and one of the
>> tabs has a couple of Buttons. One Button starts a custom Dialog with a List
>> (DialogFragment), from which you can choose to be sent to a number of
>> Facebook accounts.
>>
>> However, once the WebView is started and I press the Back button on the
>> phone, the app FC's. This was tested on ICS and GB (2.3.3 and 4.0.3). The
>> WebView is still a normal Activity (SherlockActivity).
>>
>> I don't think I have any code that is causing this, except for some
>> clearing of the WebView cache when the Back button is pressed. Removing
>> that code didn't help.
>>
>> Thanks,
>>
>> Bas
>>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to