MegaGlest Forum

Archives (read only) => Glest Advanced Engine => General discussion => Topic started by: tomreyn on 31 May 2011, 02:11:53

Title: 0.3-716-g3a95bca: Trouble with military mod 7z archive in addons directory
Post by: tomreyn on 31 May 2011, 02:11:53
I just downloaded the current version of the military mod from http://www.filefront.com/17201774/military_24_files.7z placed the downloaded file at ~.glestae/addons/military_24_files.7z.

When I run 7z t military_24_files.7z it reports (as the final summary):
Code: [Select]
Everything is Ok

Folders: 207
Files: 1000
Size:       118505942
Compressed: 34690675

Before I placed this file there GAE started fine. When I start GAE now, I get a black screen for ~2 minutes, then this message is printed to console:
Code: [Select]
[/home/tomreyn/.glestae] is in the search path.
[/home/tomreyn/.glestae/addons/military_24_files.7z] is in the search path.
[/home/tomreyn/.glestae/addons/project_red] is in the search path.
[/home/tomreyn/.glestae/addons/project_red_extras] is in the search path.
[/home/tomreyn/SCM/glestae/data/game] is in the search path.
config-dir: /home/tomreyn/.glestae
data-dir: /home/tomreyn/SCM/glestae/data/game

Exception: An error occurred loading core data.
Please see /home/tomreyn/.glestaeglestadv-error.log

Of course /home/tomreyn/.glestaeglestadv-error.log does not exist but /home/tomreyn/.glestae/glestadv-error.log does and was actually written to:
Code: [Select]
Glest Advanced Engine: Error log file. 31-May-2011_03-46-33

Error loading core data.
ov_open_callback failed on ogg file: data/core/menu/music/menu_music.ogg
An error occurred loading core data.
Please see /home/tomreyn/.glestaeglestadv-error.log

So this log file tells me I should look at it. ;-)

Is it wrong to expect that GAE should be able to handle a 7z file placed in the addons-directory? Does this only work for ZIP files? If so, should GAE not try to handle this situation more gracefully?
Title: Re: 0.3-716-g3a95bca: Trouble with military mod 7z archive in addons directory
Post by: tomreyn on 31 May 2011, 04:09:06
It later turned out that the military mod is actually not packaged as a mod but it is a complete distribution of (a now outdated version of) GAE including binaries for windows and linux32.  The file I downloaded was the OS-Independant 7zip Archive (33.0 MB) (http://military.glestguide.co.cc/download.html).

So this file could not work within the addons directory. However, GAE should have reported its findings to the user, and not have run into an exception.
Title: Re: 0.3-716-g3a95bca: Trouble with military mod 7z archive in addons directory
Post by: Omega on 31 May 2011, 05:42:16
Yep, that version of Military is just standalone. The current in-development version is an addon. I don't have an addon download available, since it's not done yet, but I suppose I may as well share the dropbox link...

Don't bother criticizing it, I just noticed that it was mentioned in the mailing list, and the current version, which uses many more GAE features such as transports, may be of more use for testing.

Edit: Eh? Don't seem to be able to share an entire folder in the public folder... just individual files... Probably will have to re-upload a 7zip...
Title: Re: 0.3-716-g3a95bca: Trouble with military mod 7z archive in addons directory
Post by: tomreyn on 31 May 2011, 13:57:48
I'd appreciate a 7zip archive which has been tested to work if just placed in the addons directory.

There was some discussion of 7zip's solid mode on IRC yesterday which may be important to be aware of when packaging, which you probably missed:

Code: [Select]
<softcoder> could it be that the 7z is not compressed right for phys?
<softcoder> I think there is a compression style called solid
<softcoder> that messes up with physfs?
<silnarm> this is possible, but I'd have thought omega would get it right...
<silnarm> yeah, needs to be non-solid
<silnarm> or may not need to be actually, might just be very poor performance if solid.

I then looked into the old (and also latest stable) version of Military I had downloaded:

Code: [Select]
$ 7z l military_24_files.7z | fgrep Solid
Solid = +

Looks like it's solid. And this seems to be the default mode (http://docs.bugaco.com/7zip/MANUAL/switches/method.htm#Solid) for 7-Zip. It definitely is in my version, 7-Zip 9.04 beta, which comes with Ubuntu 11.04 (latest stable release). So it should probably be pointed out to modders (both now and in the future) that they need to use a non-standard 7zip option to package their mods.
Title: Re: 0.3-716-g3a95bca: Trouble with military mod 7z archive in addons directory
Post by: Omega on 31 May 2011, 14:09:22
Addon: http://dl.dropbox.com/u/27984076/Military_3_beta.7z

And I am well aware that the last version was solid. I repeat, it is *NOT* an addon, so I did not bother to make it non-solid. That is only necessary when the mod is an addon, as solid will further decrease the filesize.
Title: Re: 0.3-716-g3a95bca: Trouble with military mod 7z archive in addons directory
Post by: tomreyn on 31 May 2011, 15:00:37
Thanks for the quick response an for repackaging your mod, Omega.

It seems like GAE does now able to load the data, which it confirms with a crash:

Code: [Select]
$ cat ../gae-crash.txt
Crash
Version: Advanced Engine git-master 0.3-716-g3a95bca
Built: Tue May 31 00:41:54 CEST 2011
Time: Tue May 31 16:45:35 2011
Description: SIGSEGV: address not mapped to object
Address: 0
Backtrace:
./build/source/game/glestadv(_ZN6Shared8Platform24PlatformExceptionHandler7handlerEiP7siginfoPv+0xf7) [0x71ae57]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xfc60) [0x7f2a5cb99c60]
./build/source/game/glestadv(_ZN5Glest7Widgets14TextRenderInfoC1ERKSsiiRKN6Shared4Math4Vec2IiEE+0x61) [0x6820c1]
./build/source/game/glestadv(_ZN5Glest7Widgets10TextWidget7setTextERKSsi+0xb3) [0x68ccb3]
./build/source/game/glestadv(_ZN5Glest4Menu9MenuStateC1ERNS_4Main7ProgramEPNS0_8MainMenuE+0xac) [0x5a26ac]
./build/source/game/glestadv(_ZN5Glest4Menu13MenuStateRootC1ERNS_4Main7ProgramEPNS0_8MainMenuE+0x23) [0x597233]
./build/source/game/glestadv(_ZN5Glest4Menu8MainMenuC1ERNS_4Main7ProgramEb+0xc1) [0x5a1501]
./build/source/game/glestadv(_ZN5Glest4Main7Program4initEv+0xbf6) [0x58fcf6]
./build/source/game/glestadv(_ZN5Glest4Main9glestMainEiPPc+0x308) [0x589e98]
./build/source/game/glestadv(main+0x35) [0x58a495]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xff) [0x7f2a5ac72eff]
./build/source/game/glestadv() [0x4cb409]
Title: Re: 0.3-716-g3a95bca: Trouble with military mod 7z archive in addons directory
Post by: Omega on 31 May 2011, 15:49:30
Didn't have time to narrow it down further, but deleting all but the techs folder let it work. Doesn't seem to support all the modified folders... Uh oh...
Title: Re: 0.3-716-g3a95bca: Trouble with military mod 7z archive in addons directory
Post by: silnarm on 31 May 2011, 21:08:24
There was a very incomplete widget.cfg in there causing the crash.  Besides that it wont load because of changes required to cloaks/detectors.  It's a bit hard for Omega to provide a git compatible addon as he doesn't build himself ;)

I've taken the liberty of fixing things up to work with git-master (and hence 0.4 beta2, and hopefully also 0.4 proper...)
http://sourceforge.net/projects/glestae/files/military/military3-beta.zip/download

@Omega, 'in this zip':
 - deleted widget.cfg (was missing vital functions)
 - added cloak group 'stealth' to stealth_bomber cloak node & aa-launcher detector node.
 - rename defeat messages and global lang file (should be 'en.lng')
also,
 - probably best not to distribute shaders, you may override newer ones.