get database called recursively error only on HTC Sensation XL - android

I'm working on a application where the database is imported like in this tutorial: http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/
This works fine on most devices,only at HTC Sensation XL it doesn't work.
Thanks for your Help
Here is error code
11-02 21:35:33.748: W/System.err(14878): java.lang.IllegalStateException: getReadableDatabase called recursively
11-02 21:35:33.748: W/System.err(14878): at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:245)
11-02 21:35:33.748: W/System.err(14878): at at.klettern.database.DatabaseHelper.createDataBase(DatabaseHelper.java:54)
11-02 21:35:33.748: W/System.err(14878): at at.klettern.database.DatabaseHelper.onCreate(DatabaseHelper.java:148)
11-02 21:35:33.758: W/System.err(14878): at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:183)
11-02 21:35:33.758: W/System.err(14878): at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:249)
11-02 21:35:33.758: W/System.err(14878): at at.klettern.database.DatabaseRouten.(DatabaseRouten.java:39)
11-02 21:35:33.758: W/System.err(14878): at at.klettern.wachauclimbing.SplashActivity.onCreate(SplashActivity.java:28)
11-02 21:35:33.758: W/System.err(14878): at android.app.Activity.performCreate(Activity.java:4531)
11-02 21:35:33.768: W/System.err(14878): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1071)
11-02 21:35:33.768: W/System.err(14878): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2150)
11-02 21:35:33.768: W/System.err(14878): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2229)
11-02 21:35:33.768: W/System.err(14878): at android.app.ActivityThread.access$600(ActivityThread.java:139)
11-02 21:35:33.768: W/System.err(14878): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1261)
11-02 21:35:33.778: W/System.err(14878): at android.os.Handler.dispatchMessage(Handler.java:99)
11-02 21:35:33.778: W/System.err(14878): at android.os.Looper.loop(Looper.java:154)
11-02 21:35:33.778: W/System.err(14878): at android.app.ActivityThread.main(ActivityThread.java:4945)
11-02 21:35:33.778: W/System.err(14878): at java.lang.reflect.Method.invokeNative(Native Method)
11-02 21:35:33.778: W/System.err(14878): at java.lang.reflect.Method.invoke(Method.java:511)
11-02 21:35:33.788: W/System.err(14878): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
11-02 21:35:33.788: W/System.err(14878): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
11-02 21:35:33.788: W/System.err(14878): at dalvik.system.NativeStart.main(Native Method)

What android version are running on this device? [I found some fatal errors Android 2.1 or less.]
Otherwise, I have been able to cannibalize most if not all of the tutorial you reference and it works flawlessly from 2.2 and up.

Related

setDropDownBackgroundResource not working in marshmallows android

i have try to set the dropdown color for the autocomplete text view it works fine in all other api but when ever i run it with the nexus 5 marshmallows i got the following error
my log cat is
11-02 17:36:23.815 29058-29058/test.text.com E/AndroidRuntime: FATAL EXCEPTION: main
11-02 17:36:23.815 29058-29058/test.text.com E/AndroidRuntime: Process: test.text.com, PID: 29058
11-02 17:36:23.815 29058-29058/test.text.com E/AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'android.graphics.drawable.Drawable android.support.v7.internal.widget.TintManager.getDrawable(int)' on a null object reference
11-02 17:36:23.815 29058-29058/test.text.com E/AndroidRuntime: at android.support.v7.widget.AppCompatAutoCompleteTextView.setDropDownBackgroundResource(AppCompatAutoCompleteTextView.java:96)
11-02 17:36:23.815 29058-29058/test.text.com E/AndroidRuntime: at test.text.com.activity.CreateRideActivity.onWindowFocusChanged(CreateRideActivity.java:369)
11-02 17:36:23.815 29058-29058/test.text.com E/AndroidRuntime: at android.support.v7.internal.view.WindowCallbackWrapper.onWindowFocusChanged(WindowCallbackWrapper.java:114)
11-02 17:36:23.815 29058-29058/test.text.com E/AndroidRuntime: at android.support.v7.internal.view.WindowCallbackWrapper.onWindowFocusChanged(WindowCallbackWrapper.java:114)
11-02 17:36:23.815 29058-29058/test.text.com E/AndroidRuntime: at com.android.internal.policy.PhoneWindow$DecorView.onWindowFocusChanged(PhoneWindow.java:3237)
11-02 17:36:23.815 29058-29058/test.text.com E/AndroidRuntime: at android.view.View.dispatchWindowFocusChanged(View.java:9528)
11-02 17:36:23.815 29058-29058/test.text.com E/AndroidRuntime: at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1200)
11-02 17:36:23.815 29058-29058/test.text.com E/AndroidRuntime: at android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:3378)
11-02 17:36:23.815 29058-29058/test.text.com E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
11-02 17:36:23.815 29058-29058/test.text.com E/AndroidRuntime: at android.os.Looper.loop(Looper.java:148)
11-02 17:36:23.815 29058-29058/test.text.com E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5417)
11-02 17:36:23.815 29058-29058/test.text.com E/AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
11-02 17:36:23.815 29058-29058/test.text.com E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
11-02 17:36:23.815 29058-29058/test.text.com E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
My code is
AutoSuggestView.setDropDownBackgroundResource(R.drawable.bg_rectangle_white_curve_border_right);
Try to update your appcompat libraries. In the current (23.1.1) version of appcompat-v7 the code in AppCompatAutoCompleteTextView was changed to resolve this like so
public void setDropDownBackgroundResource(#DrawableRes int resId) {
if (mTintManager != null) {
setDropDownBackgroundDrawable(mTintManager.getDrawable(resId));
} else {
super.setDropDownBackgroundResource(resId);
}
}

Error Loading Static Fragment and a FrameLayout (

I'm trying to load layout with a static fragment and a LinearLayout using this Layout:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="horizontal" android:layout_width="match_parent"
android:layout_height="match_parent"
android:baselineAligned="false"
android:divider="?android:attr/dividerHorizontal"
tools:context="com.eldad.yossi.popularmovs.MainActivity">
<fragment
android:id="#+id/main_fragment"
android:name="com.eldad.yossi.popularmovs.MainActivityFragment"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
tools:layout="#android:layout/list_content" />
<FrameLayout
android:id="#+id/movies_detail_container"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="4" />
</LinearLayout>
But when the app is launched I get this error:
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: FATAL EXCEPTION: ModernAsyncTask #2
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: Process: com.eldad.yossi.popularmovs, PID: 13809
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: java.lang.RuntimeException: An error occurred while executing doInBackground()
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: at android.support.v4.content.ModernAsyncTask$3.done(ModernAsyncTask.java:142)
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: at java.util.concurrent.FutureTask.run(FutureTask.java:242)
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: at java.lang.Thread.run(Thread.java:818)
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.net.Uri.getScheme()' on a null object reference
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1437)
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: at android.content.ContentResolver.query(ContentResolver.java:462)
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: at android.support.v4.content.ContentResolverCompatJellybean.query(ContentResolverCompatJellybean.java:29)
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: at android.support.v4.content.ContentResolverCompat$ContentResolverCompatImplJB.query(ContentResolverCompat.java:57)
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: at android.support.v4.content.ContentResolverCompat.query(ContentResolverCompat.java:125)
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: at android.support.v4.content.CursorLoader.loadInBackground(CursorLoader.java:59)
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: at android.support.v4.content.CursorLoader.loadInBackground(CursorLoader.java:37)
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: at android.support.v4.content.AsyncTaskLoader.onLoadInBackground(AsyncTaskLoader.java:296)
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: at android.support.v4.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:54)
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: at android.support.v4.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:42)
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: at android.support.v4.content.ModernAsyncTask$2.call(ModernAsyncTask.java:128)
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: at java.util.concurrent.FutureTask.run(FutureTask.java:237)
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: at java.lang.Thread.run(Thread.java:818) 
The same Activity and fragments work when I'm loading them using a layout that contain only the fragment.
any ideas?
The full code is in a GitHub repo - https://github.com/yossildad/PopularMovs
Thanks.
From the stack trace I could see you are trying to get an URI from a null reference in the doInBackground() method in activity com.eldad.yossi.popularmovs.MainActivity .
Ok, I've found the bug. I was using a not initialized uri when creating the Loader
inside the fragment.
Thanks for your help and sorry for the trouble.
Your problem is not in the fragment declaration. According to the stacktrace, look into the doInBackground method of your ModernASyncTask which you are extends on.
java.lang.RuntimeException: An error occurred while executing doInBackground() - probably you may have null reference on a context object, i guess.

After opening PDF with intent, app crashes with NullPointerException

I have a app that shows a ListView with several documents (DOC, PDF, PPT...). Selection one of them, I use the following code to show the document:
Intent intent = new Intent(android.content.Intent.ACTION_VIEW);
String extension = android.webkit.MimeTypeMap.getFileExtensionFromUrl(Uri.fromFile(outFile).toString());
String mimetype = android.webkit.MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension);
if (extension.equalsIgnoreCase("") || mimetype == null) {
intent.setDataAndType(Uri.fromFile(outFile), "text/*");
} else {
intent.setDataAndType(Uri.fromFile(outFile), mimetype);
}
startActivity(Intent.createChooser(intent, "Choose an Application:"));
That works fine for the the first document selected, Polaris Office opens and show the document - fine. When switching back for selecting the next document, my application is not on the last screen shown, instead it starts again. Selecting the document works and open fine in Polaris. When now switching back, the app crashes with Unable to start activity ...MainActivity ... NullPointerExpetion.
What can I do to solve this problem?
Here the LogCat:
10-25 10:07:43.476: D/AndroidRuntime(8396): Shutting down VM
10-25 10:07:43.476: W/dalvikvm(8396): threadid=1: thread exiting with uncaught exception (group=0x415092a0)
10-25 10:07:43.507: E/AndroidRuntime(8396): FATAL EXCEPTION: main
10-25 10:07:43.507: E/AndroidRuntime(8396): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.astrex.ppastrex/com.astrex.ppastrex.MainActivity}: java.lang.NullPointerException
10-25 10:07:43.507: E/AndroidRuntime(8396): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2097)
10-25 10:07:43.507: E/AndroidRuntime(8396): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2122)
10-25 10:07:43.507: E/AndroidRuntime(8396): at android.app.ActivityThread.access$600(ActivityThread.java:140)
10-25 10:07:43.507: E/AndroidRuntime(8396): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1228)
10-25 10:07:43.507: E/AndroidRuntime(8396): at android.os.Handler.dispatchMessage(Handler.java:99)
10-25 10:07:43.507: E/AndroidRuntime(8396): at android.os.Looper.loop(Looper.java:137)
10-25 10:07:43.507: E/AndroidRuntime(8396): at android.app.ActivityThread.main(ActivityThread.java:4895)
10-25 10:07:43.507: E/AndroidRuntime(8396): at java.lang.reflect.Method.invokeNative(Native Method)
10-25 10:07:43.507: E/AndroidRuntime(8396): at java.lang.reflect.Method.invoke(Method.java:511)
10-25 10:07:43.507: E/AndroidRuntime(8396): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:994)
10-25 10:07:43.507: E/AndroidRuntime(8396): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:761)
10-25 10:07:43.507: E/AndroidRuntime(8396): at dalvik.system.NativeStart.main(Native Method)
10-25 10:07:43.507: E/AndroidRuntime(8396): Caused by: java.lang.NullPointerException
10-25 10:07:43.507: E/AndroidRuntime(8396): at com.astrex.ppastrex.FrameDocumentos.onCreateView(FrameDocumentos.java:66)
10-25 10:07:43.507: E/AndroidRuntime(8396): at android.support.v4.app.Fragment.performCreateView(Fragment.java:1478)
10-25 10:07:43.507: E/AndroidRuntime(8396): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:927)
10-25 10:07:43.507: E/AndroidRuntime(8396): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1104)
10-25 10:07:43.507: E/AndroidRuntime(8396): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1086)
10-25 10:07:43.507: E/AndroidRuntime(8396): at android.support.v4.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:1877)
10-25 10:07:43.507: E/AndroidRuntime(8396): at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:552)
10-25 10:07:43.507: E/AndroidRuntime(8396): at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1178)
10-25 10:07:43.507: E/AndroidRuntime(8396): at android.app.Activity.performStart(Activity.java:5173)
10-25 10:07:43.507: E/AndroidRuntime(8396): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2070)
10-25 10:07:43.507: E/AndroidRuntime(8396): ... 11 more
I had a similar issue happening for me on Android 6.0, but not in 4.4, so for older devices, it would work fine and there would be no crash.
In my case, I was downloading a url, saving the file and opening them in 3rd party viewers.
I've discovered that as long as I save the pdf to the Downloads Directory, it fixes it for my situation.
File root = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);
File dir = new File(root.getAbsolutePath());
if (dir.exists() == false) {
dir.mkdirs();
}
String fileName = "filename.pdf";
file = new File(dir, fileName);
try like this:
File file = new File(pdfpath);
if (file.exists()) {
Uri path = Uri.fromFile(file);
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(path, "application/pdf");
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
try {
startActivity(intent);
finish();
}
catch (ActivityNotFoundException e) {
}
}
The intent looks like it was called correctly it works for some. Seems like you'd have a null reference without checking if the file exists.
Experience tells me the null comes because your device ran out of memory while opening the pdf file so your app was shut down to free up some memory.
The solution is to add the savedinstancestate method saving what your app needs and check if the savedinstancestate != null in your oncreate method then recreate what your app needs from the savedinstancestate.

Upload Video with Android Intent Crashes

I have an app that creates a video in WebM format. I want to use an Android intent to send this video to Youtube, facebook, etc.
I have code that creates an intent and starts a chooser where I can pick where to upload to, after selecting the destination and filling in the form with title etc. I hit the Upload button and the app I am trying to upload with crashes immediately.
Here is my relevant code:
Uri videoURI = Uri.fromFile(new File( pathName + fileName));
Intent intent = new Intent(Intent.ACTION_SEND);
//intent.setAction(Intent.ACTION_SEND);
intent.setType("video/webm");
intent.putExtra(Intent.EXTRA_STREAM, videoURI);
try {
startActivity(Intent.createChooser(intent,"Upload video via:"));
} catch (android.content.ActivityNotFoundException ex) {
Log.e("MWR", "No Way to Share!");
}
pathName + fileName is the absolute path of the video on the SD card.
Here is the relevant log info for a Youtube Crash
11-02 13:42:43.949: WARN/dalvikvm(4443): threadid=10: thread exiting with uncaught exception (group=0x40018560)
11-02 13:42:43.949: ERROR/AndroidRuntime(4443): FATAL EXCEPTION: Thread-12
11-02 13:42:43.949: ERROR/AndroidRuntime(4443): java.lang.NullPointerException
11-02 13:42:43.949: ERROR/AndroidRuntime(4443): at java.util.Calendar.setTime(Calendar.java:1325)
11-02 13:42:43.949: ERROR/AndroidRuntime(4443): at java.text.SimpleDateFormat.formatImpl(SimpleDateFormat.java:536)
11-02 13:42:43.949: ERROR/AndroidRuntime(4443): at java.text.SimpleDateFormat.format(SimpleDateFormat.java:818)
11-02 13:42:43.949: ERROR/AndroidRuntime(4443): at java.text.DateFormat.format(DateFormat.java:376)
11-02 13:42:43.949: ERROR/AndroidRuntime(4443): at com.google.android.apps.uploader.clients.youtube.YouTubeSettingsActivity.a(SourceFile:183)
11-02 13:42:43.949: ERROR/AndroidRuntime(4443): at com.google.android.apps.uploader.clients.SettingsActivity.b(SourceFile:43)
11-02 13:42:43.949: ERROR/AndroidRuntime(4443): at com.google.android.apps.uploader.clients.j.run(SourceFile:348)
11-02 13:42:43.949: ERROR/AndroidRuntime(4443): at java.lang.Thread.run(Thread.java:1019)
11-02 13:42:43.956: WARN/ActivityManager(2494): Force finishing activity com.google.android.apps.uploader/.clients.youtube.YouTubeSettingsActivity
11-02 13:42:44.261: ERROR/WindowManager(4443): Activity com.google.android.apps.uploader.clients.youtube.YouTubeSettingsActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView#40553f20 that was originally added here
11-02 13:42:44.261: ERROR/WindowManager(4443): android.view.WindowLeaked: Activity com.google.android.apps.uploader.clients.youtube.YouTubeSettingsActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView#40553f20 that was originally added here
11-02 13:42:44.261: ERROR/WindowManager(4443): at android.view.ViewRoot.<init>(ViewRoot.java:258)
11-02 13:42:44.261: ERROR/WindowManager(4443): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:148)
11-02 13:42:44.261: ERROR/WindowManager(4443): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
11-02 13:42:44.261: ERROR/WindowManager(4443): at android.view.Window$LocalWindowManager.addView(Window.java:424)
11-02 13:42:44.261: ERROR/WindowManager(4443): at android.app.Dialog.show(Dialog.java:241)
11-02 13:42:44.261: ERROR/WindowManager(4443): at com.google.android.apps.uploader.clients.SettingsActivity.b(SourceFile:43)
11-02 13:42:44.261: ERROR/WindowManager(4443): at com.google.android.apps.uploader.clients.c.onClick(SourceFile:122)
11-02 13:42:44.261: ERROR/WindowManager(4443): at android.view.View.performClick(View.java:2485)
11-02 13:42:44.261: ERROR/WindowManager(4443): at android.view.View$PerformClick.run(View.java:9089)
11-02 13:42:44.261: ERROR/WindowManager(4443): at android.os.Handler.handleCallback(Handler.java:587)
11-02 13:42:44.261: ERROR/WindowManager(4443): at android.os.Handler.dispatchMessage(Handler.java:92)
11-02 13:42:44.261: ERROR/WindowManager(4443): at android.os.Looper.loop(Looper.java:123)
11-02 13:42:44.261: ERROR/WindowManager(4443): at android.app.ActivityThread.main(ActivityThread.java:3806)
11-02 13:42:44.261: ERROR/WindowManager(4443): at java.lang.reflect.Method.invokeNative(Native Method)
11-02 13:42:44.261: ERROR/WindowManager(4443): at java.lang.reflect.Method.invoke(Method.java:507)
11-02 13:42:44.261: ERROR/WindowManager(4443): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
11-02 13:42:44.261: ERROR/WindowManager(4443): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
11-02 13:42:44.261: ERROR/WindowManager(4443): at dalvik.system.NativeStart.main(Native Method)
And here is the relevant log for a Facebook crash:
11-02 13:57:40.476: ERROR/AndroidRuntime(4497): FATAL EXCEPTION: main
11-02 13:57:40.476: ERROR/AndroidRuntime(4497): java.lang.RuntimeException: Unable to start service com.facebook.katana.service.FacebookService#4068d4f8 with Intent { cmp=com.facebook.katana/.service.FacebookService (has extras) }: java.lang.NullPointerException
11-02 13:57:40.476: ERROR/AndroidRuntime(4497): at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2128)
11-02 13:57:40.476: ERROR/AndroidRuntime(4497): at android.app.ActivityThread.access$2800(ActivityThread.java:124)
11-02 13:57:40.476: ERROR/AndroidRuntime(4497): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1031)
11-02 13:57:40.476: ERROR/AndroidRuntime(4497): at android.os.Handler.dispatchMessage(Handler.java:99)
11-02 13:57:40.476: ERROR/AndroidRuntime(4497): at android.os.Looper.loop(Looper.java:123)
11-02 13:57:40.476: ERROR/AndroidRuntime(4497): at android.app.ActivityThread.main(ActivityThread.java:3806)
11-02 13:57:40.476: ERROR/AndroidRuntime(4497): at java.lang.reflect.Method.invokeNative(Native Method)
11-02 13:57:40.476: ERROR/AndroidRuntime(4497): at java.lang.reflect.Method.invoke(Method.java:507)
11-02 13:57:40.476: ERROR/AndroidRuntime(4497): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
11-02 13:57:40.476: ERROR/AndroidRuntime(4497): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
11-02 13:57:40.476: ERROR/AndroidRuntime(4497): at dalvik.system.NativeStart.main(Native Method)
11-02 13:57:40.476: ERROR/AndroidRuntime(4497): Caused by: java.lang.NullPointerException
11-02 13:57:40.476: ERROR/AndroidRuntime(4497): at com.facebook.katana.service.method.VideoUpload.getRealPathFromURI(VideoUpload.java:127)
11-02 13:57:40.476: ERROR/AndroidRuntime(4497): at com.facebook.katana.service.method.VideoUpload.start(VideoUpload.java:148)
11-02 13:57:40.476: ERROR/AndroidRuntime(4497): at com.facebook.katana.service.FacebookService.startOp(FacebookService.java:1250)
11-02 13:57:40.476: ERROR/AndroidRuntime(4497): at com.facebook.katana.service.FacebookService.onStart(FacebookService.java:742)
11-02 13:57:40.476: ERROR/AndroidRuntime(4497): at android.app.Service.onStartCommand(Service.java:428)
11-02 13:57:40.476: ERROR/AndroidRuntime(4497): at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2115)
11-02 13:57:40.476: ERROR/AndroidRuntime(4497): ... 10 more
So, an update:
The URI was preventing it from starting the process.
I found another post on how to create a URI with ContentResolver and this fixed the issue.
However, it doesn't get past 0% and says my video is 0 Bytes but I believe this may be an issue with my video creation.

Thread runtime exception

synchronized (this.childrenGroupsLock) {
for (int i = 0; i < numGroups; i++) {
suspendCurrent |= this.childrenGroups[i].suspendHelper();
}
}
return suspendCurrent;
This is the thread that force closes my application(any android application). I dunno how to handle it.
Can anyone please help me?
The application just force closes after it reaches this point.
05-12 10:22:28.582: ERROR/AndroidRuntime(352): FATAL EXCEPTION: main
05-12 10:22:28.582: ERROR/AndroidRuntime(352): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.android/com.android.GraphicsActivity}: java.lang.IllegalAccessException: access to class not allowed
05-12 10:22:28.582: ERROR/AndroidRuntime(352): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1544)
05-12 10:22:28.582: ERROR/AndroidRuntime(352): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1638)
05-12 10:22:28.582: ERROR/AndroidRuntime(352): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
05-12 10:22:28.582: ERROR/AndroidRuntime(352): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:928)
05-12 10:22:28.582: ERROR/AndroidRuntime(352): at android.os.Handler.dispatchMessage(Handler.java:99)
05-12 10:22:28.582: ERROR/AndroidRuntime(352): at android.os.Looper.loop(Looper.java:123)
05-12 10:22:28.582: ERROR/AndroidRuntime(352): at android.app.ActivityThread.main(ActivityThread.java:3647)
05-12 10:22:28.582: ERROR/AndroidRuntime(352): at java.lang.reflect.Method.invokeNative(Native Method)
05-12 10:22:28.582: ERROR/AndroidRuntime(352): at java.lang.reflect.Method.invoke(Method.java:507)
05-12 10:22:28.582: ERROR/AndroidRuntime(352): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
05-12 10:22:28.582: ERROR/AndroidRuntime(352): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
05-12 10:22:28.582: ERROR/AndroidRuntime(352): at dalvik.system.NativeStart.main(Native Method)
05-12 10:22:28.582: ERROR/AndroidRuntime(352): Caused by: java.lang.IllegalAccessException: access to class not allowed
05-12 10:22:28.582: ERROR/AndroidRuntime(352): at java.lang.Class.newInstanceImpl(Native Method)
05-12 10:22:28.582: ERROR/AndroidRuntime(352): at java.lang.Class.newInstance(Class.java:1409)
05-12 10:22:28.582: ERROR/AndroidRuntime(352): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
05-12 10:22:28.582: ERROR/AndroidRuntime(352): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1536)
This is the error I am getting in the LogCat

Categories

Resources