A strange error in RoboVM related with PlayN

46 views
Skip to first unread message

Tom Fisher

unread,
Apr 19, 2015, 6:29:48 AM4/19/15
to pl...@googlegroups.com
Hi, guys

I am going to be driven crazy by a bug in RoboVM when developing an iOS game with PlayN and the project can be downloaded at https://github.com/tomfisher/issue837. Clicking the red square will produce an ClassCastException even the code in the click listener does not touch any graphic code at all.  

It could be a linking bug in RoboVM, but the RoboVM team guys said they could not reproduce the error at the moment as discussed as in the thread https://github.com/robovm/robovm/issues/837.

Would you some guys please try the code at https://github.com/tomfisher/issue837, run 
mvn clean run -Probosim
and then click on the red square to see if there are any errors in the terminal window?

Thank you in advance.

Tom

Brigt Vik

unread,
Apr 20, 2015, 2:07:12 AM4/20/15
to pl...@googlegroups.com
Something missing in the pom?

#mvn clean run -Probosim
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Issue 837 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.219s
[INFO] Finished at: Mon Apr 20 08:02:21 CEST 2015
[INFO] Final Memory: 6M/77M
[INFO] ------------------------------------------------------------------------
[ERROR] Unknown lifecycle phase "run". You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes,test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-site, site, post-site, site-deploy,pre-clean, clean, post-clean. -> [Help 1]

Brigt Vik

unread,
Apr 20, 2015, 2:30:27 AM4/20/15
to pl...@googlegroups.com
When running integration-test instead of run, I get another error.

[ERROR] Failed to execute goal org.robovm:robovm-maven-plugin:1.1.0:ipad-sim (default) on project issue837: Failed to launch IOS Simulator: Native library for windows-x86_64 not found -> [Help 1]

Maybe I need to run this on a Mac? Not going to unpack that until I need to for my own game I'm afraid.

Tom Fisher

unread,
Apr 20, 2015, 4:12:45 AM4/20/15
to pl...@googlegroups.com

First of all, thanks for your try :) But it does need to run on Mac.

Anyway, thanks again.

Tom Fisher

unread,
Apr 20, 2015, 8:37:48 PM4/20/15
to pl...@googlegroups.com
Any suggestions on this issue would be really appreciated

Michael Bayne

unread,
Apr 20, 2015, 8:53:57 PM4/20/15
to pl...@googlegroups.com
On Sun, Apr 19, 2015 at 3:29 AM, Tom Fisher <tom.x....@gmail.com> wrote:
It could be a linking bug in RoboVM, but the RoboVM team guys said they could not reproduce the error at the moment as discussed as in the thread https://github.com/robovm/robovm/issues/837.

So I encountered this same issue a while back, reported it directly to Mario, he pointed me to issue 728 which was fixed in the latest snapshot, I tried that snapshot and the issue appeared to have gone away for me.

However, I get the issue now when running your code, so I assume something funny is still going on.

I added my info to the bug report, and I'll see if I can figure anything else out, but I don't really know what to do on our end. As you say, it seems to be a weird linker bug that is masked by the presence or absence of other stuff in the link.

If this is holding up your shipping, maybe you can try putting random other stuff into your (actual) app to see if you can mask the bug for this release and hopefully they can sort it out properly for the next one. It seems to be an all or nothing thing: either any drawing to a canvas fails (which pretty much hoses everything), or it works and there are no problems. So hacky as the workaround of adding random code is, it seems "safe".


Tom Fisher

unread,
Apr 20, 2015, 10:46:14 PM4/20/15
to pl...@googlegroups.com

Being a PlayN user feels at home :) 

Thanks a lot.

Tom Fisher

unread,
Apr 20, 2015, 10:57:53 PM4/20/15
to pl...@googlegroups.com

I'd tried to narrow down the problem by removing lines of code step by step and  each step just involved very small truck of code such as a method or a simple class. The current repo seems to be  the minimum since every removal even an irrelevant variable or an unused constant will result in that the exception disappears magically and none patterns can be observed. 

Tom Fisher

unread,
Apr 20, 2015, 11:05:53 PM4/20/15
to pl...@googlegroups.com


On Tuesday, April 21, 2015 at 8:53:57 AM UTC+8, Michael Bayne wrote:
I tried to add different types of code e.g  methods, constants, classes and failed with no luck at all :(
 

Michael Bayne

unread,
Apr 21, 2015, 12:10:53 AM4/21/15
to pl...@googlegroups.com
On Mon, Apr 20, 2015 at 8:05 PM, Tom Fisher <tom.x....@gmail.com> wrote:
I tried to add different types of code e.g  methods, constants, classes and failed with no luck at all :(

That sucks. It may be that it's an "additive" thing in that once you have some combination of things, adding new stuff doesn't make the problem go away, but taking away whatever crosses you over that threshold does.

I'll try to fiddle with things more to see if I can either get the issue837 project to not fail by *adding* something, or potentially by hacking the upstream PlayN source code, which might provide some avenue for you to work around this issue until they figure out what's going on in RoboVM itself.


Reply all
Reply to author
Forward
0 new messages