Re: [Warzone-dev] error: Registry file config is empty!

2007-03-17 Thread vs2k5
On Fri, 16 Mar 2007 22:03:03 -0400 Giel van Schijndel 
[EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] schreef:
 On Fri, 16 Mar 2007 19:04:01 -0400 Dennis Schridde 
[EMAIL PROTECTED] wrote:
   
 Am Freitag, 16. März 2007 schrieb [EMAIL PROTECTED]:
 
 I download ubuntu edgy 6.10 to see warzone on its.
 I do compile as COMPILE file say.
 Then do make install.

 When game run, I get,
 error:  Registry file config is empty!
 Saved dump file to '/tmp/warzone2100.gdmp'
 Segmentation fault (core dumped)
   
 1st: Send the dumpfile it speaks about.
 
 To who?  
   
As an _attachment_ to the mailinglist. Yes I saw your two follow-
up
mails with dump in it, having it as an attachment IMO really is
nicer/easier.

OK, will do that from now on.


 3rd: This bug is supposed to show up only on Windows...
 
 I never have this bug on window, I now do in linux.
   
Confirmed, I yesterday compiled WZ on edgy 6.10 as well (amd64 so 
I
first figured that might be the cause). It only generates the 
empty
registry file error on first run (when there is no file, in which 
case
it will create an empty one) and when the file is empty. Simply 
copying
my windows config file fixes it.

So just to be clear: I never ever could reproduce this on M$Win on
GNU/Linux however I have more trouble preventing it from occuring.
 4th: Check whether the config file is really emtpy
 
 I look in ./warzone2100 and config file.  It is empty.
   
 5th: Check whether it gets recreated successfully after 
deleting 
 it
 
 It still empty.
   
Confirmed: It indeed does get created, just empty however.
 Also in README, it say Once the game is installed (see INSTALL 
in 
 this directory)
 There is no INSTALL file ?
Well, that documentation really is erm, outdated AFAIK.

I thought that was issue, and I did something wrong.  Nice to know 
this bug happens to others. 

In loadConfig() It calls openWarzoneKey(), it always return true.  
Even if error on registry_load() call on line 192 in configfile.c
...
debug(LOG_WZ, Parsing the registry from %s, filename);
if (filesize == 0 || strlen(bptr) == 0) {
debug(LOG_ERROR, Registry file %s is empty!, filename);
return FALSE;
...
In openWarzoneKey(), if registry_load() fails, it should init the 
config file yes?

In linux, is there good debugger like MSVS2005 has? 

--
Click for free info on online masters degrees and make $150K/ year
http://tagline.hushmail.com/fc/CAaCXv1S74uCj4l9AqbTkrBEKboVNVlS/




___
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev


Re: [Warzone-dev] error: Registry file config is empty!

2007-03-17 Thread Dennis Schridde
Am Samstag, 17. März 2007 schrieb [EMAIL PROTECTED]:
 On Fri, 16 Mar 2007 22:03:03 -0400 Giel van Schijndel

 [EMAIL PROTECTED] wrote:
 [EMAIL PROTECTED] schreef:
  On Fri, 16 Mar 2007 19:04:01 -0400 Dennis Schridde
 
 [EMAIL PROTECTED] wrote:
  Am Freitag, 16. März 2007 schrieb [EMAIL PROTECTED]:
  I download ubuntu edgy 6.10 to see warzone on its.
  I do compile as COMPILE file say.
  Then do make install.
 
  When game run, I get,
  error:  Registry file config is empty!
  Saved dump file to '/tmp/warzone2100.gdmp'
  Segmentation fault (core dumped)
 
  1st: Send the dumpfile it speaks about.
 
  To who?
 
 As an _attachment_ to the mailinglist. Yes I saw your two follow-
 up
 mails with dump in it, having it as an attachment IMO really is
 nicer/easier.

 OK, will do that from now on.

  3rd: This bug is supposed to show up only on Windows...
 
  I never have this bug on window, I now do in linux.
 
 Confirmed, I yesterday compiled WZ on edgy 6.10 as well (amd64 so
 I
 first figured that might be the cause). It only generates the
 empty
 registry file error on first run (when there is no file, in which
 case
 it will create an empty one) and when the file is empty. Simply
 copying
 my windows config file fixes it.
 
 So just to be clear: I never ever could reproduce this on M$Win on
 GNU/Linux however I have more trouble preventing it from occuring.
 
  4th: Check whether the config file is really emtpy
 
  I look in ./warzone2100 and config file.  It is empty.
 
  5th: Check whether it gets recreated successfully after
 
 deleting
 
  it
 
  It still empty.
 
 Confirmed: It indeed does get created, just empty however.
 
  Also in README, it say Once the game is installed (see INSTALL
 
 in
 
  this directory)
  There is no INSTALL file ?
 
 Well, that documentation really is erm, outdated AFAIK.

 I thought that was issue, and I did something wrong.  Nice to know
 this bug happens to others.

 In loadConfig() It calls openWarzoneKey(), it always return true.
 Even if error on registry_load() call on line 192 in configfile.c
 ...
   debug(LOG_WZ, Parsing the registry from %s, filename);
   if (filesize == 0 || strlen(bptr) == 0) {
   debug(LOG_ERROR, Registry file %s is empty!, filename);
   return FALSE;
 ...
 In openWarzoneKey(), if registry_load() fails, it should init the
 config file yes?

 In linux, is there good debugger like MSVS2005 has?
Of course there is! - GDB


pgppIYB8WTRE2.pgp
Description: PGP signature
___
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev


Re: [Warzone-dev] error: Registry file config is empty!

2007-03-17 Thread Giel van Schijndel
[EMAIL PROTECTED] schreef:
 I thought that was issue, and I did something wrong.  Nice to know 
 this bug happens to others.
   
You mean the empty config file I assume? Yep it does happen to others
(i.e. me).
 In loadConfig() It calls openWarzoneKey(), it always return true.  
 Even if error on registry_load() call on line 192 in configfile.c
 ...
   debug(LOG_WZ, Parsing the registry from %s, filename);
   if (filesize == 0 || strlen(bptr) == 0) {
   debug(LOG_ERROR, Registry file %s is empty!, filename);
   return FALSE;
 ...
 In openWarzoneKey(), if registry_load() fails, it should init the 
 config file yes?
   
I'm assuming yes, it should fill the config file with default values
then. Still looking into that atm.
 In linux, is there good debugger like MSVS2005 has
Yep, GNU delivers us the GNU DeBugger, also known as gdb (just type
`sudo aptitude install gdb` in a shell console on your ubuntu system, or
install the package `gdb` using your favourite package manager, e.g. adept).

If that is installed (already is installed I think, from looking at your
dumpfile) you can just run warzone in gdb.

To do so, in a terminal emulator, start gdb with the warzone binary as
its argument: e.g. `gdb warzone2100` (when the binary is in your path or
your current directory). Then simply type `run` in the console you'll
get from gdb and type `bt` (shorthand for `backtrace`) or `bt full` when
it crashes.

-- 
Giel



signature.asc
Description: OpenPGP digital signature
___
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev


Re: [Warzone-dev] error: Registry file config is empty!

2007-03-17 Thread vs2k5
On Sat, 17 Mar 2007 13:18:44 -0400 Giel van Schijndel 
[EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] schreef:
 In openWarzoneKey(), if registry_load() fails, it should init 
the 
 config file yes?
   
I'm assuming yes, it should fill the config file with default 
values
then. Still looking into that atm.
 In linux, is there good debugger like MSVS2005 has
Yep, GNU delivers us the GNU DeBugger, also known as gdb (just 
type
`sudo aptitude install gdb` in a shell console on your ubuntu 
system, or
install the package `gdb` using your favourite package manager, 
e.g. adept).

If that is installed (already is installed I think, from looking 
at your
dumpfile) you can just run warzone in gdb.

To do so, in a terminal emulator, start gdb with the warzone 
binary as
its argument: e.g. `gdb warzone2100` (when the binary is in your 
path or
your current directory). Then simply type `run` in the console 
you'll
get from gdb and type `bt` (shorthand for `backtrace`) or `bt 
full` when
it crashes.

-- 
Giel

Thanks for info!  This will help more.

I meant if there was a GUI debugger, I no like command line for 
debug?

I booted back to windows, and found the issue by delete file 
config, and trace to see what it does.

Problem is in configfile.c, registry_save()
for (j = registry[i]; j != NULL; j = j-next) {
 registry[] is nothing!
so ... if (!saveFile(filename, buffer, count) ...
filename =config, buffer is 
ÌÌÌ
ÌÌ (char [8160]), count = 0.

So problem is registry is not initialized, registry_set_key() is 
never called!
Fix is to call that before registry_save() is called if file is 
empty/not found.

--
Click for free info on adult education and start making $150k/ year
http://tagline.hushmail.com/fc/CAaCXv1S62dZP8XooCEoTxQPEbq1dZyW/






___
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev


Re: [Warzone-dev] error: Registry file config is empty! {fixed}

2007-03-17 Thread vs2k5
Ok, I fixed this.

Will upload patch in 1 min.

--
Click for free info on criminal justice degrees and make $150K/ year
http://tagline.hushmail.com/fc/CAaCXv1S4xt2Pqd7cyimrhKY0M300xxc/





___
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev


Re: [Warzone-dev] error: Registry file config is empty! {almosted fixed}

2007-03-17 Thread vs2k5
On Sat, 17 Mar 2007 14:12:09 -0400 [EMAIL PROTECTED] wrote:
Ok, I fixed this.

Will upload patch in 1 min.


No, my patch not work right.  Will have to look at it again when I 
gets back.  Sorry about this.

--
Click for free comparison on adjustable rate home loans, 0 down, low rates
http://tagline.hushmail.com/fc/CAaCXv1KXBYhYfiPV1THYACztCoQEELr/




___
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev


Re: [Warzone-dev] error: Registry file config is empty!

2007-03-16 Thread Dennis Schridde
Am Freitag, 16. März 2007 schrieb [EMAIL PROTECTED]:
 I download ubuntu edgy 6.10 to see warzone on its.
 I do compile as COMPILE file say.
 Then do make install.

 When game run, I get,
 error:  Registry file config is empty!
 Saved dump file to '/tmp/warzone2100.gdmp'
 Segmentation fault (core dumped)
1st: Send the dumpfile it speaks about.
2nd: Send the core file if possible (ziped since it may be large)
3rd: This bug is supposed to show up only on Windows...
4th: Check whether the config file is really emtpy
5th: Check whether it gets recreated successfully after deleting it

--Dennis


pgpQzcxuvTuXo.pgp
Description: PGP signature
___
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev


Re: [Warzone-dev] error: Registry file config is empty!

2007-03-16 Thread vs2k5
On Fri, 16 Mar 2007 19:04:01 -0400 Dennis Schridde 
[EMAIL PROTECTED] wrote:
Am Freitag, 16. März 2007 schrieb [EMAIL PROTECTED]:
 I download ubuntu edgy 6.10 to see warzone on its.
 I do compile as COMPILE file say.
 Then do make install.

 When game run, I get,
 error:  Registry file config is empty!
 Saved dump file to '/tmp/warzone2100.gdmp'
 Segmentation fault (core dumped)
1st: Send the dumpfile it speaks about.

To who?  

2nd: Send the core file if possible (ziped since it may be large)

will send if give me place to send

3rd: This bug is supposed to show up only on Windows...

I never have this bug on window, I now do in linux. 


4th: Check whether the config file is really emtpy
I look in ./warzone2100 and config file.  It is empty.

5th: Check whether it gets recreated successfully after deleting 
it

It still empty.

--Dennis

Also in README, it say Once the game is installed (see INSTALL in 
this directory)
There is no INSTALL file ?

--
Click to get 150,000 in student loans and find the lowest rates
http://tagline.hushmail.com/fc/CAaCXv1QJjVRGE2p2pHGc0MLg11lQ0NY/



___
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev


Re: [Warzone-dev] error: Registry file config is empty! dump file

2007-03-16 Thread vs2k5
On Fri, 16 Mar 2007 19:04:01 -0400 Dennis Schridde 
[EMAIL PROTECTED] wrote:
1st: Send the dumpfile it speaks about.
2nd: Send the core file if possible (ziped since it may be large)
3rd: This bug is supposed to show up only on Windows...
4th: Check whether the config file is really emtpy
5th: Check whether it gets recreated successfully after deleting 
it

--Dennis
The dumpfile is not big, so I send here,
Program command: ./warzone2100
Version: TRUNK
Type: Release
Compiled on: Mar 16 2007

Operating system: Linux
Node name: zap
Release: 2.6.17-11-generic
Version: #2 SMP Thu Feb 1 19:52:28 UTC 2007
Machine: i686

Pointers: 32bit

Dump caused by signal: SIGSEGV: Invalid memory reference: Address 
not mapped to object

GLIBC raw backtrace:
../warzone2100[0x81754cf]
[0xe440]
../warzone2100[0x80fe185]
../warzone2100[0x80a87f4]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xdc)[0xb7b198cc]
../warzone2100[0x804ce41]

GDB extended backtrace:
GNU gdb 6.4.90-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, 
and you are
welcome to change it and/or distribute copies of it under certain 
conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for 
details.
This GDB was configured as i486-linux-gnu...Using host 
libthread_db library /lib/tls/i686/cmov/libthread_db.so.1.

Attaching to program: /home/zap/warzone/warzone/data/warzone2100, 
process 16719
Reading symbols from /usr/lib/libphysfs-1.0.so.0...done.
Loaded symbols for /usr/lib/libphysfs-1.0.so.0
Reading symbols from /usr/lib/libpng12.so.0...done.
Loaded symbols for /usr/lib/libpng12.so.0
Reading symbols from /usr/lib/libjpeg.so.62...done.
Loaded symbols for /usr/lib/libjpeg.so.62
Reading symbols from /usr/lib/libz.so.1...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /lib/tls/i686/cmov/libm.so.6...done.
Loaded symbols for /lib/tls/i686/cmov/libm.so.6
Reading symbols from /usr/lib/libSDL-1.2.so.0...done.
Loaded symbols for /usr/lib/libSDL-1.2.so.0
Reading symbols from /lib/tls/i686/cmov/libpthread.so.0...done.
[Thread debugging using libthread_db enabled]
[New Thread -1226144048 (LWP 16719)]
Loaded symbols for /lib/tls/i686/cmov/libpthread.so.0
Reading symbols from /usr/lib/libSDL_net-1.2.so.0...done.
Loaded symbols for /usr/lib/libSDL_net-1.2.so.0
Reading symbols from /usr/lib/libGL.so.1...done.
Loaded symbols for /usr/lib/libGL.so.1
Reading symbols from /usr/lib/libGLU.so.1...done.
Loaded symbols for /usr/lib/libGLU.so.1
Reading symbols from /usr/lib/libopenal.so.0...done.
Loaded symbols for /usr/lib/libopenal.so.0
Reading symbols from /usr/lib/libvorbisfile.so.3...done.
Loaded symbols for /usr/lib/libvorbisfile.so.3
Reading symbols from /usr/lib/libvorbis.so.0...done.
Loaded symbols for /usr/lib/libvorbis.so.0
Reading symbols from /usr/lib/libogg.so.0...done.
Loaded symbols for /usr/lib/libogg.so.0
Reading symbols from /lib/tls/i686/cmov/libc.so.6...done.
Loaded symbols for /lib/tls/i686/cmov/libc.so.6
Reading symbols from /usr/lib/libX11.so.6...done.
Loaded symbols for /usr/lib/libX11.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /usr/lib/libasound.so.2...done.
Loaded symbols for /usr/lib/libasound.so.2
Reading symbols from /usr/lib/libdirectfb-0.9.so.24...done.
Loaded symbols for /usr/lib/libdirectfb-0.9.so.24
Reading symbols from /usr/lib/libfusion-0.9.so.24...done.
Loaded symbols for /usr/lib/libfusion-0.9.so.24
Reading symbols from /usr/lib/libdirect-0.9.so.24...done.
Loaded symbols for /usr/lib/libdirect-0.9.so.24
Reading symbols from /lib/tls/i686/cmov/libdl.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libdl.so.2
Reading symbols from /usr/lib/libGLcore.so.1...done.
Loaded symbols for /usr/lib/libGLcore.so.1
Reading symbols from /usr/lib/tls/libnvidia-tls.so.1...done.
Loaded symbols for /usr/lib/tls/libnvidia-tls.so.1
Reading symbols from /usr/lib/libXext.so.6...done.
Loaded symbols for /usr/lib/libXext.so.6
Reading symbols from /usr/lib/libstdc++.so.6...done.
Loaded symbols for /usr/lib/libstdc++.so.6
Reading symbols from /lib/libgcc_s.so.1...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /usr/lib/libXau.so.6...done.
Loaded symbols for /usr/lib/libXau.so.6
Reading symbols from /usr/lib/libXdmcp.so.6...done.
Loaded symbols for /usr/lib/libXdmcp.so.6
0xe410 in __kernel_vsyscall ()
(gdb) #0  0xe410 in __kernel_vsyscall ()
No symbol table info available.
#1  0xb7dca323 in __waitpid_nocancel () from 
/lib/tls/i686/cmov/libpthread.so.0
No symbol table info available.
#2  0x0817594f in posixExceptionHandler (signum=11, 
siginfo=0xbfc6fd5c, 
sigcontext=0xbfc6fddc) at exceptionhandler.c:490
btBuffer = {0x81754cf, 0xe440, 0x80fe185, 0x80a87f4, 
0xb7b198cc, 0x804ce41, 
  0x0 repeats 14 times}
pid = 16722
gdbPipe = {4, 5}
dumpFile = 3
allreadyRunning = 1
#3  signal 

Re: [Warzone-dev] error: Registry file config is empty!

2007-03-16 Thread Giel van Schijndel
[EMAIL PROTECTED] schreef:
 On Fri, 16 Mar 2007 19:04:01 -0400 Dennis Schridde [EMAIL PROTECTED] wrote:
   
 Am Freitag, 16. März 2007 schrieb [EMAIL PROTECTED]:
 
 I download ubuntu edgy 6.10 to see warzone on its.
 I do compile as COMPILE file say.
 Then do make install.

 When game run, I get,
 error:  Registry file config is empty!
 Saved dump file to '/tmp/warzone2100.gdmp'
 Segmentation fault (core dumped)
   
 1st: Send the dumpfile it speaks about.
 
 To who?  
   
As an _attachment_ to the mailinglist. Yes I saw your two follow-up
mails with dump in it, having it as an attachment IMO really is
nicer/easier.
 2nd: Send the core file if possible (ziped since it may be large)
 
 will send if give me place to send
   
 3rd: This bug is supposed to show up only on Windows...
 
 I never have this bug on window, I now do in linux.
   
Confirmed, I yesterday compiled WZ on edgy 6.10 as well (amd64 so I
first figured that might be the cause). It only generates the empty
registry file error on first run (when there is no file, in which case
it will create an empty one) and when the file is empty. Simply copying
my windows config file fixes it.

So just to be clear: I never ever could reproduce this on M$Win on
GNU/Linux however I have more trouble preventing it from occuring.
 4th: Check whether the config file is really emtpy
 
 I look in ./warzone2100 and config file.  It is empty.
   
 5th: Check whether it gets recreated successfully after deleting 
 it
 
 It still empty.
   
Confirmed: It indeed does get created, just empty however.
 Also in README, it say Once the game is installed (see INSTALL in 
 this directory)
 There is no INSTALL file ?
Well, that documentation really is erm, outdated AFAIK.



signature.asc
Description: OpenPGP digital signature
___
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev


Re: [Warzone-dev] error: Registry file config is empty! dump file

2007-03-16 Thread Giel van Schijndel
[EMAIL PROTECTED] schreef:
 #4  strresGetString (psRes=0x0, id=151) at strres.c:361
   psBlock = value optimized out
   __FUNCTION__ = strresGetString
   
Clearly a NULL pointer being passed (psRes=0x0) causes the segfault.
When adding an assert for it (psRes != NULL) it asserts instead of
segfaulting.

I'll look further into this tomorrow.
 #5  0x080fe185 in loadConfig () at configuration.c:323
   val = -1212768063
   sBuf = 
 [EMAIL PROTECTED] 
 \000\000\000 \000\000\000\fx· 
 Q÷A\026\000\000\000\000\000\000\000\000¶·K®9\000ÀA\000\000\002\000\
 000\000ô?÷ Q÷ðÕe\bž\001Ç¿Dª¶· Q÷ðÕe\b\b\000\000\000ô?÷ 
 Q÷ÐÕe\bØ\001Ç¿Dª¶· 
 Q÷ÐÕe\bðÕe\b\001\000\000\000Ø\001Ç¿\017C\027\b\001\000\000\000\000\
 [EMAIL PROTECTED]
 00\000\b\002Ç¿®D\027\b\017\000\000\000\030...
   __FUNCTION__ = loadConfig
 #6  0x080a87f4 in main (argc=1, argv=0xbfc70544) at main.c:459
   frameRet = value optimized out
   quit = -1211940876
   Restart = -1208902432
   paused = 0
   introVideoControl = 3
   loopStatus = 0
   pSize = 3217489248
 (gdb) Detaching from program: 
 /home/zap/warzone/warzone/data/warzone2100, process 16719
   
-- 
Giel


signature.asc
Description: OpenPGP digital signature
___
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev