Android traces : Error during call stack reconstruction - android

I record traces on my android project by calling
Debug.startMethodTracing("MY AWESOME TRACE");
This usually works as a charm, but when trying to open my .trace file with Android Studio I get this issue :
Unexpected error while parsing trace file: Error during call stack reconstruction. Attempt to exit from method XXX while in method YYY
Has anyone encountered this error message ?
Cheers,

Related

How to get the full information of runtime error instead of <Timeout exceeded getting exception details>?

So I'm trying out xamarin in VS2017, but found this undhandled error:
Unhandled Exception:
Java.Lang.SecurityException: <Timeout exceeded getting exception details>
This is very clueless. How can I get the full information of the runtime error like in Android Studio?
I had the same problem while calling some native API,
solved it by
Put a try catch around the block of got which is throwing the error.
Put a breakpoint in the catch block, you can get actual details of the exception.
After getting assistance from Microsoft, I finally found the solution.
TL;DR
Use VS Android device log and filter with "mono-rt" or "Error"
Complete Answer:
There are 2 solution:
1. Using Android Studio logcat:
Open the Android Studio logcat (View > Tool Windows > Logcat). From the logcat window, choose the device, choose the Xamarin.Android deployed application, and choose logcat for Error
Android logcat will display the runtime error:
2. Using Visual Studio Android Device Log:
Open the Visual Studio Android Device Log(Tools > Android > Device Log).
Here is the tricky bit: Unlike Android Studio, VS list all of the device log, not limited to the Xamarin.Android app deployed. So somehow we have to use the filter to get the relevant information. The problem is, what filter should we use? I used my application name and the error didn't show up. It turns out that when the error happen, the log doesn't contain any of the application name. Instead it has "mono-rt" tag with "Error" type.
So there you have it. Filter it with "mono-rt" tag or "Error" type and you will find the error information

Android SDL2 Startup Crash

Can somebody please help me? I have a test SDL2 application which runs on my phone just fine. I took a copy of the sample app and began porting in code from my own application which builds and links just fine.
My application crashes on startup with the below error in the log (last line):
05-22 16:24:48.271 14834-14834/org.libsdl.app D/dalvikvm: Trying to load lib /data/app-lib/org.libsdl.app-13/libSDL2.so 0x42b0fb20
05-22 16:24:48.271 14834-14834/org.libsdl.app D/dalvikvm: Added shared lib /data/app-lib/org.libsdl.app-13/libSDL2.so 0x42b0fb20
05-22 16:24:48.271 14834-14834/org.libsdl.app D/dalvikvm: Trying to load lib /data/app-lib/org.libsdl.app-13/libmain.so 0x42b0fb20
05-22 16:24:48.281 14834-14834/org.libsdl.app A/libc: Fatal signal 11 (SIGSEGV) at 0x0000000c (code=1), thread 14834 (org.libsdl.app)
I have commented out my main() code and replaced this content with the main() from the sample app and it still crashes.
I'm faced with the long-winded task of incrementally including source files and components until I can identify the cause.
Does anybody know of a common cause for this please?
I am doing a clean build and run each time.
It looks like you have logcat's output filtering on. There should be a stack trace in the output after the 'fatal signal' line, which is visible if you select 'No filters' in logcat. Decoding that stack trace will hopefully make your search a bit narrower.

my native android project shows an error "05-13 14:00:09.930: A//system/bin/app_process(5774): stack corruption detected: aborted"

In my latest project , I use two native libraries.Some time it shows an error code in log cat
"05-13 14:00:09.930: A//system/bin/app_process(5774): stack corruption detected: aborted",
But sometimes it work properly.I dont know how to solve this problem any one please help me.

Error while opening trace file in Traceview in Android

I am using ADT 20.0.3. I am opening my trace file using following command:
C:>traceview "C:/Users/androdev/mytracefile.trace"
But I am getting following error:
Failed to read the trace filejava.io.IOException: Key section does not have an *end marker
at com.android.traceview.DmTraceReader.parseKeys(DmTraceReader.java:420)
at com.android.traceview.DmTraceReader.generateTrees(DmTraceReader.java:91)
at com.android.traceview.DmTraceReader.<init>(DmTraceReader.java:87)
at com.android.traceview.MainWindow.main(MainWindow.java:286)
mytracefile.trace is generated by using Debug.startMethodTracing("mytracefile") and Debug.stopMethodTracing() methods in my code.
Anyone know how to resolve this?
That simply means the tracefile is empty. Most probably Debug.stopMethodTracing() is not being called, and thus the tracefile data ends up being empty.

Finding source line on exception (Android, Eclipse)

When the Eclipse debugger stops due to an exception in my Android project, I can see the exception message in the variables window (e.g., "null pointer"), but how can I find out what Java code line my app was at when the exception occurred?
I can see a stack trace in the LH window, but selecting any of them doesn't seem to reveal anything that relates to my code.
Look in the LogCat view (in Eclipse Window-->Show View-->Other...-->Android-->LogCat) or in the adb logcat output from a terminal. The place to look will likely be the first mention of one of your classes below the line:
E/AndroidRuntime( ####): Caused by:

Categories

Resources