Re: [android-developers] Re: Null pointer exception

2009-12-30 Thread Stephen @ gmail.com
> >
> > });
> > registerForContextMenu(aList);
> >
> > }
> > @Override
> > public void onResume()
> > {
> >  super.onResume();
> >
> >  fillAList();
> > }
> > @Override
> > public void onDestroy(){
> > super.onDestroy();
> > db.close();
> > }
> >
> > @Override
> > public void onCreateContextMenu(ContextMenu menu, View v,
> > ContextMenuInfo menuInfo) {
> >
> > if(v == aList){
> > menu.add(0, 7, 0, "option 1");
> > }
> > }
> >
> > @Override
> > public boolean onContextItemSelected(MenuItem item) {
> > AdapterContextMenuInfo info = (AdapterContextMenuInfo)
> > item.getMenuInfo();
> > Cursor c = null;
> > startManagingCursor(c);
> > Long id;
> > Integer idInt;
> >
> > switch(item.getItemId()) {
> >
> > case 7:
> > c = db.getInfo(name);
> > c.moveToPosition(info.position - 1);
> > Intent i = new Intent(this, Select.class);
> > i.putExtra(DBAdapter.KEY_NAME,
> c.getString(c.getColumnIndexOrThrow
> > (DBAdapter.KEY_NAME)));
> > startActivity(i);
> >
> > return true;
> > }
> >
> > return super.onContextItemSelected(item);
> > }
> >
> > public void fillArmorList(){
> >
> > Cursor c = db.getAll(Sheet.charName);
> > startManagingCursor(c);
> >
> > String[] from = new String[]{//DB columns};
> >
> > int[] to = new int[]{//Layout Elements};
> >
> > SimpleCursorAdapter items = new SimpleCursorAdapter(this,
> > R.layout.item_row, c, from, to);
> > aList.setAdapter(items);
> > }
> >
> > }
> >
> > On Dec 30, 1:41 pm, JasonMP  wrote:
> >
> >
> >
> > > Hmm, Ok, I've placed the breakpoint in and everything appears to be
> > > fine, but it still doesn't work.  This code is essentially a copy/
> > > paste from another area of my app.  In that instance its being called
> > > from a ListView contextmenu as well and works fine.  What do you mean
> > > exactly by catching ALL the exceptions?  Is that something I need to
> > > add into the code?
> >
> > > On Dec 30, 1:21 pm, "Stephen @ gmail.com" 
> > > wrote:
> >
> > > > Sorry if this sounds silly: you might want to set a breakpoint on
> line:
> >
> > > > startActivity(i);
> >
> > > > when you hit that point, examine "i" carefully.  From your log, I
> wonder if
> > > > the act of starting the activity invokes your current code, inducing
> an
> > > > infinite loop.  Also, if it were my code, I would want to ensure I
> catch all
> > > > uncaught exceptions.  Around your code that you feel is failing, I
> would
> > > > catch the general "Exception" as well as the AndroidRuntimeException
> (cannot
> > > > remember if I've spelled that perfectly right), and print out the
> stack
> > > > frame from the exception that was caught.  that might yield
> additional info.
> >
> > > > Finally, further assistance from the forum, you may want to include
> more of
> > > > your code.  You probably have something special in there you don't
> want to
> > > > share... just make what you post generic enough so we can see the
> construct
> > > > of your whole activity.
> >
> > > > all the best, steve.
> >
> > > > On Wed, Dec 30, 2009 at 10:10 AM, JasonMP 
> wrote:
> > > > > Yes I'm using eclipse.  I use the debugger and when I hit that
> point
> > > > > in my app i get the above error in my logcat window.  Is there
> another
> > > > > way to debug in eclipse?
> >
> > > > > On Dec 30, 1:01 pm, Matt  wrote:
> > > > > > I would just step through it with the debugger (assuming you are
> using
> > > > > > Eclipse)
> >
> > > > > > On Dec 30, 8:39 am, JasonMP  wrote:
> >
> > > > > > > Anyone know what would cause this 

Re: [android-developers] Re: Null pointer exception

2009-12-30 Thread Stephen @ gmail.com
Sorry if this sounds silly: you might want to set a breakpoint on line:

startActivity(i);

when you hit that point, examine "i" carefully.  From your log, I wonder if
the act of starting the activity invokes your current code, inducing an
infinite loop.  Also, if it were my code, I would want to ensure I catch all
uncaught exceptions.  Around your code that you feel is failing, I would
catch the general "Exception" as well as the AndroidRuntimeException (cannot
remember if I've spelled that perfectly right), and print out the stack
frame from the exception that was caught.  that might yield additional info.

Finally, further assistance from the forum, you may want to include more of
your code.  You probably have something special in there you don't want to
share... just make what you post generic enough so we can see the construct
of your whole activity.

all the best, steve.

On Wed, Dec 30, 2009 at 10:10 AM, JasonMP  wrote:

> Yes I'm using eclipse.  I use the debugger and when I hit that point
> in my app i get the above error in my logcat window.  Is there another
> way to debug in eclipse?
>
> On Dec 30, 1:01 pm, Matt  wrote:
> > I would just step through it with the debugger (assuming you are using
> > Eclipse)
> >
> > On Dec 30, 8:39 am, JasonMP  wrote:
> >
> >
> >
> > > Anyone know what would cause this error?
> >
> > > 12-30 10:26:50.858: ERROR/AndroidRuntime(921): Uncaught handler:
> > > thread main exiting due to uncaught exception
> >
> > > 12-30 10:26:50.928: ERROR/AndroidRuntime(921):
> > > java.lang.RuntimeException: Unable to stop activity {com.mallet.dtool/
> > > com.mallet.dtool.Sheet}: java.lang.NullPointerException
> >
> > > 12-30 10:26:50.928: ERROR/AndroidRuntime(921): at
> > > android.app.ActivityThread.performStopActivityInner
> > > (ActivityThread.java:3124)
> >
> > > 12-30 10:26:50.928: ERROR/AndroidRuntime(921): at
> > > android.app.ActivityThread.handleStopActivity(ActivityThread.java:
> > > 3167)
> >
> > > 12-30 10:26:50.928: ERROR/AndroidRuntime(921): at
> > > android.app.ActivityThread.access$2400(ActivityThread.java:116)
> >
> > > 12-30 10:26:50.928: ERROR/AndroidRuntime(921): at
> > > android.app.ActivityThread$H.handleMessage(ActivityThread.java:1810)
> >
> > > 12-30 10:26:50.928: ERROR/AndroidRuntime(921): at
> > > android.os.Handler.dispatchMessage(Handler.java:99)
> >
> > > 12-30 10:26:50.928: ERROR/AndroidRuntime(921): at
> > > android.os.Looper.loop(Looper.java:123)
> >
> > > 12-30 10:26:50.928: ERROR/AndroidRuntime(921): at
> > > android.app.ActivityThread.main(ActivityThread.java:4203)
> >
> > > 12-30 10:26:50.928: ERROR/AndroidRuntime(921): at
> > > java.lang.reflect.Method.invokeNative(Native Method)
> >
> > > 12-30 10:26:50.928: ERROR/AndroidRuntime(921): at
> > > java.lang.reflect.Method.invoke(Method.java:521)
> >
> > > 12-30 10:26:50.928: ERROR/AndroidRuntime(921): at
> > > com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
> > > (ZygoteInit.java:791)
> >
> > > 12-30 10:26:50.928: ERROR/AndroidRuntime(921): at
> > > com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
> >
> > > 12-30 10:26:50.928: ERROR/AndroidRuntime(921): at
> > > dalvik.system.NativeStart.main(Native Method)
> >
> > > 12-30 10:26:50.928: ERROR/AndroidRuntime(921): Caused by:
> > > java.lang.NullPointerException
> >
> > > 12-30 10:26:50.928: ERROR/AndroidRuntime(921): at
> > > android.app.Activity.performStop(Activity.java:3604)
> >
> > > 12-30 10:26:50.928: ERROR/AndroidRuntime(921): at
> > > android.app.ActivityThread.performStopActivityInner
> > > (ActivityThread.java:3121)
> >
> > > 12-30 10:26:50.928: ERROR/AndroidRuntime(921): ... 11 more
> >
> > > This is the code it runs when I get the error (this is a context menu
> > > option from a listview)
> >
> > > Cursor c = db.getInfo(name);
> > > c.moveToPosition(info.position - 1);
> > > Intent i = new Intent(this, Select.class);
> > > i.putExtra(name, c.getString(c.getColumnIndexOrThrow
> > > (DBAdapter.KEY_NAME)));
> >
> > > startActivity(i);
> >
> > > this launches another activity that when opened from other areas of my
> > > app work fine.  I checked to see if it had anything to do with the
> > > extras and it didn't seem to(i removed them entirely).
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/

Re: [android-developers] Re: help needed with project: preview image on a opengl texture

2009-12-10 Thread Stephen @ gmail.com
sorry for the distraction.  I'm definitely not familiar with this issue.

On Thu, Dec 10, 2009 at 2:10 PM, tdom...@googlemail.com <
tdom...@googlemail.com> wrote:

> The build number is: DRC83
> I'm using an T-mobile G1.
>
> >Also, I'm wondering, is it sufficient to exit the application to restore
> the
> >device's normal behavior?
> Exiting the application works fine. If I restart the application
> sometimes it will work sometimes not...
>
> On 10 Dez., 22:54, "Stephen @ gmail.com" 
> wrote:
> > On the physical device, in settings->about phone-> build_number.,
> > there's a long description there that more precisely identifies the
> revision
> > of software being used.  In the first software revision for Droid, for
> > example, it will say ESD20 in the midst of that long string.
> >
> > Also, I'm wondering, is it sufficient to exit the application to restore
> the
> > device's normal behavior?
> >
> > I appreciate the information if you're willing to reply.  Thanks!
> >
> > Stephen.
> >
> > On Thu, Dec 10, 2009 at 1:37 PM, tdom...@googlemail.com <
> >
> > tdom...@googlemail.com> wrote:
> > > I'm using Android 1.6.
> >
> > > where do I get the revision from?
> >
> > > On 10 Dez., 22:00, "Stephen @ gmail.com" 
> > > wrote:
> > > > Could you please answer the following?
> >
> > > > What's your platform? (Eclair/Droid/Donuts/Magic ... etc)
> > > > Also, what revision of the software (e.g. ESD20)?
> >
> > > > Thanks!
> >
> > > > On Thu, Dec 10, 2009 at 11:47 AM, tdom...@googlemail.com <
> >
> > > > tdom...@googlemail.com> wrote:
> > > > > hi,
> > > > > I'm trying to get the preview images of the android Camera onto a
> > > > > opengl texture. I have been successful so far, it works most of the
> > > > > times. Though sometimes I will just get a black screen when
> starting/
> > > > > resuming the application. I have been debugging for days, not
> finding
> > > > > any clue.
> > > > > When debugging I noticed that both the camera callback and the
> > > > > onDrawFrame are called in such situations. the bytearray of the
> camera
> > > > > does contain data. though nothing is shown.
> > > > > I would really appreciate if someone could help me with this, cause
> > > > > problem has been driving me crazy for days.
> >
> > > > > the source can be browsed/checked out here:
> > > > >http://code.google.com/p/andar/source/checkout
> >
> > > > > --
> > > > > You received this message because you are subscribed to the Google
> > > > > Groups "Android Developers" group.
> > > > > To post to this group, send email to
> > > android-developers@googlegroups.com
> > > > > To unsubscribe from this group, send email to
> > > > > android-developers+unsubscr...@googlegroups.com
> 
> >
> > > 
> 
> >
> >
> > > > > 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
> android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com
> 
> >
> > > 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 android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: help needed with project: preview image on a opengl texture

2009-12-10 Thread Stephen @ gmail.com
On the physical device, in settings->about phone-> build_number.,
there's a long description there that more precisely identifies the revision
of software being used.  In the first software revision for Droid, for
example, it will say ESD20 in the midst of that long string.

Also, I'm wondering, is it sufficient to exit the application to restore the
device's normal behavior?

I appreciate the information if you're willing to reply.  Thanks!

Stephen.

On Thu, Dec 10, 2009 at 1:37 PM, tdom...@googlemail.com <
tdom...@googlemail.com> wrote:

> I'm using Android 1.6.
>
> where do I get the revision from?
>
> On 10 Dez., 22:00, "Stephen @ gmail.com" 
> wrote:
> > Could you please answer the following?
> >
> > What's your platform? (Eclair/Droid/Donuts/Magic ... etc)
> > Also, what revision of the software (e.g. ESD20)?
> >
> > Thanks!
> >
> > On Thu, Dec 10, 2009 at 11:47 AM, tdom...@googlemail.com <
> >
> > tdom...@googlemail.com> wrote:
> > > hi,
> > > I'm trying to get the preview images of the android Camera onto a
> > > opengl texture. I have been successful so far, it works most of the
> > > times. Though sometimes I will just get a black screen when starting/
> > > resuming the application. I have been debugging for days, not finding
> > > any clue.
> > > When debugging I noticed that both the camera callback and the
> > > onDrawFrame are called in such situations. the bytearray of the camera
> > > does contain data. though nothing is shown.
> > > I would really appreciate if someone could help me with this, cause
> > > problem has been driving me crazy for days.
> >
> > > the source can be browsed/checked out here:
> > >http://code.google.com/p/andar/source/checkout
> >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to
> android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com
> 
> >
> > > 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 android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] help needed with project: preview image on a opengl texture

2009-12-10 Thread Stephen @ gmail.com
Could you please answer the following?

What's your platform? (Eclair/Droid/Donuts/Magic ... etc)
Also, what revision of the software (e.g. ESD20)?

Thanks!

On Thu, Dec 10, 2009 at 11:47 AM, tdom...@googlemail.com <
tdom...@googlemail.com> wrote:

> hi,
> I'm trying to get the preview images of the android Camera onto a
> opengl texture. I have been successful so far, it works most of the
> times. Though sometimes I will just get a black screen when starting/
> resuming the application. I have been debugging for days, not finding
> any clue.
> When debugging I noticed that both the camera callback and the
> onDrawFrame are called in such situations. the bytearray of the camera
> does contain data. though nothing is shown.
> I would really appreciate if someone could help me with this, cause
> problem has been driving me crazy for days.
>
> the source can be browsed/checked out here:
> http://code.google.com/p/andar/source/checkout
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en