Thank you for the help - unfortunately (as usual) the person having
the problem is unable to describe what they are doing in any
meaningful manner, and they're a couple of hundred miles away - so
there's a lot of guesswork going on at my end.  As I say, I've been
able to replicate the problem a grand total of once --- and on that
occasion the emulator/eclipse was running at about 1% of normal speed.

I'll hook into the class you mention and see what I can find - will
post results.  My current assumption is that I've cocked up something
in the manifest that is affecting (literally 1 in 1000 people).

Thanks again.
Doug

On Jun 26, 7:08 pm, Dianne Hackborn <[email protected]> wrote:
> I am not aware of any such problems -- the system clearly uses
> startActivity() a -lot- for all of its normal UI, and I have never seen
> spurious security exceptions.
>
> If you want to debug it, you need to debug the system code -- this is
> running in the system process, and the class is ActivityManagerService.
> You'll want to attach the debugger there, and put a breakpoint in the
> activity manager's public startActivity call.
>
> There should also be a log message printed when the security exception is
> generated, telling you pretty completely why it happened (though the output
> can be a little hard to decipher).  It would be useful if you posted this
> information.
>
>
>
> On Fri, Jun 26, 2009 at 6:28 PM, Doug <[email protected]> wrote:
>
> > I understand that, but per the referenced post, for whatever reason
> > the 'startActivity()' method *is* occasionally throwing an
> > ActivityNotFoundException for a validly defined (and working on other
> > clients) activity - **exactly** the same APK - working well on dozens
> > (hundreds) of G1's - throwing the exception on one.
>
> > I don't know if this is possibly caused by a problem reading the
> > manifest at startup, or for some other reason (I see other issues
> > possibly related to reading the package - per
>
> >http://groups.google.com/group/android-developers/browse_thread/threa...
> > ).
>
> > Perhaps you could answer this question - I am willing to step through
> > the source, but once java goes "native" the debugger loses all
> > control, and when the method returns the error has already occurred.
> > Assuming I have all the source (I do) is is possible to debug past the
> > native call?
>
> > Doug
>
> > On Jun 26, 5:28 pm, Dianne Hackborn <[email protected]> wrote:
> > > Activities can't throw exceptions back to you.  Any exceptions they throw
> > > will be handled in their own process, crashing their own application.
>
> > > On Fri, Jun 26, 2009 at 3:29 PM, Doug <[email protected]> wrote:
>
> > > > So, what should we do when the activity actually *does* exist, but for
> > > > reasons of its own Android decides to throw this exception anyway?
>
> > > > Ref:
> > > >http://groups.google.com/group/android-developers/browse_thread/threa.
> > ..
>
> > > > On Jun 23, 12:18 pm, Dianne Hackborn <[email protected]> wrote:
> > > > > If you know for sure the activity will exist, there is no need to
> > catch
> > > > the
> > > > > exception.
>
> > > > > On Tue, Jun 23, 2009 at 11:49 AM, n179911 <[email protected]> wrote:
>
> > > > > > The JavaDoc of Context's public abstract void startActivity (Intent
> > > > > > intent) said:
>
> > > > > > This method throws ActivityNotFoundException if there was no
> > Activity
> > > > > > found to run the given Intent.
>
> > > > > > But when I look at the android source code, it does not catch
> > > > > > ActivityNotFoundException.
>
> > > > > > For example in AlarmClock.java:
>
> > > > > >  digitalClock.setOnClickListener(new OnClickListener() {
> > > > > >                    public void onClick(View v) {
> > > > > >                        if (true) {
> > > > > >                            Intent intent = new
> > > > > > Intent(AlarmClock.this, SetAlarm.class);
> > > > > >                            intent.putExtra(Alarms.ID, id);
> > > > > >                            startActivityForResult(intent,
> > SET_ALARM);
> > > > > >                        } else {
> > > > > >                            // TESTING: immediately pop alarm
> > > > > >                            Intent fireAlarm = new
> > > > > > Intent(AlarmClock.this, AlarmAlert.class);
> > > > > >                            fireAlarm.putExtra(Alarms.ID, id);
>
> > > > > >  fireAlarm.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
> > > > > >                            startActivity(fireAlarm);
> > > > > >                        }
> > > > > >                    }
> > > > > >                });
>
> > > > > > Can you please tell me what is the code which handles the case when
> > > > > > there is no activity for that intent?
>
> > > > > > Thank you.
>
> > > > > --
> > > > > Dianne Hackborn
> > > > > Android framework engineer
> > > > > [email protected]
>
> > > > > Note: please don't send private questions to me, as I don't have time
> > to
> > > > > provide private support, and so won't reply to such e-mails.  All
> > such
> > > > > questions should be posted on public forums, where I and others can
> > see
> > > > and
> > > > > answer them.
>
> > > --
> > > Dianne Hackborn
> > > Android framework engineer
> > > [email protected]
>
> > > Note: please don't send private questions to me, as I don't have time to
> > > provide private support, and so won't reply to such e-mails.  All such
> > > questions should be posted on public forums, where I and others can see
> > and
> > > answer them.
>
> --
> Dianne Hackborn
> Android framework engineer
> [email protected]
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
--~--~---------~--~----~------------~-------~--~----~
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