We are getting the following exception when running the DexParser via Flank:
Exception in thread "main" com.linkedin.dex.spec.DexException: invalid LEB128 sequence
at com.linkedin.dex.spec.Leb128$Companion.readUnsignedLeb128(Leb128.kt:26)
at com.linkedin.dex.parser.DecodedValue$Companion.create(DecodedValue.kt:56)
at com.linkedin.dex.parser.AnnotationUtilsKt.getTestAnnotation(AnnotationUtils.kt:70)
at com.linkedin.dex.parser.AnnotationUtilsKt.getClassAnnotationValues(AnnotationUtils.kt:46)
at com.linkedin.dex.parser.TestMethodKt.createTestMethods(TestMethod.kt:42)
at com.linkedin.dex.parser.JUnit4ExtensionsKt.findAllJUnit4Tests(JUnit4Extensions.kt:35)
at com.linkedin.dex.parser.DexParser$Companion.findTestMethods(DexParser.kt:60)
at com.linkedin.dex.parser.DexParser$Companion.findTestNames(DexParser.kt:45)
at com.linkedin.dex.parser.DexParser$Companion.main(DexParser.kt:36)
at com.linkedin.dex.parser.DexParser.main(DexParser.kt)
A screenshot of the environment when this exception is hit is included below. How would I debug this exception/what would cause this issue?
Related
There are some errors which only occur in some specific mobiles and that are shown in crashlytics. In my mobile device app working fine but there are some mobiles where the screen is crashing. I am unable to identify how to resolve that issue without knowing the cause of error. For now it is showing me this error which I have pasted below.
This is the title on Crashlytics .
ConsumerSingleObserver.java line 49
and this exception is showing
Fatal Exception: io.reactivex.rxjava3.exceptions.CompositeException: 2 exceptions occurred.
at io.reactivex.rxjava3.internal.observers.ConsumerSingleObserver.onError(ConsumerSingleObserver.java:49)
at io.reactivex.rxjava3.internal.operators.single.SingleObserveOn$ObserveOnSingleObserver.run(SingleObserveOn.java:79)
at io.reactivex.rxjava3.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:123)
at android.os.Handler.handleCallback(Handler.java:914)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:225)
at android.app.ActivityThread.main(ActivityThread.java:7563)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:994)
Caused by io.reactivex.rxjava3.exceptions.CompositeException$a: Multiple exceptions (2)
|-- androidx.room.rxjava3.EmptyResultSetException: Query returned empty result set: select * from FamilyDetails where serverId=?
at b.g.i.a.f.i$g.call(FamilyDetailsDao_Impl.java:90)
|-- java.lang.NullPointerException: null
at b.g.n.d.q.i.k(ConsentStepViewModel.kt:2)
CompositeException is usually thrown when your error handler itself throws an exception when it's handling an error thrown in the stream.
Make sure your error handling code is not throwing any exceptions.
Usually the stack trace will have the root cause below the CompositeException, prefixed with Caused by.
I am writing native code on Android and CPP exceptions are disabled by default.
I could simply enable them but I love leaving settings to default.
So I wonder if I can use all features of libc++ if exceptions are disabled?
Here is one code example:
std::__fs::filesystem::directory_iterator it("/does/not/exist");
The libc++ is compiled with exceptions. So this line will throw an exception. But I cannot catch it because my code is compiled without exceptions. My program will crash because an exception of type filesystem_error is thrown and I did not catch it:
terminating with uncaught exception of type std::__ndk1::__fs::filesystem::filesystem_error: filesystem error: in directory_iterator::directory_iterator(...): No such file or directory [/does/not/exist]
/buildbot/src/android/ndk-release-r23/toolchain/llvm-project/libcxx/../../../toolchain/llvm-project/libcxxabi/src/abort_message.cpp:72: abort_message: assertion "terminating with uncaught exception of type std::__ndk1::__fs::filesystem::filesystem_error: filesystem error: in directory_iterator::directory_iterator(...): No such file or directory [/does/not/exist]" failed
Aborted
So my question is if it is possible to use full libc++ if exceptions are disabled in my code?
Edit:
I am building a native standalone executable using ndk-build.
Exception in thread "main" java.lang.ClassCastException:
brut.androlib.res.data.value.ResStringValue cannot be cast to
brut.androlib.res.data.value.ResAttr at
brut.androlib.res.decoder.ResAttrDecoder.decode(ResAttrDecoder.java:36)
at
brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(AXmlResourceParser.java:369)
at
org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValue(XmlPullParserDelegate.java:69)
at
org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartTag(StaticXmlSerializerWrapper.java:267)
at
org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(StaticXmlSerializerWrapper.java:211)
at
brut.androlib.res.decoder.XmlPullStreamDecoder$1.event(XmlPullStreamDecoder.java:83)
at
brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:141)
at
brut.androlib.res.decoder.XmlPullStreamDecoder.decodeManifest(XmlPullStreamDecoder.java:153)
at
brut.androlib.res.decoder.ResFileDecoder.decodeManifest(ResFileDecoder.java:134)
at
brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:296)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:131) at
brut.androlib.ApkDecoder.decode(ApkDecoder.java:101) at
brut.apktool.Main.cmdDecode(Main.java:165) at
brut.apktool.Main.main(Main.java:81)
i am failing decode resources-file. i installed all the softwares that are needed by i still get this error. Please help guys
When i run my android application it shows an exception "android runtime exception" with a message "Error: thread attach failed". it happens before the execution of "OnCreate" mathod of main class. what will be reason for that error?? anybody please help.
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: