NullJavaAI fails to load

NullJavaAI fails to load

Discuss your problems with the latest release of the engine here. Problems with games, maps or other utilities belong in their respective forums.

Moderator: Moderators

Post Reply
User avatar
PauloMorfeo
Posts: 2004
Joined: 15 Dec 2004, 20:53

NullJavaAI fails to load

Post by PauloMorfeo »

Hi,

When trying to run SpringRTS with the Java Null AI (note: not Java Null OO AI), spring crashes at start.

# Ubuntu LTS 12.04
# Spring install is standard Ubuntu Software Center's.
# I tried spawning SpringRTS from the standard SpringLobby
# I was running Kernel Panic 4.6
# With a bot NullJavaAI

I get this error:

Code: Select all

luaParser.Execute() failed: could not open file: /usr/lib/spring/AI/Skirmish/KAIK/0.13/AIInfo.lua
(KAIK!?)
This command works properly as my user (so the file exists, path is ok and file permissions are ok):

Code: Select all

nano /usr/lib/spring/AI/Skirmish/KAIK/0.13/AIInfo.lua
The installation of Spring is pretty standard with a minor modification.
- I installed Spring+Kernel Panic from Ubuntu Software Center (files are installed into /user/etc with root permissions).
- Deleted manually the /usr/.../Mod and /usr/.../Maps content.
- Copied to ~./spring/games and .../maps the content in Kernel Panic's 4.6 download.


Any other info that might be useful? Log files or whatever?
Maybe it's just a deprecated AI - maybe it should just be removed from Spring?

Another note: Java Null OO AI works fine and none of this is hampering my work or play.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: NullJavaAI fails to load

Post by abma »

# Spring install is standard Ubuntu Software Center's.
which version? infolog.txt would be VERY useful.
User avatar
PauloMorfeo
Posts: 2004
Joined: 15 Dec 2004, 20:53

Re: NullJavaAI fails to load

Post by PauloMorfeo »

Can you point me to the path of "infolog.txt"?
I couldn't find nothing remotely similar to a log file in ~./spring.

When I login to Spring's main server through the lobby I get a warning that current SpringRTS version is 96 while I'm running 95, thus unable to play multiplayer. Is this version what you asked?
Is there a more authoritative way to find out the engine's version?
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: NullJavaAI fails to load

Post by abma »

http://springrts.com/wiki/Infolog.txt

when its not in ~/.spring/infolog.txt then maybe in ~/.spring/engine/<version>/infolog.txt

you should use at least spring 96.0 when running with java null ai. if possible then run the latest development version of spring which is 97.0.1-460-g5ba5f63 atm.
User avatar
PauloMorfeo
Posts: 2004
Joined: 15 Dec 2004, 20:53

Re: NullJavaAI fails to load

Post by PauloMorfeo »

Hmm, no such file nor folder "engine"...
I reckon it must be keeping it somewhere as root, probably somewhere inside the /usr/... maze!?

Code: Select all

paulo@P170SM:~$ cd ~/.spring
paulo@P170SM:~/.spring$ ls
cache  games  lobby  maps  mods  uikeys.txt  unitsync.log
User avatar
qray
Posts: 377
Joined: 02 Feb 2009, 18:49

Re: NullJavaAI fails to load

Post by qray »

Since abma advised to use newer spring (at least 96):
I run under Ubuntu LTS 12.04 the static binary from spring 96 without problems:
32bit or 64bit

Download, unpack in a directory of your taste and point springlobby under edit->preferences->spring to use the executable ("spring") and unitsync library ("libunitsync.so") in this folder. The infolog.txt should then appear after the first start in the same folder of the static spring (it's at least there on my system).

Have not been able so far to run latest dev version under this distro version due to dependencies (might nevertheless be possible with some work...).
User avatar
qray
Posts: 377
Joined: 02 Feb 2009, 18:49

Re: NullJavaAI fails to load

Post by qray »

I just checked: infolog.txt from spring 95 is here under ~/.config/spring
User avatar
PauloMorfeo
Posts: 2004
Joined: 15 Dec 2004, 20:53

Re: NullJavaAI fails to load

Post by PauloMorfeo »

qray wrote:I just checked: infolog.txt from spring 95 is here under ~/.config/spring
That's it! Thanks.

Though, I can't replicate the issue, now...
I'm pretty sure I selected that mod (the only one I have), one of the maps I tried to replicate with, and sure about NullJavaAI (because I saw mention to KAIK in the error msg and confirmed it twice).

Meh, whatever...

---

By the way, I'm sorry but my original post has an incorrection - I forgot about something.
I did install from Ubuntu Software Center but it was terribly outdated. Lobby was reporting v85.
So I looked around and found:
http://springrts.com/wiki/Ubuntu_install
And followed those instructions. Basically:

Code: Select all

sudo add-apt-repository ppa:spring
sudo apt-get update
sudo apt-get install spring
User avatar
PauloMorfeo
Posts: 2004
Joined: 15 Dec 2004, 20:53

Re: NullJavaAI fails to load

Post by PauloMorfeo »

I'm having another crash, now, unrelated to the original post.
I'm not sure whether I should create a new thread (here or in Kernel Panic's forum or) or if I should just stick with this thread.

Everytime I try to play the map "Hex Farm 7" the game either hangs or crashes after the step "Finalizing".

infolog.txt:

Code: Select all

...
[f=0000000] Initializing PathCache
[f=0000000] Finalizing
[f=0000000] Error: [CreateProgramObject] Tried to create "DecalShaderARB" a ARB shader program on hardware w/o support for it!
[f=0000000] Error: [CreateProgramObject] Tried to create "DecalShaderGLSL" a GLSL shader program on hardware w/o support for it!
[f=0000000] Loaded DecalsDrawer: Legacy
[f=0000000] Error: Aborted (SIGABRT) in spring 95.0
[f=0000000] Error: Stacktrace:
[f=0000000] Error:   <0> /lib/x86_64-linux-gnu/libpthread.so.0(+0xfcb0) [0x7fb3f8ce7cb0]
...
infolog.txt
(18.95 KiB) Downloaded 4 times
Could it be my drivers don't have support for 2 of the GFX functions trying to be used?
I'm using a modern machine with a GeForce GTX 770M and NVidia's proprietary drivers (though the Linux drivers are well known to lag behind full potential)...
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: NullJavaAI fails to load

Post by abma »

first you are using the intel gfx:
[f=0000000] GL renderer: Mesa DRI Intel(R) Haswell Mobile
second you are still using spring 95.0.

and oops, true, infolog.txt is in ~/.config/spring/infolog.txt, i've fixed the wiki page.
User avatar
PauloMorfeo
Posts: 2004
Joined: 15 Dec 2004, 20:53

Re: NullJavaAI fails to load

Post by PauloMorfeo »

abma wrote:first you are using the intel gfx:
...
Doh!!! Of course I forgot! My laptop has that "Optimus" crap and will always use the Intel GFX be default unless I start the program through "optimus" or "primus".
(still nice to know it achieves good performance and graphics with it even though it's crashing at that.)
Ex:

Code: Select all

primusrun steam steam://rungameid/212680
Instead of

Code: Select all

steam steam://rungameid/212680
Do you have any idea how I can make the lobby start Spring indirectly through primusrun?

abma wrote:... you are still using spring 95.0.
I haven't yet bothered with upgrading to 96, since I've been busy with experimenting with the AI things. Do you think it is really important to upgrade to 96 for that? As in, do you know to exist differences in the way spring exposes itself to the AIs or how it uses them?
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: NullJavaAI fails to load

Post by abma »

Do you have any idea how I can make the lobby start Spring indirectly through primusrun?
springlobby doesn't directly support primusrun. you can create a wrapper script like this which you use as executable for spring:
  • #!/bin/sh
    exec prismrun /path/to/spring $@
PauloMorfeo wrote:I haven't yet bothered with upgrading to 96, since I've been busy with experimenting with the AI things. Do you think it is really important to upgrade to 96 for that? As in, do you know to exist differences in the way spring exposes itself to the AIs or how it uses them?
YES! spring 95.0 crashes a lot more!
PauloMorfeo wrote:As in, do you know to exist differences in the way spring exposes itself to the AIs or how it uses them?
no, how ai's are loaded didn't change for a VERY long time. maybe i don't understand your question, not sure.
User avatar
PauloMorfeo
Posts: 2004
Joined: 15 Dec 2004, 20:53

Re: NullJavaAI fails to load

Post by PauloMorfeo »

qray wrote:Since abma advised to use newer spring (at least 96):
I run under Ubuntu LTS 12.04 the static binary from spring 96 without problems:
32bit or 64bit

Download, unpack in a directory of your taste and point springlobby under edit->preferences->spring to use the executable ("spring") and unitsync library ("libunitsync.so") in this folder. The infolog.txt should then appear after the first start in the same folder of the static spring (it's at least there on my system).
...
Dam, it isn't working...

I changed SpringLobby to use the 2 binaries in the 32b version and the lobby replied it couldn't load libunitsync.so. Fair enough, I thought, since I'm using 64b (though I thought it would be backward-compatible...).

Then I changed to the 64b binaries - SpringLobby crashed and now won't even open the GUI. The process starts, I see it in "ps -aux" but no GUI shows up. I can't find any log file for SpringLobby (to try and catch an error msg) nor can I find its configs file, to revert it...

---
EDIT
Ok, reverting it was easy enough. I changed the path of the "static" spring folder, so the Lobby no longer could find the binaries and hang trying to use them. I'm now back to the version from the Repo.
User avatar
PauloMorfeo
Posts: 2004
Joined: 15 Dec 2004, 20:53

Re: NullJavaAI fails to load

Post by PauloMorfeo »

abma wrote:...
springlobby doesn't directly support primusrun. you can create a wrapper script like this which you use as executable for spring:
  • #!/bin/sh
    exec prismrun /path/to/spring $@
...
That worked. Thanks! The speed with which it now loads the last parts of the "loading" are now so fast that at the first time I thought it crashed and I was going to see the desktop again.

Though, the map "Hex Farm 7" still doesn't work...
infolog.txt
(16.84 KiB) Downloaded 8 times
I'm sorry but I still haven't managed to use the new engine v96, so I'm still attempting with v95.

---
EDIT
By the way, when running under "primusrun" using the NVidia card this bug (the LUA GUI not accepting my mouse's clicks) appears to no longer exist:
http://springrts.com/phpbb/viewtopic.php?f=43&t=32594
User avatar
qray
Posts: 377
Joined: 02 Feb 2009, 18:49

Re: NullJavaAI fails to load

Post by qray »

PauloMorfeo wrote: Then I changed to the 64b binaries - SpringLobby crashed and now won't even open the GUI. The process starts, I see it in "ps -aux" but no GUI shows up. I can't find any log file for SpringLobby (to try and catch an error msg) nor can I find its configs file, to revert it...
If you feel like trying again: have you tried to start springlobby from the command line? Maybe you get then some error messages that could lead the way to the error...
(I get here on the command line some Gtk-CRITICAL/Gtk-WARNING and GLib-GObject-CRITICAL/GLib-GObject-WARNING messages, but it nevertheless works fine.)

And you could try -if you want to follow this up- to start spring v96 directly from the command line without lobby. Just to see, if the installation runs fine. You get then some basic menu from where you can choose game, map etc. and start a game.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: NullJavaAI fails to load

Post by abma »

I changed SpringLobby to use the 2 binaries in the 32b version and the lobby replied it couldn't load libunitsync.so. Fair enough, I thought, since I'm using 64b (though I thought it would be backward-compatible...).
if springlobby is 32 bit, spring has to be 32 bit, too. the same for 64 bit. if you mix this, it won't work! also you should use 96.0 as it contains a lot of fixes related to GFX crashes if i remember right...

i will ignore any further posts about problems with spring 95.0, i wrote it 3 times (?) that you should update first!
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: NullJavaAI fails to load

Post by abma »

PauloMorfeo wrote:https://answers.launchpad.net/ubuntu/+q ... 378/+index
whats the relation to this thread here?
Post Reply

Return to “Help & Bugs”