Titanium JIRA Archive
Appcelerator Community (AC)

[AC-6553] Android: Hyperloop unable to call Throwable.setStackTrace

GitHub Issuen/a
TypeBug
Priorityn/a
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsHyperloop
Labelsn/a
ReporterMichael Sharman
AssigneeAbir Mukherjee
Created2020-06-05T09:12:31.000+0000
Updated2020-06-05T09:14:01.000+0000

Description

I've been trying to create via hyperloop instances of java.lang.Throwable and calling setStackTrace(), unfortunately the code is failing with the following in the log output: {noformat} [ERROR] HyperloopProxy: (main) [45,461] Unable to resolve method call. Class: java.lang.Throwable, method name: setStackTrace, args: [[Ljava.lang.Object;@fb25d4c] {noformat} This is the relevant code:
const Throwable = require("java.lang.Throwable");
const StackTraceElement = require("java.lang.StackTraceElement");
const throwable = new Throwable("Test Exception");
throwable.setStackTrace( [ new StackTraceElement( "ClassName", "symbol", "file.js", 1) ] );
Also if I try to call throwable.getStackTrace() then I get: {noformat} [ERROR] JNIUtil: !!! Unable to convert unknown Java object class 'java.lang.StackTraceElement' to JS value !!! {noformat} It looks like, to me, that the "java.lang.StackTraceElement" isn't being proxied between the js and the native code properly - a Hyperloop bug? I've attached a simple titanium project wth the above code for debugging purposes.

Attachments

FileDateSize
hyperloop-stacktrace.zip2020-06-05T09:10:05.000+00003130784

Comments

No comments

JSON Source