[guardian-dev] [Guardian-internal] stumped.

Dev Random c1.devrandom at niftybox.net
Wed Feb 20 18:53:38 EST 2013


The NPE in the pastebin seems to be at a different location.

Yeah, it definitely seems like the activity got destroyed once you
passed control to the camera, and didn't get created before the
onActivityResult.  This is probably because of different memory pressure
on the devices.

However, looking at the docs for onActivityResult, it should be called
just before onResume, so you should have gotten onCreate first.  Strange.

You can probably work around it by checking if isDestroyed() is true,
and squirreling the result in a field for onResume to pick up.

On 13-02-20 12:21 PM, Harlo Holmes wrote:
> (Moving thread to Dev.)
> 
> Here are some logs: http://pastebin.com/FJPExaJD
> 
> the debug comment "The View in question is android.widget.LinearLayout"
> refers to where I simply test that I can "see" that variable.
>  Similarly, "for some reason, options_holder is null?" is that same
> test, with failed results.
> 
> ++++++++++++++++++++++++++
> Research Fellow, Head of Metadata
> The Guardian Project <https://guardianproject.info>
> 
> pgp: 0xA4469630
> twitter: @harlo
> 
> 
> On Wed, Feb 20, 2013 at 2:34 PM, Harlo Holmes
> <harlo at guardianproject.info <mailto:harlo at guardianproject.info>> wrote:
> 
>     Miron, I think you are putting me on the right track.  The order in
>     which onCreate gets called determines this.  That particular build
>     must do it in a different order than what I'm expecting...
> 
>     Cannot give you logs, because the only Samsung Galaxy S3 just walked
>     out the door (with Mark), but I'll post again if I'm not making headway.
> 
>     Thanks!
>     Harlo
> 
>     ++++++++++++++++++++++++++
>     Research Fellow, Head of Metadata
>     The Guardian Project <https://guardianproject.info>
> 
>     pgp: 0xA4469630
>     twitter: @harlo
> 
> 
>     On Wed, Feb 20, 2013 at 1:30 PM, Miron <miron at hyper.to
>     <mailto:miron at hyper.to>> wrote:
> 
>         Logs or it didn't happen.
> 
>         Log in onCreate, onDestroy and onActivityResult.
> 
>         Are you sure that onActivityResult is guaranteed to happen between
>         onCreate and onDestroy?  Are you sure that findViewById is returning
>         non-null?
> 
>         On 13-02-20 10:19 AM, Harlo Holmes wrote:
>         > Samsung-specific question. Any pointers?
>         >
>         >
>         http://stackoverflow.com/questions/14986839/nullpointerexception-when-accessing-a-view-when-returning-from-camera-intent-onl
>         >
>         > thanks!
>         > Harlo
>         >
>         >
>         >
>         > _______________________________________________
>         > Guardian-internal mailing list
>         >
>         > Post: Guardian-internal at lists.mayfirst.org
>         <mailto:Guardian-internal at lists.mayfirst.org>
>         > List info:
>         https://lists.mayfirst.org/mailman/listinfo/guardian-internal
>         >
>         > To Unsubscribe
>         >         Send email to:
>          Guardian-internal-unsubscribe at lists.mayfirst.org
>         <mailto:Guardian-internal-unsubscribe at lists.mayfirst.org>
>         >         Or visit: %(user_optionsurl)s
>         >
>         > You are subscribed as: %(user_address)s
>         >
> 
> 
> 



More information about the Guardian-dev mailing list