PlaneShift

Development => Development Deliberation => Topic started by: Karosh_Steinkatz on May 08, 2004, 08:36:30 pm

Title: Bug hunting
Post by: Karosh_Steinkatz on May 08, 2004, 08:36:30 pm
I thought it would be quite handy to have a bug reporting form,   so here we  go,  with some example  bugs from today\'s  CVS:

Operating system: Linux
Compiler: gcc 3.4
Crystal Space CVS date: 05/08/2004
CEL CVS date: 05/08/2004
Cal3D CVS date: 04/18/2004
Planeshift CVS date: 05/08/2004

Bug type:  compilation error
Bug description:
 src/server/npcmanager.cpp: In member function `void NPCManager::HandleCommandList(MsgEntry*)\':
 src/server/npcmanager.cpp:324: error: `list\' cannot appear in a constant-expression
 src/server/npcmanager.cpp:324: error: `.\' cannot appear in a constant-expression
 src/server/npcmanager.cpp:372: error: `list\' cannot appear in a constant-expression
 src/server/npcmanager.cpp:372: error: `.\' cannot appear in a constant-expression
...
 src/client/modehandler.cpp: In member function `void ModeHandler::HandleCombatEvent(MsgEntry*)\':
 src/client/modehandler.cpp:902: error: `event\' cannot appear in a constant-expression
 src/client/modehandler.cpp:902: error: `.\' cannot appear in a constant-expression
  src/client/modehandler.cpp:908: error: `event\' cannot appear in a constant-expression
 src/client/modehandler.cpp:908: error: `.\' cannot appear in a constant-expression
 src/client/modehandler.cpp:914: error: `event\' cannot appear in a constant-expression
  src/client/modehandler.cpp:914: error: `.\' cannot appear in a constant-expression
  src/client/modehandler.cpp:920: error: `event\' cannot appear in a constant-expression
 src/client/modehandler.cpp:920: error: `.\' cannot appear in a constant-expression
 src/client/modehandler.cpp:926: error: `event\' cannot appear in a constant-expression
 src/client/modehandler.cpp:926: error: `.\' cannot appear in a constant-expression
  src/client/modehandler.cpp:932: error: `event\' cannot appear in a constant-expression
  src/client/modehandler.cpp:932: error: `.\' cannot appear in a constant-expression
  src/client/modehandler.cpp:944: error: `event\' cannot appear in a constant-expression
 src/client/modehandler.cpp:944: error: `.\' cannot appear in a constant-expression
  src/client/modehandler.cpp:950: error: `event\' cannot appear in a constant-expression
  src/client/modehandler.cpp:950: error: `.\' cannot appear in a constant-expression
 src/client/modehandler.cpp:956: error: `event\' cannot appear in a constant-expression
  src/client/modehandler.cpp:956: error: `.\' cannot appear in a constant-expression
  src/client/modehandler.cpp:962: error: `event\' cannot appear in a constant-expression
 src/client/modehandler.cpp:962: error: `.\' cannot appear in a constant-expression
 src/client/modehandler.cpp:968: error: `event\' cannot appear in a constant-expression
  src/client/modehandler.cpp:968: error: `.\' cannot appear in a constant-expression
  src/client/modehandler.cpp:974: error: `event\' cannot appear in a constant-expression
 src/client/modehandler.cpp:974: error: `.\' cannot appear in a constant-expression
 src/client/modehandler.cpp:986: error: `event\' cannot appear in a constant-expression
 src/client/modehandler.cpp:986: error: `.\' cannot appear in a constant-expression
 src/client/modehandler.cpp:992: error: `event\' cannot appear in a constant-expression
 src/client/modehandler.cpp:992: error: `.\' cannot appear in a constant-expression
 src/client/modehandler.cpp:998: error: `event\' cannot appear in a constant-expression
 src/client/modehandler.cpp:998: error: `.\' cannot appear in a constant-expression
  src/client/modehandler.cpp:1004: error: `event\' cannot appear in a constant-expression
 src/client/modehandler.cpp:1004: error: `.\' cannot appear in a constant-expression
 src/client/modehandler.cpp:1010: error: `event\' cannot appear in a constant-expression
 src/client/modehandler.cpp:1010: error: `.\' cannot appear in a constant-expression
 src/client/modehandler.cpp:1016: error: `event\' cannot appear in a constant-expression
 src/client/modehandler.cpp:1016: error: `.\' cannot appear in a constant-expression
...
 src/npcclient/networkmgr.cpp: In member function `void NetworkManager::HandlePerceptions(MsgEntry*)\':
 src/npcclient/networkmgr.cpp:245: error: `list\' cannot appear in a constant-expression
 src/npcclient/networkmgr.cpp:245: error: `.\' cannot appear in a constant-expression
 src/npcclient/networkmgr.cpp:261: error: `list\' cannot appear in a constant-expression
 src/npcclient/networkmgr.cpp:261: error: `.\' cannot appear in a constant-expression
 src/npcclient/networkmgr.cpp:287: error: `list\' cannot appear in a constant-expression
 src/npcclient/networkmgr.cpp:287: error: `.\' cannot appear in a constant-expression
 src/npcclient/networkmgr.cpp:313: error: `list\' cannot appear in a constant-expression
 src/npcclient/networkmgr.cpp:313: error: `.\' cannot appear in a constant-expression
Bug solution: Edit: After  some investigation it seems to be a compiler issue. Revert back to an older version  of gcc until this is resolved.

Bug type: compilation error
Bug description:
 src/server/error.cpp:1:20: config.h: No such file or directory
 src/server/error.cpp:6:27: psnet/pserror.h: No such file or directory
Bug solution: comment out the lines containing #include \"config.h\" and #include \"psnet/pserror.h\"

Maybe  we can  make this a  general bug reporting thread?
Title:
Post by: Karosh_Steinkatz on May 09, 2004, 03:48:02 pm
Operating system: Linux
Compiler: gcc 3.3.3
Crystal Space CVS date: 05/08/2004
CEL CVS date: 05/08/2004
Cal3D CVS date: 04/18/2004
Planeshift CVS date: 05/08/2004

Bug type: compilation error
Bug description:
LinkApplication psserver
./out/linuxx86/debug/src/common/util/libpsutil.a(pserror.o)(.text+0x2e): In function `errorhalt(char const*, char const*, int, char const*)\':
src/common/util/pserror.cpp:28: multiple definition of `errorhalt(char const*, char const*, int, char const*)\'
./out/linuxx86/debug/src/server/error.o(.text+0x0):src/server/error.cpp:9: first defined here
/usr/bin/ld: Warning: size of symbol `errorhalt(char const*, char const*, int, char const*)\' changed from 250 in ./out/linuxx86/debug/src/server/error.o to 110 in ./out/linuxx86/debug/src/common/util/libpsutil.a(pserror.o)
./out/linuxx86/debug/src/common/util/libpsutil.a(pserror.o)(.text+0x9c): In function `errormsg(char const*, char const*, int, char const*)\':
src/common/util/pserror.cpp:45: multiple definition of `errormsg(char const*, char const*, int, char const*)\'
./out/linuxx86/debug/src/server/error.o(.text+0xfa):src/server/error.cpp:19: first defined here
/usr/bin/ld: Warning: size of symbol `errormsg(char const*, char const*, int, char const*)\' changed from 5 in ./out/linuxx86/debug/src/server/error.o to 60 in ./out/linuxx86/debug/src/common/util/libpsutil.a(pserror.o)
collect2: ld returned 1 exit status
Bug solution: comment out the errorhalt()  and errormsg() funtions in src/server/error.cpp
Title:
Post by: acraig on May 09, 2004, 09:59:07 pm
Quote

Bug solution: comment out the errorhalt() and errormsg() funtions in src/server/error.cpp


This should not be possible since src/server/error.cpp has been removed from the repository.  I suggest you update that directory again to make sure you are using the true CVS version of the files.
Title:
Post by: dfryer on May 09, 2004, 10:57:49 pm
Are some of the problems in the first post related to increased strictness in gcc 3.4?

Has the CS/CEL/PS codebase been tested with gcc 3.4?

Thanks,
Daniel
Title:
Post by: Karosh_Steinkatz on May 09, 2004, 11:44:27 pm
Quote
Originally posted by acraig
This should not be possible since src/server/error.cpp has been removed from the repository.  I suggest you update that directory again to make sure you are using the true CVS version of the files.


I always get the files with the -rHEAD tag. Should I use another one?

Quote
Originally posted by dfryer
Are some of the problems in the first post related to increased strictness in gcc 3.4?


I think  so. I found several bug reports for gcc 3.4 with similiar subjects, where the checking was too strict with code that compiled correctly  with older versions.
Title:
Post by: acraig on May 10, 2004, 12:15:10 am
Quote
Originally posted by Karosh_Steinkatz
I always get the files with the -rHEAD tag. Should I use another one?


Don\'t use any tag.
Title:
Post by: dfryer on May 25, 2004, 09:42:54 pm
Alright, in the interest of using this thread for general bug discussion, one problem with PS on the Mac is that I always fall whenever I load the game until I /spawn.  I have now picked up one clue as to the source of this problem: whenever I quit and reconnect, my x and z coordinates have been swapped (as for the y coordinate I have no clue).  Any pointers as to where these get loaded and why /spawn would set them correctly?  It almost seems like one end is doing endianness correction and the other isn\'t.

Thanks,
Daniel
Title:
Post by: acraig on May 25, 2004, 10:44:17 pm
dfryer:  Hmm,  I guess that is possible.  Are you running your own server?  If so I can probably offer you a few things to try/rebuild to see if it fixes things.
Title:
Post by: dfryer on May 26, 2004, 01:22:15 am
Yes, I\'m running my own server (also on PowerPC).. since the CS endian swapping code essentially does nothing on little-endian architectures (since little endian seems to be the \"CS standard\") these problems may only crop up on powerpc (mac os x, maybe linux on ppc)
Title:
Post by: Vengeance on May 26, 2004, 06:12:30 am
Since X and Z are different variables in the message format, they should be endian-fixed within themselves but not swapped with each other.  I think you will have to actually debug this, dfryer.

- Venge
Title:
Post by: dfryer on May 26, 2004, 10:08:01 am
I hope to get a closer look at this particular issue sometime this week.  It could be anything from MySQL weirdness to a cheese sandwich wedged in between the fan and CPU.

Edit:
This could definitely be responsible for the \"falling through floor\" effect- when the coordinates get swapped I think I\'m a little ways off the edge of the world (in npcroom)
Title:
Post by: dfryer on May 27, 2004, 12:59:43 am
Is there anywhere where the normal DR update mechanism is bypassed?  (Especially at initial connect time and at disconnect time when the server stores the players position)
Title:
Post by: Vengeance on May 27, 2004, 07:00:17 am
I don\'t think so but it is worth checking...