are you sure that's even from your app and not something else... kris
On Mon, Jul 23, 2012 at 10:38 AM, Zoltán Páll <[email protected]> wrote: > Oh, the permission denied is just a warning. My app crashes because of > something else. What's this permission denied then? > > Z. > > > On Monday, July 23, 2012 4:37:24 PM UTC+2, Zoltán Páll wrote: >> >> Thanks Mark, >> >> How would you proceed then with this logcat output (if you don't mind >> helping me a little more) >> >> 07-23 16:32:05.732: E/AndroidRuntime(13008): Uncaught handler: thread main >> exiting due to uncaught exception >> 07-23 16:32:05.832: W/System.err(13008): java.io.IOException: Permission >> denied >> 07-23 16:32:05.882: E/AndroidRuntime(13008): FATAL EXCEPTION: main >> 07-23 16:32:05.882: E/AndroidRuntime(13008): >> java.lang.NullPointerException >> 07-23 16:32:05.882: E/AndroidRuntime(13008): at >> com.pallzoltan.MainActivity.onPreviewFrame(MainActivity.java:122) >> 07-23 16:32:05.882: E/AndroidRuntime(13008): at >> android.hardware.Camera$EventHandler.handleMessage(Camera.java:547) >> 07-23 16:32:05.882: E/AndroidRuntime(13008): at >> android.os.Handler.dispatchMessage(Handler.java:99) >> 07-23 16:32:05.882: E/AndroidRuntime(13008): at >> android.os.Looper.loop(Looper.java:130) >> 07-23 16:32:05.882: E/AndroidRuntime(13008): at >> android.app.ActivityThread.main(ActivityThread.java:3683) >> 07-23 16:32:05.882: E/AndroidRuntime(13008): at >> java.lang.reflect.Method.invokeNative(Native Method) >> 07-23 16:32:05.882: E/AndroidRuntime(13008): at >> java.lang.reflect.Method.invoke(Method.java:507) >> 07-23 16:32:05.882: E/AndroidRuntime(13008): at >> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:895) >> 07-23 16:32:05.882: E/AndroidRuntime(13008): at >> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:653) >> 07-23 16:32:05.882: E/AndroidRuntime(13008): at >> dalvik.system.NativeStart.main(Native Method) >> >> Line 122 is the highlighted one >> >> b.setPixels(rgba, 0, mCameraWidth, 0, 0, mCameraWidth, mCameraHeight); >> >> Canvas c = new Canvas(b); >> >> mImageView.draw(c); >> >> >> Thanks, >> >> Z. >> >> >> On Monday, July 23, 2012 3:38:26 PM UTC+2, Mark Murphy (a Commons Guy) >> wrote: >>> >>> On Mon, Jul 23, 2012 at 9:04 AM, Zoltán Páll wrote: >>> > 1) When running an app from Eclipse, the app might crash. Eclipse shows >>> > me a >>> > stack trace (Debug panel) but it all looks like native Android >>> > functions, >>> > which I have nothing to do with, so after playing around with Eclipse, >>> > I >>> > found that if i step over the stops, LogCat will spit out a partial >>> > stack >>> > trace. Is this the proper way of finding the faulty line of code? How >>> > do you >>> > guys handle this? >>> >>> I usually let the crash continue and examine LogCat. >>> >>> > 2) Also when crashing, my app might be crashing because of not having >>> > the >>> > right permissions. (How) Can I find out what permissions stop the app >>> > from >>> > running, or do I just have to guess that it needs some camera-related >>> > permissions if the faulty lines proves to be related to camera? >>> >>> The stack trace will tell you when your problem is due to permissions >>> -- the exception should tell you the permission that you need. Also, >>> many (most?) methods in the Android SDK that require a permission are >>> documented as such, either at the method or class level, in the >>> JavaDocs. >>> >>> -- >>> Mark Murphy (a Commons Guy) >>> http://commonsware.com | http://github.com/commonsguy >>> http://commonsware.com/blog | http://twitter.com/commonsguy >>> >>> _The Busy Coder's Guide to Android Development_ Version 3.8 Available! > > -- > 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 -- 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

