// HelloWindow.java
@GtkChild(name="header_bar")
public HeaderBar header;
Exception
java.lang.IllegalArgumentException: Bad layout path: cannot resolve 'header' in layout [[[[[[[a8(g_class)](g_type_instance)i4(ref_count)x4a8(qdata)](parent_instance)a8(priv)](parent_instance)](parent_instance)](parent_instance)](parent_instance)a8(label)a8(header_bar)](HelloWindow)
at java.base/jdk.internal.foreign.LayoutPath.badLayoutPath(LayoutPath.java:308)
at java.base/jdk.internal.foreign.LayoutPath.groupElement(LayoutPath.java:148)
at java.base/java.lang.foreign.MemoryLayout$PathElement.lambda$groupElement$0(MemoryLayout.java:522)
at java.base/jdk.internal.foreign.LayoutPath$PathElementImpl.apply(LayoutPath.java:357)
at java.base/java.lang.foreign.MemoryLayout.computePathOp(MemoryLayout.java:484)
at java.base/java.lang.foreign.MemoryLayout.byteOffset(MemoryLayout.java:306)
at io.github.jwharm.javagi.gtk.types.Types.lambda$getTemplateClassInit$1(Types.java:197)
at io.github.jwharm.javagi.gobject.types.Types.lambda$register$8(Types.java:1156)
at org.gnome.gobject.ClassInitFunc.upcall(ClassInitFunc.java:151)
at io.github.jwharm.javagi.interop.Interop$VarargsInvoker.invoke(Interop.java:1121)
at org.gnome.gobject.GObject.constructNew(GObject.java:207)
at org.gnome.gobject.GObject.newInstance(GObject.java:1869)
at my.example.hellotemplate.HelloWindow.create(HelloWindow.java:51)
at my.example.hellotemplate.HelloApplication.activate(HelloApplication.java:92)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.gnome.gio.Application$ApplicationClass.activateUpcall(Application.java:2383)
at org.gnome.gio.Application.run(Application.java:1067)
at my.example.hellotemplate.Main.main(Main.java:22)
Unrecoverable uncaught exception encountered. The VM will now exit
Minimal example:
java-gi-examples/HelloTemplate
Exception
OS
Arch linux