YSoccer 19 fails to start on Mac OS 10.13.6

Insert here your troubles, infos and request about YSoccer's technical questions.
Post Reply
wdh
Someone..
Posts: 4
Joined: Sat Apr 18, 2020 3:36 pm

YSoccer 19 fails to start on Mac OS 10.13.6

Post by wdh »

Visited http://ysoccer.sourceforge.net/dloads.htm and downloaded "Mac OS X (java included)" from https://sourceforge.net/projects/ysocce ... p/download, but it fails to run:

Code: Select all

$ ./ysoccer
Using bundle resource folder [1]: /Users/wdh/Downloads/ysoccer19_macosx/Contents/Resources/[ysoccer]
Loading JVM runtime library ...
Passing VM options ...
  # -Xmx1G
Creating Java VM ...
Passing command line arguments ...
Loading JAR file ...
Invoking static com.ygames.ysoccer.desktop.DesktopLauncher.main() function ...
AL lib: (WW) FreeDevice: (0x7fabc11b1000) Deleting 12 Buffer(s)
Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: Error creating controller manager: com.badlogic.gdx.controllers.desktop.DesktopControllerManager
	at com.badlogic.gdx.controllers.Controllers.initialize(Controllers.java:120)
	at com.badlogic.gdx.controllers.Controllers.getControllers(Controllers.java:51)
	at com.ygames.ysoccer.framework.GLGame.reloadInputDevices(GLGame.java:218)
	at com.ygames.ysoccer.framework.GLGame.create(GLGame.java:63)
	at com.ygames.ysoccer.YSoccer.create(YSoccer.java:11)
	at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:151)
	at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:128)
Caused by: com.badlogic.gdx.utils.GdxRuntimeException: Couldn't load shared library 'libgdx-controllers-desktop64.dylib' for target: Mac OS X, 64-bit
	at com.badlogic.gdx.utils.SharedLibraryLoader.load(SharedLibraryLoader.java:125)
	at com.badlogic.gdx.controllers.desktop.DesktopControllerManager.<init>(DesktopControllerManager.java:31)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at java.lang.Class.newInstance(Class.java:442)
	at com.badlogic.gdx.utils.reflect.ClassReflection.newInstance(ClassReflection.java:93)
	at com.badlogic.gdx.controllers.Controllers.initialize(Controllers.java:118)
	... 6 more
Caused by: com.badlogic.gdx.utils.GdxRuntimeException: java.lang.UnsatisfiedLinkError: /private/var/folders/wh/scnmltbn573dq1j0bb7j37p00000gn/T/libgdxwdh/be43d614/libgdx-controllers-desktop64.dylib: dlopen(/private/var/folders/wh/scnmltbn573dq1j0bb7j37p00000gn/T/libgdxwdh/be43d614/libgdx-controllers-desktop64.dylib, 1): Symbol not found: __objc_empty_cache
  Referenced from: /private/var/folders/wh/scnmltbn573dq1j0bb7j37p00000gn/T/libgdxwdh/be43d614/libgdx-controllers-desktop64.dylib
  Expected in: /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices

	at com.badlogic.gdx.utils.SharedLibraryLoader.loadFile(SharedLibraryLoader.java:321)
	at com.badlogic.gdx.utils.SharedLibraryLoader.load(SharedLibraryLoader.java:121)
	... 14 more
Caused by: java.lang.UnsatisfiedLinkError: /private/var/folders/wh/scnmltbn573dq1j0bb7j37p00000gn/T/libgdxwdh/be43d614/libgdx-controllers-desktop64.dylib: dlopen(/private/var/folders/wh/scnmltbn573dq1j0bb7j37p00000gn/T/libgdxwdh/be43d614/libgdx-controllers-desktop64.dylib, 1): Symbol not found: __objc_empty_cache
  Referenced from: /private/var/folders/wh/scnmltbn573dq1j0bb7j37p00000gn/T/libgdxwdh/be43d614/libgdx-controllers-desktop64.dylib
  Expected in: /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices

	at java.lang.ClassLoader$NativeLibrary.load(Native Method)
	at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
	at java.lang.Runtime.load0(Runtime.java:810)
	at java.lang.System.load(System.java:1086)
	at com.badlogic.gdx.utils.SharedLibraryLoader.loadFile(SharedLibraryLoader.java:327)
	at com.badlogic.gdx.utils.SharedLibraryLoader.loadFile(SharedLibraryLoader.java:296)
	... 15 more
Destroyed Java VM ...
Also tried "Platform indipendent (requires java)" from https://sourceforge.net/projects/ysocce ... p/download, similar result:

Code: Select all

$ java -jar ysoccer.jar
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.lwjgl.LWJGLUtil$3 (file:/Users/wdh/Downloads/ysoccer19/ysoccer.jar) to method java.lang.ClassLoader.findLibrary(java.lang.String)
WARNING: Please consider reporting this to the maintainers of org.lwjgl.LWJGLUtil$3
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
AL lib: (WW) FreeDevice: (0x7fdd638eb200) Deleting 12 Buffer(s)
Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: Error creating controller manager: com.badlogic.gdx.controllers.desktop.DesktopControllerManager
	at com.badlogic.gdx.controllers.Controllers.initialize(Controllers.java:120)
	at com.badlogic.gdx.controllers.Controllers.getControllers(Controllers.java:51)
	at com.ygames.ysoccer.framework.GLGame.reloadInputDevices(GLGame.java:218)
	at com.ygames.ysoccer.framework.GLGame.create(GLGame.java:63)
	at com.ygames.ysoccer.YSoccer.create(YSoccer.java:11)
	at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:151)
	at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:128)
Caused by: com.badlogic.gdx.utils.GdxRuntimeException: Couldn't load shared library 'libgdx-controllers-desktop64.dylib' for target: Mac OS X, 64-bit
	at com.badlogic.gdx.utils.SharedLibraryLoader.load(SharedLibraryLoader.java:125)
	at com.badlogic.gdx.controllers.desktop.DesktopControllerManager.<init>(DesktopControllerManager.java:31)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
	at java.base/java.lang.reflect.ReflectAccess.newInstance(ReflectAccess.java:166)
	at java.base/jdk.internal.reflect.ReflectionFactory.newInstance(ReflectionFactory.java:404)
	at java.base/java.lang.Class.newInstance(Class.java:591)
	at com.badlogic.gdx.utils.reflect.ClassReflection.newInstance(ClassReflection.java:93)
	at com.badlogic.gdx.controllers.Controllers.initialize(Controllers.java:118)
	... 6 more
Caused by: com.badlogic.gdx.utils.GdxRuntimeException: java.lang.UnsatisfiedLinkError: /private/var/folders/wh/scnmltbn573dq1j0bb7j37p00000gn/T/libgdxwdh/be43d614/libgdx-controllers-desktop64.dylib: dlopen(/private/var/folders/wh/scnmltbn573dq1j0bb7j37p00000gn/T/libgdxwdh/be43d614/libgdx-controllers-desktop64.dylib, 1): Symbol not found: __objc_empty_cache
  Referenced from: /private/var/folders/wh/scnmltbn573dq1j0bb7j37p00000gn/T/libgdxwdh/be43d614/libgdx-controllers-desktop64.dylib
  Expected in: /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices

	at com.badlogic.gdx.utils.SharedLibraryLoader.loadFile(SharedLibraryLoader.java:321)
	at com.badlogic.gdx.utils.SharedLibraryLoader.load(SharedLibraryLoader.java:121)
	... 16 more
Caused by: java.lang.UnsatisfiedLinkError: /private/var/folders/wh/scnmltbn573dq1j0bb7j37p00000gn/T/libgdxwdh/be43d614/libgdx-controllers-desktop64.dylib: dlopen(/private/var/folders/wh/scnmltbn573dq1j0bb7j37p00000gn/T/libgdxwdh/be43d614/libgdx-controllers-desktop64.dylib, 1): Symbol not found: __objc_empty_cache
  Referenced from: /private/var/folders/wh/scnmltbn573dq1j0bb7j37p00000gn/T/libgdxwdh/be43d614/libgdx-controllers-desktop64.dylib
  Expected in: /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices

	at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
	at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2440)
	at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2497)
	at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2694)
	at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2627)
	at java.base/java.lang.Runtime.load0(Runtime.java:744)
	at java.base/java.lang.System.load(System.java:1873)
	at com.badlogic.gdx.utils.SharedLibraryLoader.loadFile(SharedLibraryLoader.java:327)
	at com.badlogic.gdx.utils.SharedLibraryLoader.loadFile(SharedLibraryLoader.java:296)
	... 17 more
Any ideas?
Massimo32
Chapman's successor
Chapman's successor
Posts: 855
Joined: Wed Dec 29, 2004 1:14 pm
Location: Turin, Italy

Re: YSoccer 19 fails to start on Mac OS 10.13.6

Post by Massimo32 »

wdh wrote:Visited http://ysoccer.sourceforge.net/dloads.htm and downloaded "Mac OS X (java included)" from https://sourceforge.net/projects/ysocce ... p/download, but it fails to run:
...
Any ideas?
Hi wdh, I found this:
https://stackoverflow.com/questions/142 ... ontrollers
wdh
Someone..
Posts: 4
Joined: Sat Apr 18, 2020 3:36 pm

Re: YSoccer 19 fails to start on Mac OS 10.13.6

Post by wdh »

It's finding the libgdx library ok, the problem looks to be the missing symbol "__objc_empty_cache".

I found a similar issue in an unrelated project, affecting the same MacOS version - see https://forum.lazarus.freepascal.org/in ... 9.msg.html - this suggests a tweak to the compile options may be required:
On macOS versions before 10.14, that symbol is in libobjc rather than in CoreFoundation.
Perhaps this is really an issue for the libgdx maintainers, but the thread has the details for what was done to resolve it in the other project.

Is there any way to tell ysoccer not to load libgdx at startup, or to load an older version?
Massimo32
Chapman's successor
Chapman's successor
Posts: 855
Joined: Wed Dec 29, 2004 1:14 pm
Location: Turin, Italy

Re: YSoccer 19 fails to start on Mac OS 10.13.6

Post by Massimo32 »

wdh wrote:It's finding the libgdx library ok, the problem looks to be the missing symbol "__objc_empty_cache".

I found a similar issue in an unrelated project, affecting the same MacOS version - see https://forum.lazarus.freepascal.org/in ... 9.msg.html - this suggests a tweak to the compile options may be required:
On macOS versions before 10.14, that symbol is in libobjc rather than in CoreFoundation.
Perhaps this is really an issue for the libgdx maintainers, but the thread has the details for what was done to resolve it in the other project.

Is there any way to tell ysoccer not to load libgdx at startup, or to load an older version?
Unfortunately I don't have a Mac, and I cannot replicate the bug.
But the source code is fully available. If another developer can find a fix, I can add it.
Libgdx is necessary for the game.
wdh
Someone..
Posts: 4
Joined: Sat Apr 18, 2020 3:36 pm

Re: YSoccer 19 fails to start on Mac OS 10.13.6

Post by wdh »

I did try to build it myself and while it seemed to succeed, I ended up without a "ysoccer" executable. Not familiar with gradle etc to I don't really know what I'm looking at - if you could share any notes on what you do to build the various versions it would be great :)

In the meantime, I confirm that updating to MacOS Mojave (10.14.6) resolves the issue. It would be worth adding a note to the download page to mention that anyone on MacOS will probably require at least Mojave to run the game.

Thanks
Massimo32
Chapman's successor
Chapman's successor
Posts: 855
Joined: Wed Dec 29, 2004 1:14 pm
Location: Turin, Italy

Re: YSoccer 19 fails to start on Mac OS 10.13.6

Post by Massimo32 »

wdh wrote:I did try to build it myself and while it seemed to succeed, I ended up without a "ysoccer" executable. Not familiar with gradle etc to I don't really know what I'm looking at - if you could share any notes on what you do to build the various versions it would be great :)

In the meantime, I confirm that updating to MacOS Mojave (10.14.6) resolves the issue. It would be worth adding a note to the download page to mention that anyone on MacOS will probably require at least Mojave to run the game.

Thanks
Thanks for the info, I will add the note.

Regarding building from source, this page may be of help:
https://libgdx.badlogicgames.com/docume ... gging.html
wdh
Someone..
Posts: 4
Joined: Sat Apr 18, 2020 3:36 pm

Re: YSoccer 19 fails to start on Mac OS 10.13.6

Post by wdh »

I meant notes on how you guys build ysoccer, not libgdx - sorry if I did not make that clear.

Just running ./gradlew build worked, but left me without a ysoccer or ysoccer.jar so there must be something I've missed.
Massimo32
Chapman's successor
Chapman's successor
Posts: 855
Joined: Wed Dec 29, 2004 1:14 pm
Location: Turin, Italy

Re: YSoccer 19 fails to start on Mac OS 10.13.6

Post by Massimo32 »

wdh wrote:I meant notes on how you guys build ysoccer, not libgdx - sorry if I did not make that clear.

Just running ./gradlew build worked, but left me without a ysoccer or ysoccer.jar so there must be something I've missed.
At the bottom of the page:
./gradlew desktop:run
Post Reply