DaanVanYperen / libgdx-artemis-quickstart

Quickstart template for libgdx artemis projects!
MIT License
57 stars 26 forks source link

Trying to run this I get the Caused by: java.lang.NegativeArraySizeException #7

Closed pavlosgi closed 9 years ago

pavlosgi commented 9 years ago
13:27:36.481 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.lang.NegativeArraySizeException
13:27:36.481 [ERROR] [org.gradle.BuildExceptionReporter]    at com.artemis.WeaverLog.format(WeaverLog.java:27)
13:27:36.481 [ERROR] [org.gradle.BuildExceptionReporter]    at com.artemis.WeaverLog.format(WeaverLog.java:72)
13:27:36.481 [ERROR] [org.gradle.BuildExceptionReporter]    at net.onedaybeard.gradle.ArtemisWeavingTask.weave(ArtemisWeavingTask.java:77)
13:27:36.482 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
13:27:36.483 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:226)
13:27:36.484 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:219)
13:27:36.484 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:208)
13:27:36.484 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:589)
13:27:36.484 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:572)
13:27:36.484 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
13:27:36.484 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
13:27:36.484 [ERROR] [org.gradle.BuildExceptionReporter]    ... 57 more
DaanVanYperen commented 9 years ago

@junkdog This one seems familiar!

junkdog commented 9 years ago

Is this perchance running pre-0.9.0 with an empty @PackedWeaver component?

Otherwise, which java version are you compiling with?

DaanVanYperen commented 9 years ago

Quickstart is set up for 0.9.1-SNAPSHOT by default. It does use an empty packed component for feature detection purposes. Is this something recently fixed in 0.9.1?

https://github.com/DaanVanYperen/libgdx-artemis-quickstart/blob/master/core/src/net/mostlyoriginal/game/component/detection/PackDetectionComponent.java

junkdog commented 9 years ago

I can't find the issue now, but I think it was fixed in time for 0.9.0, at least.

We ran it on an iOS device as recent as last week; there haven't been any new snapshots pushed in a while.

Possible fix 1: clean artemis snapshot artifacts from repo

Have you compiled artemis-odb from source yourself? it's possible you got artemis-odb in a broken state. If so - delete it from the local .m2 repo and try again.

Possible fix 2: don't trust the IDE

Are you compiling it from within the IDE or from the terminal? IDE:s sometimes interfere with complicated-ish gradle/maven configurations.

Possible fix 3: help us help you

If compiling from the terminal doesn't work, I'm not really sure where to look; but if you provide us with some more data related to your environment: java version (incl openjdk/oracle), gradle version, os version - I could try to replicate the error on my end.

DaanVanYperen commented 9 years ago

@junkdog are the repo snapshots up to date?

Btw didn't mean for you to do all the work here, figured you might know off-hand what was going on.

junkdog commented 9 years ago

I haven't pushed anything in a while; I think the snapshots are up-to-date though, more or less.

I've been meaning to get some artemis-odb work this weekend. Hopefully I can get 0.10.0 ready for release (without save/load).

DaanVanYperen commented 9 years ago

Can't reproduce this, all targets compile and run. Pretty sure this is caused by https://github.com/junkdog/artemis-odb/issues/240 in artemis-odb. Suggest disabling the weaver until the coming artemis-odb 0.10 release!

Closing. Please provide reproduction steps or example source if you feel this error exists in artemis-odb 0.9.1-SNAPSHOT!