[BUG] Using 0.13.0 throws an error that 0.12.2 does not #309

Closed
opened 2025-12-10 17:17:20 +01:00 by Daru-san · 2 comments
Daru-san commented 2025-12-10 17:17:20 +01:00 (Migrated from github.com)

I have been trying to generate bindings for libraries using java-gi '0.13.0`, but when using it, an error is thrown:

java.lang.IndexOutOfBoundsException: Index: 31, Size: 30
	at java.base/java.util.ArrayList.rangeCheckForAdd(ArrayList.java:839)
	at java.base/java.util.ArrayList.add(ArrayList.java:511)
	at org.javagi.generator/org.javagi.patches.GdkPatch.patch(GdkPatch.java:57)
	at org.javagi.generator/org.javagi.gir.GirParser.parseElement(GirParser.java:203)
	at org.javagi.generator/org.javagi.gir.GirParser.parseElement(GirParser.java:198)
	at org.javagi.generator/org.javagi.gir.GirParser.parse(GirParser.java:118)
	at org.javagi.generator/org.javagi.JavaGI.loadIncludedGirFiles(JavaGI.java:238)
	at org.javagi.generator/org.javagi.JavaGI.call(JavaGI.java:169)
	at org.javagi.generator/org.javagi.JavaGI.call(JavaGI.java:59)
	at info.picocli@4.7.7/picocli.CommandLine.executeUserObject(CommandLine.java:2031)
	at info.picocli@4.7.7/picocli.CommandLine.access$1500(CommandLine.java:148)
	at info.picocli@4.7.7/picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2469)
	at info.picocli@4.7.7/picocli.CommandLine$RunLast.handle(CommandLine.java:2461)
	at info.picocli@4.7.7/picocli.CommandLine$RunLast.handle(CommandLine.java:2423)
	at info.picocli@4.7.7/picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2277)
	at info.picocli@4.7.7/picocli.CommandLine$RunLast.execute(CommandLine.java:2425)
	at info.picocli@4.7.7/picocli.CommandLine.execute(CommandLine.java:2174)
	at org.javagi.generator/org.javagi.JavaGI.main(JavaGI.java:130)

I have tried a range of gir files, but they all have the same problem. This error does not occur when I use 0.12.2 though.

Could I please get some help finding out what the problem is here?

I have been trying to generate bindings for libraries using java-gi '0.13.0`, but when using it, an error is thrown: ``` java.lang.IndexOutOfBoundsException: Index: 31, Size: 30 at java.base/java.util.ArrayList.rangeCheckForAdd(ArrayList.java:839) at java.base/java.util.ArrayList.add(ArrayList.java:511) at org.javagi.generator/org.javagi.patches.GdkPatch.patch(GdkPatch.java:57) at org.javagi.generator/org.javagi.gir.GirParser.parseElement(GirParser.java:203) at org.javagi.generator/org.javagi.gir.GirParser.parseElement(GirParser.java:198) at org.javagi.generator/org.javagi.gir.GirParser.parse(GirParser.java:118) at org.javagi.generator/org.javagi.JavaGI.loadIncludedGirFiles(JavaGI.java:238) at org.javagi.generator/org.javagi.JavaGI.call(JavaGI.java:169) at org.javagi.generator/org.javagi.JavaGI.call(JavaGI.java:59) at info.picocli@4.7.7/picocli.CommandLine.executeUserObject(CommandLine.java:2031) at info.picocli@4.7.7/picocli.CommandLine.access$1500(CommandLine.java:148) at info.picocli@4.7.7/picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2469) at info.picocli@4.7.7/picocli.CommandLine$RunLast.handle(CommandLine.java:2461) at info.picocli@4.7.7/picocli.CommandLine$RunLast.handle(CommandLine.java:2423) at info.picocli@4.7.7/picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2277) at info.picocli@4.7.7/picocli.CommandLine$RunLast.execute(CommandLine.java:2425) at info.picocli@4.7.7/picocli.CommandLine.execute(CommandLine.java:2174) at org.javagi.generator/org.javagi.JavaGI.main(JavaGI.java:130) ``` I have tried a range of `gir` files, but they all have the same problem. This error does not occur when I use `0.12.2` though. Could I please get some help finding out what the problem is here?
jwharm commented 2025-12-10 20:36:10 +01:00 (Migrated from github.com)

This is is a bug, thanks for reporting

This is is a bug, thanks for reporting
jwharm commented 2025-12-10 21:32:34 +01:00 (Migrated from github.com)

The issue is fixed in this branch.
Release (0.13.1) will follow soon, hopefully I can find the time later this week.

The issue is fixed in [this branch](https://github.com/jwharm/java-gi/tree/0-13-1). Release (0.13.1) will follow soon, hopefully I can find the time later this week.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
java-gi/java-gi#309
No description provided.