Android :: Calling Get JSONArray Throwing Exception With No Stack Trace
Apr 7, 2010
I'm currently working on an android app that pulls a list of forums from a JSON feed. I'm trying to parse the feed and immediately upon calling getJSONArray a JSON exception is being thrown with no stack trace. The JSON being returned is stored in an JSONObject jobj with the format as follows: However when running the following code, I get an immediate exception without a stack trace: Code...
View 1 Replies
Nov 20, 2010
Why the following xml file should throw NullPointer exception? If I remove all reference to the array hrs_to_wait_values it is ok.
CODE:..............
View 1 Replies
View Related
Sep 20, 2010
My game is crashing on the HTC Hero and I have managed to get a user to send me their log. I don't see a Java stack trace at all. It looks like it's crashing in the OpenGL driver. I was wondering how I could go about trying to determine the problem. I was thinking of adding that acra project that sends crash reports to a server but I am thinking it will just send the same that is in this log. I have error checking everywhere so I am really at a lose where to go from here. I even went out and bought a HTC Hero but Canada only has 1.5 for the OS. Code...
View 10 Replies
View Related
Dec 16, 2009
So I have an app on the market with >10k active users. I have recieved maybe 50 complaints from Droid-user that the program crashes arbitrarily. I have not been able to replicate the error with my own droid, but I got one of the to send me this crash log. However, it does not reference the application. Do you have any suggestions on how to track down this error? I stand baffled.
11-25 16:18:03.730 D/AndroidRuntime( 2964): Shutting down VM 11-25 16:18:03.730 W/dalvikvm( 2964): threadid=3: thread exiting with uncaught exception (group=0x4001b180) 11-25 16:18:03.730 E/AndroidRuntime( 2964): Uncaught handler: thread main exiting due to uncaught exception 11-25 16:18:03.761 E/AndroidRuntime( 2964): java.lang. Code...
View 3 Replies
View Related
Jul 6, 2010
Even explicitly writing e.printStackTrace() it doesn't print to the console, why?
View 3 Replies
View Related
Jul 29, 2010
Im trying to get an object form my SQLite database in my Android application. I know that the contact is in the database because when I add it and try finding by ID, it returns the object. When I try finding by first and last name, though, it throws an exception and Im left with a null reference.
Here is the query:
CODE:..........
Ive also tried to find just by first name and just by last name. Same result as above.
The exception is an SQLite exception
no such column: aurelius: , while compiling: SELECT _id, last_name, first_name,
email_address, organization_name, label, label_position FROM contacts WHERE
first_name=marcus AND last_name=aurelius
And also happens when trying to select just first or last name
no such column: marcus: , while compiling: SELECT _id, last_name, first_name,
email_address, organization_name, label, label_position FROM contacts WHERE
first_name=marcus
View 1 Replies
View Related
May 28, 2010
I have a GestureOverlayView over the top of a TextView. The TextView has Linkify.addLinks(tv, Linkify.ALL) called on it.
If you click on an URL in the TextView the following exception is thrown Running 2.2 (apparently a pre-release version)
CODE:...............
View 5 Replies
View Related
Jun 8, 2010
How do I fix a bug that doesn't point to any of my code? I got the stack trace below from the Marketplace crash reports, but I have no clue how to fix it since it points to none of my own code.
java.lang.NullPointerException:at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:487)at android.view.View.measure(View.java:7964)at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3023) at android.widget.FrameLayout.onMeasure(FrameLayout.java:245)at android.view.View.measure(View.java:7964)at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3023)at android.widget.FrameLayout.onMeasure(FrameLayout.java:245)at android.view.View.measure(View.java:7964)at android.view.ViewRoot.performTraversals(ViewRoot.java:763)at android.view.ViewRoot.handleMessage(ViewRoot.java:1633)at android.os.Handler.dispatchMessage(Handler.java:99)at android.os.Looper.loop(Looper.java:123) at android.app.ActivityThread.main(ActivityThread.java:4363)at java.lang.reflect.Method.invokeNative(Method.java:-2)at java.lang.reflect.Method.invoke(Method.java:521)at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)at dalvik.system.NativeStart.main(NativeStart.java:-2)
I'm not seeing any issues on any emulators or devices.
View 4 Replies
View Related
Jul 4, 2009
I'm moving a project to the new Android Native Development Kit (i.e. JNI) and I'd like to catch SIGSEGV, should it occur (possibly also SIGILL, SIGABRT, SIGFPE) in order to present a nice crash reporting dialog, instead of (or before) what currently happens: the immediate unceremonious death of the process and possibly some attempt by the OS to restart it. (Edit: The JVM/Dalvik VM catches the signal and logs a stack trace and other useful information; I just want to offer the user the option to email that info to me really.)
The situation is: a large body of C code which I didn't write does most of the work in this application (all the game logic) and although it's well-tested on numerous other platforms, it's entirely possible that I, in my Android port, will feed it garbage and cause a crash in native code, so I want the crash dumps (both native and Java) that currently show up in the Android log (I guess it would be stderr in a non-Android situation). I'm free to modify both C and Java code arbitrarily, although the callbacks (both going in and coming out of JNI) number about 40 and obviously, bonus points for small diffs.
I've heard of the signal chaining library in J2SE, libjsig.so, and if I could safely install a signal handler like that on Android, that would solve the catching part of my question, but I see no such library for Android/Dalvik.
View 3 Replies
View Related
Aug 6, 2010
I am accessing a URL that's redirecting me to a URL with spaces in it. (Using HttpClient 4.x) How do I prevent this from throwing an error (replacing the spaces with %20 not +)
CODE:..................
View 3 Replies
View Related
Apr 23, 2010
I tried using the MapActivity as given in the following link. http://developer.android.com/guide/tutorials/views/hello-mapview.HTML
I get the error in LogCat : DalvikVm: unable to open stack trace file android '/data/anr/traces.txt' Permission Denied. May I know why this happens. However, after making some changes in the code as shown below, I get the map view perfectly.code...
View 2 Replies
View Related
Apr 6, 2010
I created a TextView and put an url to it, using setText(Html.fromHtml("");. Its opening the web page in the built-in browser and when I press back, its coming back to the application.
I don't want to come back to the application, so in activity's onResume(), I call finish(). Its exiting at the first time. But when I open the application again, its throwing some exception.
Any other way to close the application, other than this way.
View 2 Replies
View Related
Aug 27, 2010
I'm having trouble with a spiner throwing a nullPointerExpression I'm sure I'm missing something stupid? Code...
View 2 Replies
View Related
Aug 17, 2010
Got a trace like this:
java.lang.StackOverflowError
at android.widget.TextView.onMeasure(TextView.java:5160)
at android.view.View.measure(View.java:8172)
at android.widget.TableRow.getColumnsWidths(TableRow.java:308)
at android.widget.TableLayout.findLargestCells(TableLayout.java:497)
at android.widget.TableLayout.measureVertical(TableLayout.java:462)
at android.widget.TableLayout.onMeasure(TableLayout.java:428)
at android.view.View.measure(View.java:8172)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3140)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1012)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:381)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:304)
at android.view.View.measure(View.java:8172)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3140)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1012)
at android.widget.LinearLayout.measureHorizontal(LinearLayout.java:696)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:306)
at android.view.View.measure(View.java:8172)
at android.widget.ListView.measureScrapChild(ListView.java:1135)
at android.widget.ListView.measureHeightOfChildren(ListView.java:1200)
at android.widget.ListView.onMeasure(ListView.java:1109)
at android.view.View.measure(View.java:8172)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3140)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1012)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:381)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:304)
at android.view.View.measure(View.java:8172)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3140)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:245)
at android.view.View.measure(View.java:8172)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:526)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:304)
at android.view.View.measure(View.java:8172)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3140)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:245)
at android.view.View.measure(View.java:8172)
at android.view.ViewRoot.performTraversals(ViewRoot.java:805)
at android.view.ViewRoot.handleMessage(ViewRoot.java:1744)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:144)
at android.app.ActivityThread.main(ActivityThread.java:4937)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
at dalvik.system.NativeStart.main(Native Method) Is there anything that can be done here? I'm getting reports of blank screens and force closes.
View 1 Replies
View Related
Apr 29, 2010
Is there a way to achieve the following in Android?
1. generate a Java stack trace in Android. In J2SE, we use to use something like this - send a signal to the Java Virtual Machine; the Java Virtual Machine generates a stack trace for you; or we can also use debugging tools or Java API calls.
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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
View 4 Replies
View Related
Jan 25, 2010
I have added this line in my androidManifest.xml <uses-permission android:name="android.permission.INJECT_EVENT"/>
I am trying to execute following code:
CODE:........
Both above lines are throwing exception W/System.err(762): java.lang.SecurityException: Injecting to another application requires INJECT_EVENT permission.
Do we need anything else too to get it working ?
View 4 Replies
View Related
Feb 12, 2009
Here my application "com.android.hello" calls a core library "libvt.so" through JNI call. There is a segmentation fault in "libvt.so". When executed I get the following log What I see is some Hex value followed by a library name. #00 pc afe0d24c /system/lib/libc.so
Also there is a Stack section 01-01 00:02:57.800: INFO/DEBUG(1600): stack: 01-01 00:02:57.800: INFO/DEBUG(1600):bef2e570 bef2e604 [stack] 01-01 00:02:57.810: INFO/DEBUG(1600):bef2e574 afe0a333 /system/ lib/libc.so
This too gives similar information. I am looking for little more informations rather than Hex values. Like the backtrace feature where the stack hex values is mapped to the function names and function names are visible.
Please provide information how to see the function names in stack rather than Hex values. Is ther any compiler options needs to be updated? Any makefile to be updated to enable backtrace?
View 7 Replies
View Related
Apr 11, 2010
My android app is getting an "Out of memory" error without a useful stack trace. It occurs after I have repeatedly re-invoked its main logic through a menu interaction, which leads me to believe that there's a memory leak somewhere.
I say that the stack trace isn't useful because it doesn't include references to any of my own code. There are no references to my own code in the logcat output, either.
I'm wondering if any of you can help me figure out where my memory leak might be occurring, given my stack trace and my logcat output.
Here's the stack trace: Code...
Could my error be related to the "Window already focused ..." warnings? If so, how can I find out what is causing these? I know that I could sprinkle my code with lots of calls to Log.v() in order to zero in on where my problem might be occurring, but I'm wondering if there is a better way to get more meaningful information about the cause of my memory leak.
View 5 Replies
View Related
Dec 16, 2009
I tried to create the launcher widget for getting some messages from social networking server. I hope it can support autoLink feature of these message content. however, it will have the "Stack Overflow exception" when android:autoLink="web|email" is enabled when getting more than 20 messages. this issue doesn't happened when I remove this parameter. would you please share your experience about this issue?
View 2 Replies
View Related
Sep 25, 2009
is there a way in android to get the call stack when an unhandled exception occurs? or better yet, to trap an unhandled exception and do something when it occurs.
View 3 Replies
View Related
May 25, 2010
My logcat window in Eclipse only displays the first few lines of the Stack Trace for each exception. This means that I often can't see where an exception occurred. Is there any way to change this setting?
View 1 Replies
View Related
Oct 7, 2010
I have a ListView that I'm binding to an adapter. The adapter is a protected member of my main class. I have a listener thread that receives data and updates the source list for my adapter. When I call the adapter's notifyDataSetChanged() method, an exception is thrown:
Runtime Exception: PhoneLayoutInflater(LayoutInflater).inflate(int, ViewGroup, boolean) line: 322
I've read that the notifyDataSetChanged() method has to be called on the UI thread, and I'm doing that. In fact, just to be sure, I even update the ListView's data source on the UI thread. All I do in my listener thread is update a protected member that houses the data. Here's an example of what I'm doing (note that I don't have the part of the code that calls the AsyncTask, but it's fired from a listener):
CODE:............
Does anyone have any pointers or ideas as to why I'm getting this exception? Any help is much appreciated.
Here are the layout files, as requested:
main.xml:
CODE:....................
row.xml:
CODE:...............................
View 1 Replies
View Related
Mar 18, 2010
I am creating an application which tracks the users location using GPS, stores the longitude and latitude in a database using a content provider then output the first long and lat to a mapview. I am able to create the cursor using this line of code...
View 1 Replies
View Related
May 26, 2009
What's the most efficient way to clone a JSONArray?
View 2 Replies
View Related
Feb 26, 2014
I get this error message whenever I try to connect to my sql database:
JSONArray cannot be converted to JSONObject
Getting the data from the database works fine, but when i try to get the data of he user who is logged in i get the above error.
[HIGH]
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {[code].....
View 1 Replies
View Related
Jul 14, 2010
I created a sql lite database with the following columns:
static final String dbName="demoDB";
static final String tableName="Employees";
static final String colID="EmployeeID";
public void onCreate(SQLiteDatabase db) {
// TODO Auto-generated method stub
db.execSQL("CREATE TABLE "+tableName+" ("+colID+" INTEGER PRIMARY KEY AUTOINCREMENT, "+
colName+" TEXT, "+colAge+" Integer);");
I want to select all the records in the database like this and display them in a gridview:SQLiteDatabase db=this.getWritableDatabase();Cursor cur= db.rawQuery("Select "+colName+", "+colAge+" from "+tableName, new String [] {});String [] from=new String []{DatabaseHelper.colName,DatabaseHelper.colAge};
int [] to=new int [] {R.id.colName,R.id.colAge};
SimpleCursorAdapter sca=new SimpleCursorAdapter(this,R.layout.gridrow,c,from,to);
GridView grid=(GridView)findViewById(R.id.grid);
grid.setAdapter(sca);but i receive the following exception:java.lang.IllegalArgumentException: column '_id' does not exist.the db table does not have a column with name '_id'so what is wrong with this code
View 3 Replies
View Related
Sep 15, 2010
I want to simulate a KEY_UP press on my phone.. but pragmatically can someone tell me the code of a function that can do this? i found some functions searching on www.google.com but all of them are obsolete.
View 2 Replies
View Related
Sep 10, 2010
I'm trying to implement a custom MapView. Inside my MapActivity (named mainmap) I have an inner class which extends MapView:
CODE:........
I have my main.xml formatted to find the inner class like so:
CODE:................
Also, in Androidmanifest.xml, I have the appropriate <uses-library android:name="com.google.android.maps"/> entry.
When I try to run my app, I get (amongst other things) in logcat:
CODE:..............
This is caused by this entry I find in logcat:
CODE:...............
If I understand correctly, my app is crashing because Android is saying it doesn't find the appropriate constructor for my custom MapView (the Lmapview class). As you can see above, however, it is defined and it matches the signature it is looking for.
View 1 Replies
View Related
Oct 9, 2010
This code works fine if I move the findViewById call in to the Activity. Any hints as to why it doesn't work from inside the LearningView class? I've tried moving the TextView inside the com.example.LearningView tag but no joy. I'd prefer to get the TextView from within the SurfaceView subclass as I feel it's more logical to treat the TV as a "child" of the SV.
This is a contrived example I wrote to figure out the problem in a larger application, but the gist of it is the same, and the stack trace is basically the same.
For what it is worth, the findViewById call is returning null, which obviously threw NullPointerExceptions in some attempts to fix this.
As you can probably gather from my attempts I'm flying blind on this one.
Learning.java:
CODE:..........
main.xml:
CODE:..............
Stack trace:
CODE:......................
View 1 Replies
View Related
Sep 12, 2009
I turned on DEBUG_CHECK_GL_ERROR for my GLSurfaceView to try to figure out why I'm having a problem on pause/ resume/reload everything, and when I turned it on, I got an UnsupportedOperationException when calling GL11.glGenBuffers() (for creating Vertex Buffer Objects).
Why is it saying that operation is unsupported when:
1) The vertex_buffer_object extension is listed on the target device and my code checks for it before trying to use VBOs.
2) VBOs are working correctly (and really well might I add).
This is on a G1. Yes, I know the G1 is only OpenGL ES 1.0 compliant and I'm trying to use a 1.1 extension, but if the phone lists the extension, doesn't that mean I can use it? Also - the extension works! Does this mean that it works but use-at-your-own-risk, kinda like how SoundPool was in Android 1.0?
View 2 Replies
View Related