Android :: How To Parse And Analyze The Call Stack Of Native Code - Tools
Apr 19, 2009The following is the log from native code.
CODE:.................
The following is the log from native code.
CODE:.................
I am writing an android game that involves some c++. I have a fairly repeatable crash that seems to be due to my c++ code
Looking at the page:
http://source.android.com/porting/debugging_native.html#Debug_Scenarios (right at the end)
it says to run the output through the "stack tool" - which I can find no trace of.. nor aproto.
I've been told that Android OS stores all function calls in a stack. This can lead to many problems and cause the 'hiccups' during runtime, even if a program is functionalized properly, correct?
So the question is, how can we prevent this from happening? The obvious solution is to functionalize less, along with other sensible acts such as refraining from excessively/needlessly creating objects, performing static calls to functions that don't access fields, etc...
Is there another way though? Or can this only be done through careful code writing on the programmers' part? Does the JVM/JIT automatically optimize the bytecode during compile time to account for this?
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
I'm still checking everything out.
I'm wondering what the limitations are if we develop the app using Titanium.
What cannot be done using Titanium, for iPhone and for Android?
What things can only be done using only the the native tools?
i am installing Android ADT to my Eclipes Juno (manually/Offline) using ADT-20.0.3.zip during installation everything went fine except this message Cannot complete the install because one or more required items could not be found. Software being installed: Android Native Development Tools
20.0.3.v201208082019-427395 (com.android.ide.eclipse.ndk.feature.group 20.0.3.v201208082019-427395) Missing requirement: Android Native Development Tools 20.0.3.v201208082019-427395 (com.android.ide.eclipse.ndk.feature.group 20.0.3.v201208082019-427395) requires 'org.eclipse .cdt.feature. group 0.0.0' but it could not be found
i have to uncheck the Android Native Development Tools check box..but i already did that.. and still the message is there and there's no way i can continue.. the "next" button is still disabled..
How to parse xml data.. file is php file and Soap is used in xml..
i am going to use this in a android application.
please provide me proper codes
I want to do optimization of my android application.
Can anyone please tell what are different ways to optimize code and performance in android?
I gone through one tool i.e. Zipalign: an Easy Optimization.
Any other tools available?
I would like to inject code in an android application at runtime. I have tried to use dx tool to generate a dexfile in the sdcard but when i want to instantiate, it fails. Are there any tools to inject code generating new dalvik bytecode? I am studying some libraries, aspecjt or guise for android. Is it better to work with a script language?
View 2 Replies View RelatedAnyone could compile some SIP Stack in C/C++ along with Android source code? Note: i am referring not to compile the Sip Stack with ndk, but compile with all the code of the Android platform.
View 4 Replies View RelatedHow 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.
Is there a native RTP stack available on in Android Froyo release ? If not, are there any plans to bring one in the future releases ?
View 2 Replies View RelatedI have a library written in C which implements some complicated algorithm over two databases and as a result produce new one. I am trying to import it in android using android-ndk. What is the correct wat to use sqlite in you native libraries, i was able to build the sqlite manually using the ndk but when i use it gives some strange errors when trying to fetch rows from db which is on phone storate - after i fetch some data i got SQL:database not opened. how can use sqlite in native code on android.
View 2 Replies View RelatedWe know that it's very convenient to use TraceView in Android java code to check the runtime of different chunks of code. Now I develop my app with NDK and I want to check the runtime of some native functions, but I found nothing in TraceView guide if it's possible to use this tool. Because I noticed that one of my native methods spent too much time and I want to dig out the more detailed root cause. Is there anybody know if we can use TraceView in native code?
View 2 Replies View RelatedI am planning to write a video player application and I am planning to use the gstreamer on the native side. I am trying to use the SurfaceFlinger for the rendering part. For this I have written a test program to experiment on the rendering part. I am using the surface flinger wrapper from the project
http://gitorious.org/rowboat/external-gst-plugins-android
But the following ERROR occurs when we try to run the .apk.
CODE:.......
The I changed the permission for "android.permission.ACCESS_SURFACE_FLINGER" in frameworks/base/core/ res/AndroidManifest.xml to "dangerous" and recompiled. But got the same error.
Then I commented out the "checkCallingPermission" method in IServiceManager.cpp and recompiled. Then also i got the same error.
I can't find the source code for the Android Development Tools Plugin for Eclipse. It seems to have been moved a few times, and when I google the question, the answers point to the wrong places. Also http://source.android.com/discuss seems to be down.
View 2 Replies View Relatedis 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 RelatedI have developed an app for my customer at API level 5 (2.0) and above, and set my minSDKVersion as 5. Now my customer would like to know if it can be made backward compatible with API level 4 (1.6). I have a vague idea which areas might not immediately be compatible without doing some conditional code, but...
Does anyone know if there are any tools that can do a simple analysis of my code and list for me any API calls I have that and their API levels (preferably sorted, though I can do this if I can export the info)?
This seems like a very useful tool if someone has it? (I'm not expecting a full static code analysis, just API levels of all API calls in a project)...
Is this possible to access a sensor data form native code without using Java at all? I need to access to the sensor as fast as possible, but it seems like the "DELAY_FASTEST" parameter when registering an event change is not fast enough.
View 3 Replies View RelatedI created one android application it is using one native method. I created shared library using ndk tools.My jni function is having some problems i want to debug it. How to debug it in eclipse tool
View 2 Replies View RelatedI set out to use SkCanvas and other native SKIA classes but I could not find any sample code. After a week's of search and diving deep into Android source, I got it working. Below in my blog, I have detailed, how to use SimpleJNI native sample, to get native canvas going. If you find it useful or I did something wrong let me know http://matthiyosi.blogspot.com/2009/10/using-skia-in-android-native-c...
View 6 Replies View RelatedI have some piece of code which uses JNI. I can debug code wrote in Java directly in Eclipse (using ADT). I even have a script, which help me debug native code with gdb. However this is not very comfortable way for doing this.Is it possible to configure Eclipse to use gdb (I guess gdbserver) for debbuging android native applications? Do you know where I could find any description of this?
View 1 Replies View RelatedWe want to migrate a huge complex native program to Android system ,running it as a background service accepting command sent from Java Program using JNI along with IPC. However, the Android NDK state following words:
Please note that the NDK does not enable you to develop native-only applications. Android's primary runtime remains the Dalvik virtual machine.
Does that mean we have no way to run an standalone native-only application on Android as a background service? The native code can only exist in the form of library that will be loaded to the virtual machine through JNI?
I am creating an Android application which uses the JMF (SIP, RTP, JAIN). So i downloaded the JMF source code for some adhoc change to my application.The basic questions 1. How will it behave the "native files - C/C++/header" in JMF source files(downloaded)? because android is based on java right now. 2. Is there any complete different way to porting/doing the SIP, RTP working in android?Is there any link from sun.com(this) site for JMF source code?Any suggestion and comment about this?
View 3 Replies View RelatedHow I can add headers to my native c file.
So here's the details.
I was able to setup my android project to call a native function from a .so file. And actually I need to add box2d to my project, but I when I include the header files, it won't make. So basically my problem is how do I tell the make file to include a whole folder with header and cpp files.
I tried adding the path directly to the include statement just for the sake of testing it. The error goes away, but new errors come out.
Is it possible to broadcast an Intent from native code? If so, is there documentation and/or sample code pertaining to the relevant APIs?
View 1 Replies View RelatedI am trying out an example of OpenCV from http://github.com/billmccord/OpenCV-Android and am stuck at the point where it is mentioned "Before attempting to run the VideoEmulator application, you must first copy this XML file into the emulator in the following location: /data/data/org.siprop.opencv/files/haarcascade_frontalface_alt.xml " Where in my eclipse workspace do I need to place this haar xml file to be copied to the location /data/data/org.siprop.opencv/files/ of the emulator?
View 1 Replies View RelatedWhen I debug android app, if I work with Java, I can use Log.d("TAG", "xxxx", new Throwable()) to print backtrace of Java code. This is really handy for me to find bugs. But when I work with native library (e.g. libwebcore.so), there seems no way to print backtrace in runtime. The only way to debug native code is use gdbserver.
I have a question: Is there any way to print backtrace in C/C++?
Try to select (or update) from custom databases (for example mmssms.db) but on init I see " Unable to open the database file". Try send permissions in manifest <uses-permission android:name="android.permission.WRITE_SMS"/> <uses-permission android:name="android.permission.READ_SMS"/> but this doesn't help.
View 2 Replies View RelatedI've a very simple / minimal code application.
I'm drawing some lines on screen with my finger.
At some point, app closes itself / exists automatically.
No exception is thrown.
CODE:......................