Skip to content
This repository has been archived by the owner on Aug 14, 2020. It is now read-only.

GluonVM - Functionality that is missing. - JDK8 JVM_GetMethodParameters #55

Open
juan-fuentes opened this issue Apr 27, 2018 · 0 comments

Comments

@juan-fuentes
Copy link

juan-fuentes commented Apr 27, 2018

Background of the issue
I discovered this problem when using Jackson to generate JSON from an immutable object.

Jackson can be used without annotations to create immutable objects, given that it can discover the parameter names of the constructor.

This feature was an addition from JDK8.

Workaround
Instead of using automatic discovery of parameter names is possible to instead use the java.beans.ConstructorProperties annotation.

This interface is a phantom class but can be added without any other dependency to the gluon project.

Steps to reproduce

  1. Create a new single view application template using GluonVM.
  2. Replace the default single view application GluonApplication.java class by the one provided as attachment. GluonApplication.txt
  3. You should get the stacktrace below.

[SUB] Obtained 50 stack frames.
[SUB] 0 GluonMobile-SingleViewProjectonGluonVM2App 0x000000010939a1ca doPrintTrace + 42
[SUB] 1 GluonMobile-SingleViewProjectonGluonVM2App 0x000000010939a178 gvmMissing + 40
[SUB] 2 GluonMobile-SingleViewProjectonGluonVM2App 0x00000001093ad957 JVM_GetMethodParameters + 23
[SUB] 3 GluonMobile-SingleViewProjectonGluonVM2App 0x00000001082bea1e [J]java.lang.reflect.Executable.getParameters0()[Ljava/lang/reflect/Parameter; + 66
[SUB] 4 GluonMobile-SingleViewProjectonGluonVM2App 0x00000001082be882 [J]java.lang.reflect.Executable.privateGetParameters()[Ljava/lang/reflect/Parameter; + 132
[SUB] 5 GluonMobile-SingleViewProjectonGluonVM2App 0x00000001082be3f2 [J]java.lang.reflect.Executable.getParameters()[Ljava/lang/reflect/Parameter; + 22
[SUB] 6 GluonMobile-SingleViewProjectonGluonVM2App 0x00000001082be44a [j]java.lang.reflect.Executable.getParameters()[Ljava/lang/reflect/Parameter;[lookup] + 42
[SUB] 7 GluonMobile-SingleViewProjectonGluonVM2App 0x0000000107433d8a [J]com.gluonapplication.GluonApplication.getMethodNames(Ljava/lang/Class;)Ljava/util/Set; + 206
[SUB] 8 GluonMobile-SingleViewProjectonGluonVM2App 0x0000000107433bdf [J]com.gluonapplication.GluonApplication.postInit(Ljavafx/scene/Scene;)V + 54
[SUB] 9 GluonMobile-SingleViewProjectonGluonVM2App 0x000000010745064a [j]com.gluonhq.charm.glisten.application.MobileApplication.postInit(Ljavafx/scene/Scene;)V[lookup] + 42
[SUB] 10 GluonMobile-SingleViewProjectonGluonVM2App 0x000000010745040f [J]com.gluonhq.charm.glisten.application.MobileApplication.continueInit(Z)V + 705
[SUB] 11 GluonMobile-SingleViewProjectonGluonVM2App 0x000000010745011a [J]com.gluonhq.charm.glisten.application.MobileApplication.start(Ljavafx/stage/Stage;)V + 892
[SUB] 12 GluonMobile-SingleViewProjectonGluonVM2App 0x00000001086e8e17 [j]javafx.application.Application.start(Ljavafx/stage/Stage;)V[lookup] + 39
[SUB] 13 GluonMobile-SingleViewProjectonGluonVM2App 0x000000010763cf0c [J]com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(Ljava/util/concurrent/atomic/AtomicBoolean;Ljavafx/application/Application;)V + 287
[SUB] 14 GluonMobile-SingleViewProjectonGluonVM2App 0x00000001076372c4 [j]com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(Ljava/util/concurrent/atomic/AtomicBoolean;Ljavafx/application/Application;)V[clinit] + 61
[SUB] 15 GluonMobile-SingleViewProjectonGluonVM2App 0x000000010763eae4 [J]com.sun.javafx.application.LauncherImpl$$Lambda$9.run()V + 28
[SUB] 16 GluonMobile-SingleViewProjectonGluonVM2App 0x0000000107644288 [J]com.sun.javafx.application.PlatformImpl.lambda$runAndWait$11(Ljava/lang/Runnable;Ljava/util/concurrent/CountDownLatch;)V + 113
[SUB] 17 GluonMobile-SingleViewProjectonGluonVM2App 0x0000000107640b18 [j]com.sun.javafx.application.PlatformImpl.lambda$runAndWait$11(Ljava/lang/Runnable;Ljava/util/concurrent/CountDownLatch;)V[clinit] + 61
[SUB] 18 GluonMobile-SingleViewProjectonGluonVM2App 0x0000000107644f1d [J]com.sun.javafx.application.PlatformImpl$$Lambda$10.run()V + 28
[SUB] 19 GluonMobile-SingleViewProjectonGluonVM2App 0x0000000107644422 [J]com.sun.javafx.application.PlatformImpl.lambda$runLater$9(Ljava/lang/Runnable;)Ljava/lang/Void; + 19
[SUB] 20 GluonMobile-SingleViewProjectonGluonVM2App 0x0000000107640b9f [j]com.sun.javafx.application.PlatformImpl.lambda$runLater$9(Ljava/lang/Runnable;)Ljava/lang/Void;[clinit] + 52
[SUB] 21 GluonMobile-SingleViewProjectonGluonVM2App 0x00000001076455e0 [J]com.sun.javafx.application.PlatformImpl$$Lambda$22.run()Ljava/lang/Object; + 21
[SUB] 22 GluonMobile-SingleViewProjectonGluonVM2App 0x00000001093c55ce _call0 + 142
[SUB] 23 GluonMobile-SingleViewProjectonGluonVM2App 0x00000001093bf4bc callObjectMethod + 156
[SUB] 24 GluonMobile-SingleViewProjectonGluonVM2App 0x00000001093bf3de gvmCallObjectInstanceMethodA + 622
[SUB] 25 GluonMobile-SingleViewProjectonGluonVM2App 0x00000001093bf55a gvmCallObjectInstanceMethodV + 90
[SUB] 26 GluonMobile-SingleViewProjectonGluonVM2App 0x00000001093bf6dd gvmCallObjectInstanceMethod + 365
[SUB] 27 GluonMobile-SingleViewProjectonGluonVM2App 0x00000001093ad9f6 JVM_DoPrivileged + 134
[SUB] 28 GluonMobile-SingleViewProjectonGluonVM2App 0x00000001083a5684 [J]java.security.AccessController.doPrivileged(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;)Ljava/lang/Object; + 98
[SUB] 29 GluonMobile-SingleViewProjectonGluonVM2App 0x00000001083a5304 [j]java.security.AccessController.doPrivileged(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;)Ljava/lang/Object;[clinit] + 61
[SUB] 30 GluonMobile-SingleViewProjectonGluonVM2App 0x000000010764436d [J]com.sun.javafx.application.PlatformImpl.lambda$runLater$10(Ljava/lang/Runnable;Ljava/security/AccessControlContext;)V + 135
[SUB] 31 GluonMobile-SingleViewProjectonGluonVM2App 0x0000000107640b60 [j]com.sun.javafx.application.PlatformImpl.lambda$runLater$10(Ljava/lang/Runnable;Ljava/security/AccessControlContext;)V[clinit] + 61
[SUB] 32 GluonMobile-SingleViewProjectonGluonVM2App 0x0000000107645a65 [J]com.sun.javafx.application.PlatformImpl$$Lambda$9.run()V + 28
[SUB] 33 GluonMobile-SingleViewProjectonGluonVM2App 0x00000001093c55ce _call0 + 142
[SUB] 34 GluonMobile-SingleViewProjectonGluonVM2App 0x00000001093be961 callVoidMethod + 145
[SUB] 35 GluonMobile-SingleViewProjectonGluonVM2App 0x00000001093be4ad gvmCallVoidInstanceMethodA + 605
[SUB] 36 GluonMobile-SingleViewProjectonGluonVM2App 0x00000001093be9e2 gvmCallVoidInstanceMethodV + 82
[SUB] 37 GluonMobile-SingleViewProjectonGluonVM2App 0x00000001093a2f03 CallVoidMethodV + 67
[SUB] 38 GluonMobile-SingleViewProjectonGluonVM2App 0x00000001093a2e8d CallVoidMethod + 365
[SUB] 39 GluonMobile-SingleViewProjectonGluonVM2App 0x0000000109370d9f -[GlassRunnable run] + 159
[SUB] 40 Foundation 0x000000010f2c3d5e __NSThreadPerformPerform + 330
[SUB] 41 CoreFoundation 0x0000000114a41bb1 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
[SUB] 42 CoreFoundation 0x0000000114a264af __CFRunLoopDoSources0 + 271
[SUB] 43 CoreFoundation 0x0000000114a25a6f __CFRunLoopRun + 1263
[SUB] 44 CoreFoundation 0x0000000114a2530b CFRunLoopRunSpecific + 635
[SUB] 45 GraphicsServices 0x0000000116c17a73 GSEventRunModal + 62
[SUB] 46 UIKit 0x000000010f8a80b7 UIApplicationMain + 159
[SUB] 47 GluonMobile-SingleViewProjectonGluonVM2App 0x00000001093c6180 main + 352
[SUB] 48 libdyld.dylib 0x0000000113495955 start + 1
[SUB] 49 ??? 0x0000000000000001 0x0 + 1
[SUB] We will now abort the process

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

No branches or pull requests

1 participant