-
Notifications
You must be signed in to change notification settings - Fork 246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gdx-ai prevents GWT SuperDevMode #95
Comments
I have the same issue and can't compile in superDev mode, making debugging impossible 😢 . Steps to reproduce the issueSet up a fresh project with the gdx-ai extension. Instantiante a new MessageManager, or use MessageManager.getInstance(). |
@MrStahlfelge Did you find some way to debug your application without superdevmode? |
No, unfortunately not. |
Unfortunately, I won't have the time to investigate in the short run, sorry. |
@garbadrom did you call MessageManager class before LibGDX was properly initialized (in your game constructor or in the HTML launcher class) ? |
@mgsx-dev No, if I call |
@garbadrom and when you're removing this call all is OK ? |
Yes. The same issue comes up if I call |
The root cause is that StandaloneFileSystem should not be accessed when you're using libgdx. I can't reproduce this issue with my setup. Maybe more information on your current setup could help : version of gdx-ai, libgdx, gwt ... |
Yes, I see ! However I believe the issue comes from the html:superDev compilation, as the issue still comes up even if I call I'm using : I've created a repository with a setup that reproduces the issue : https://github.com/garbadrom/GdxAiAndGwtTest. |
I had a similar issue with the same exception, but for compiling with dist instead of superdev. It was specifically linked to Behaviourtrees - there, the StandaloneFileSystem was (incorrectly) used. I didn't explicitly call anything ai related before everything was ready. But i found out, that reflection plays a role here. It was quite fragile, but i was able to isolate classes considered for reflection, finally being able to compile and not fail at runtime (due to class not found, because of missing reflection setting). I was only able to solve it by copying the whole btree source into my project, as using the com.badlogic.gdx.btree package for reflection was necessary for runtime, but fails at compilation. Only after splitting it into a different packaging, it worked for me. So, the gist of it: The thing being active before Libgdx is properly initialized is reflection, at least in my case. This provoked the exception. |
Yes, i got this error too So i cant use gdx-ai for html version ^( |
Exact same error.
I only use |
I figured out a solution; it may not work for every project but it works here: payne911/Arise_Deeper#1 . I use GWT's super-source mechanism (see |
This allows gdx-ai to be used on GWT without the complex series of workarounds in #95 , because StandaloneFileSystem is swapped out for GdxFileSystem's implementation when running on GWT (which should always have libGDX available). There are also some key fixes for reflection regarding behavior trees; GWT needs a lot of behavior tree classes made available in the class reflection pool. Gradle is updated to 6.7.1, the same version libGDX currently uses to build. I want to update this to 7.3, but one step at a time.
Issue details
html:superDev and html:dist works, but when you try to activate superDevMode with the compile button within the web browser, recompiling fails:
[ERROR] Errors in 'com/badlogic/gdx/ai/StandaloneFileSystem.java'
[ERROR] Line 65: Property 'user.home' is not defined.
Debugging is not possible without superdevmode activated.
Version of gdx-ai and/or relevant dependencies
1.8.1, line 65 is concerned.
The text was updated successfully, but these errors were encountered: