Open Shabinder opened 1 year ago
Any update ?
have been stuck on kotlin 1.9.10 and zipline 1.2.0, since above doesnt work. I am more than happy to provide info in any way possible or do a brief sync explaining the steps to repro same.
Case 1: ✅
Using zipline 1.2.0 host and jsSource both works fine.
Case 2: 🔴
ZiplineServiceAdapterKt.descriptorName
refer below image for full trace
- So this breaks the promise done in readme for 1.x host and binary compatibility ⚠️
Case 3: 🔴
Fatal signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x7b7f130ff8 in tid 30292 (DefaultDispatch), pid 30209 (ndbound.preview)
refer below image for full traceAfter many iteration on finding out what works and what doesnt,
Below Commit is what makes the difference, with commit, plugins are loaded as expected, without, get stackOverflow error as shown.
https://github.com/Shabinder/zipline/commit/801b3d66cbe9ae2d51a44c7b272dff3c28409aa2
Shortlisted as much as I could, lmk if I can help or diagnose it more in any other way
So it seems like a type with a recursive descriptor. We can change the calculation to put in a placeholder character for when it recurses by keeping a set of seen types. Will have to try and reproduce, but should be pretty easy give what you've found out so far.
Got the same exception when using JsonElement as return type of a suspending ZiplineService method:
interface ExampleService : ZiplineService {
suspend fun example(): JsonElement
}
JsonElement might be JsonArray or JsonObject, which in turn contains List<JsonElement>
or Map<String, JsonElement>
, thus recursion appears.
A big problem for us, as we wanted to use JsonElement as a return type to get abstract tree of analytics params this way.
This exception does not seem to appear when using JsonElement in return type of non-suspending functions or when using it in function parameters.
@JakeWharton your hunch was r8, took time and dug in more today:
this is the class which ends in endless recursion
in.shabinder.soundbound.models.ThrowableWrapper(
message: kotlin.String,
stackTrace: kotlin.String,
cause: in.shabinder.soundbound.models.ThrowableWrapper?
)?
Some Traces thrown from plugins are very opaque on the cause of the crash, or am I missing something here ?