Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jnigen 0.12.2 and 0.13.0 crash #1887

Closed
brianquinlan opened this issue Jan 14, 2025 · 1 comment
Closed

jnigen 0.12.2 and 0.13.0 crash #1887

brianquinlan opened this issue Jan 14, 2025 · 1 comment

Comments

@brianquinlan
Copy link
Contributor

I'm not sure what is causing this. It seems to happen when I have more than one class in my jnigen.yaml classes stanza. But this just started happening today and I haven't changed anything in that file.

/Users/bquinlan/flutter/bin/dart run jnigen --config jnigen.yaml
(jnigen) INFO: ApiSummarizer.jar exists. Skipping build..
(jnigen) INFO: trying to obtain gradle dependencies [getReleaseCompileClasspath]...
(jnigen) INFO: Restoring build scripts
(jnigen) INFO: execute java -jar .dart_tool/jnigen/ApiSummarizer.jar -c "/Users/bquinlan/Library/Android/sdk/platforms/android-35/android.jar:/Users/bquinlan/Library/Android/sdk/platforms/android-35/android.jar:/Users/bquinlan/Library/Android/sdk/build-tools/34.0.0/core-lambda-stubs.jar:/Users/bquinlan/dart/http/pkgs/ok_http/example/build/app/intermediates/compile_and_runtime_not_namespaced_r_class_jar/release/R.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/97e41bf93ae51104c21becba09eb2a41/transformed/jetified-libs.jar:/Users/bquinlan/dart/http/pkgs/ok_http/example/build/integration_test/intermediates/compile_library_classes_jar/release/classes.jar:/Users/bquinlan/dart/http/pkgs/ok_http/example/build/jni/intermediates/compile_library_classes_jar/release/classes.jar:/Users/bquinlan/dart/http/pkgs/ok_http/example/build/ok_http/intermediates/compile_library_classes_jar/release/classes.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/10ddfb1b4034910818e63760e6a6d280/transformed/jetified-okhttp-4.12.0.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/76d92b182b6ff5f486108991344383ee/transformed/jetified-okio-jvm-3.6.0.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/70aead06dfc2f8976cd41f01ba56799c/transformed/jetified-flutter_embedding_release-1.0.0-cb4b5fff73850b2e42bd4de7cb9a4310a78ac40d.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/3980eff583e9429db534fe214ccd71e7/transformed/fragment-1.7.1-api.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/1c2c226f2c5d9c811fb4f42e25592a76/transformed/jetified-activity-1.8.1-api.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/1f37d65c39d52661d75f06b5c9e904e1/transformed/loader-1.0.0-api.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/39e771921f73eafcee64d0fc1452b0e8/transformed/jetified-lifecycle-livedata-core-ktx-2.7.0-api.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/113fda541a56ffd974509d91c9babfeb/transformed/lifecycle-livedata-2.7.0-api.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/6ca5ac7a4f2f0302dd64e3ea329a888b/transformed/lifecycle-viewmodel-2.7.0-api.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/739ec76d872f6b55289ca64b7aa270f5/transformed/lifecycle-livedata-core-2.7.0-api.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/6abc41c686ad78402a1ebafea7d7280d/transformed/jetified-lifecycle-viewmodel-savedstate-2.7.0-api.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/f95c5e798b1466723a665e19ceb15906/transformed/jetified-core-ktx-1.13.1-api.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/0f2b468e3374b778b576f77908165f5b/transformed/viewpager-1.0.0-api.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/c4a323cd72698b91779eda761f687108/transformed/customview-1.0.0-api.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/ef70fd3c7811976e05a4059126f21333/transformed/core-1.13.1-api.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/cf044f0b9e62b43a5f80d94063f8d00f/transformed/lifecycle-runtime-2.7.0-api.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/e9e6a56e05fff86ece8346de251b5e53/transformed/jetified-lifecycle-process-2.7.0-api.jar:/Users/bquinlan/.gradle/caches/modules-2/files-2.1/androidx.lifecycle/lifecycle-common-java8/2.7.0/2ad14aed781c4a73ed4dbb421966d408a0a06686/lifecycle-common-java8-2.7.0.jar:/Users/bquinlan/.gradle/caches/modules-2/files-2.1/androidx.lifecycle/lifecycle-common/2.7.0/85334205d65cca70ed0109c3acbd29e22a2d9cb1/lifecycle-common-2.7.0.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/b517943f7566cbd4863a9720a2fc91a9/transformed/jetified-window-java-1.2.0-api.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/ed05af5d5538f2c2d308c4734a2c1de9/transformed/jetified-window-1.2.0-api.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/411cd9e3606f361f621f23836205f186/transformed/jetified-kotlinx-coroutines-core-jvm-1.7.1.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/0d5d4728d8a935ecdf5f52d7334cc698/transformed/jetified-kotlinx-coroutines-android-1.7.1.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/d79d87c93ea181f2cd7559eed35c957a/transformed/jetified-kotlin-stdlib-jdk8-1.9.10.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/0adb085a9397d7d4b06c5be5c247e01b/transformed/jetified-kotlin-stdlib-jdk7-1.9.10.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/66b42c96b997159643bf43f841ce00c0/transformed/rules-1.2.0-api.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/fcf6a533c0bed0d9e46155d5af82b447/transformed/espresso-core-3.2.0-api.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/7083eec02a0bc7b0a42037cb9aa0bad7/transformed/runner-1.2.0-api.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/0eff8e690062294f30e34ea9ec6d8714/transformed/monitor-1.2.0-api.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/6e15388ba7d784fff6365c46aba48afe/transformed/core-runtime-2.2.0-api.jar:/Users/bquinlan/.gradle/caches/modules-2/files-2.1/androidx.arch.core/core-common/2.2.0/5e1b8b81dfd5f52c56a8d53b18ca759c19a301f3/core-common-2.2.0.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/32e5e28be103fb30eee71ce374e048fa/transformed/versionedparcelable-1.1.1-api.jar:/Users/bquinlan/.gradle/caches/modules-2/files-2.1/androidx.collection/collection/1.1.0/1f27220b47669781457de0d600849a5de0e89909/collection-1.1.0.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/4f557e6849fafcf3375ea8a66fe06a47/transformed/jetified-savedstate-1.2.1-api.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/e47312301d13da33c0fdbc5033a09db9/transformed/jetified-annotation-jvm-1.8.0.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/a763f2cb13638763cfedfd05ff235b4c/transformed/jetified-annotation-experimental-1.4.0-api.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/162545eb1d5fabf86a84378489335f78/transformed/jetified-kotlin-stdlib-1.9.23.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/a7eefb6dee2793ec6313f847a7198010/transformed/jetified-armeabi_v7a_release-1.0.0-cb4b5fff73850b2e42bd4de7cb9a4310a78ac40d.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/85ddf54a75c009d23c7c38ed9e162cb5/transformed/jetified-arm64_v8a_release-1.0.0-cb4b5fff73850b2e42bd4de7cb9a4310a78ac40d.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/977bef4e169a3a6e2f529adc058db51d/transformed/jetified-x86_64_release-1.0.0-cb4b5fff73850b2e42bd4de7cb9a4310a78ac40d.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/e9c28c494f01b6d08507596b6220cc9b/transformed/jetified-annotations-23.0.0.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/dea88db7cd837ead0186a6fe753b730e/transformed/jetified-junit-4.12.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/4e612ec46ae754415a30c517360bba81/transformed/jetified-hamcrest-integration-1.3.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/bb40d1f41713e5c5b4963904ec16af98/transformed/jetified-hamcrest-library-1.3.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/33fa767788ba19d2d1651d6d5797602e/transformed/jetified-hamcrest-core-1.3.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/ab2714824c9fffc6ec300988d8a804e9/transformed/jetified-kxml2-2.3.0.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/3ab415dba1b5b99f2d506e84b5d31c20/transformed/espresso-idling-resource-3.2.0-api.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/5da12dac13467076769886ba79ef4675/transformed/jetified-javawriter-2.1.1.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/99efe1493eb8f11eef195663bb00a327/transformed/jetified-javax.inject-1.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/3349380959aaf4c3ba6a9c037c87af95/transformed/jetified-jsr305-3.0.2.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/3fbdb9fd9c7ae0dea74ce3cdb67cf9b7/transformed/jetified-startup-runtime-1.1.1-api.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/ffb28263006d9a7f2c7b76ca72c4c479/transformed/jetified-tracing-1.2.0-api.jar:/Users/bquinlan/.gradle/caches/8.12/transforms/afaeb16fbf3b578fa34515ff7748e2f6/transformed/jetified-relinker-1.4.5-api.jar:/Users/bquinlan/dart/http/pkgs/ok_http/example/build/app/tmp/kotlin-classes/release" --backend asm java.util.Enumeration java.util.Arrays java.security.cert.Certificate
(jnigen) INFO: Parsing inputs took 388 ms
Unhandled exception:
type 'Null' is not a subtype of type 'Map<String, dynamic>' in type cast
#0      _$ArrayTypeFromJson (package:jnigen/src/elements/elements.g.dart:97:45)
#1      new ArrayType.fromJson (package:jnigen/src/elements/elements.dart:464:7)
#2      new TypeUsage.fromJson (package:jnigen/src/elements/elements.dart:247:28)
#3      _$ParamFromJson (package:jnigen/src/elements/elements.g.dart:135:23)
#4      new Param.fromJson (package:jnigen/src/elements/elements.dart:577:56)
#5      _$MethodFromJson.<anonymous closure> (package:jnigen/src/elements/elements.g.dart:119:34)
#6      MappedListIterable.elementAt (dart:_internal/iterable.dart:435:31)
#7      ListIterator.moveNext (dart:_internal/iterable.dart:364:26)
#8      new _GrowableList._ofEfficientLengthIterable (dart:core-patch/growable_array.dart:189:27)
#9      new _GrowableList.of (dart:core-patch/growable_array.dart:150:28)
#10     new List.of (dart:core-patch/array_patch.dart:39:18)
#11     ListIterable.toList (dart:_internal/iterable.dart:224:7)
#12     _$MethodFromJson (package:jnigen/src/elements/elements.g.dart:120:16)
#13     new Method.fromJson (package:jnigen/src/elements/elements.dart:543:57)
#14     _$ClassDeclFromJson.<anonymous closure> (package:jnigen/src/elements/elements.g.dart:28:35)
#15     MappedListIterable.elementAt (dart:_internal/iterable.dart:435:31)
#16     ListIterator.moveNext (dart:_internal/iterable.dart:364:26)
#17     new _GrowableList._ofEfficientLengthIterable (dart:core-patch/growable_array.dart:189:27)
#18     new _GrowableList.of (dart:core-patch/growable_array.dart:150:28)
#19     new List.of (dart:core-patch/array_patch.dart:39:18)
#20     ListIterable.toList (dart:_internal/iterable.dart:224:7)
#21     _$ClassDeclFromJson (package:jnigen/src/elements/elements.g.dart:29:16)
#22     new ClassDecl.fromJson (package:jnigen/src/elements/elements.dart:157:7)
#23     new Classes.fromJson (package:jnigen/src/elements/elements.dart:43:35)
#24     getSummary (package:jnigen/src/summary/summary.dart:192:27)
<asynchronous suspension>
#25     generateJniBindings (package:jnigen/src/generate_bindings.dart:30:15)
<asynchronous suspension>
#26     main (file:///Users/bquinlan/.pub-cache/hosted/pub.dev/jnigen-0.12.2/bin/jnigen.dart:18:3)
<asynchronous suspension>
@brianquinlan
Copy link
Contributor Author

It looks like this is fixed at HEAD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant