Author Topic: Bug hunting  (Read 2171 times)

Karosh_Steinkatz

  • Hydlaa Citizen
  • *
  • Posts: 486
    • View Profile
Bug hunting
« 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?
« Last Edit: May 09, 2004, 03:31:39 pm by Karosh_Steinkatz »


Back to Planeshift again \\o/

Karosh_Steinkatz

  • Hydlaa Citizen
  • *
  • Posts: 486
    • View Profile
(No subject)
« Reply #1 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


Back to Planeshift again \\o/

acraig

  • Administrator
  • Veteran
  • *
  • Posts: 1562
    • View Profile
(No subject)
« Reply #2 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.
----------
Andrew
"For all I know, she's lying, everyone's lying; welcome to the Internet"

dfryer

  • Veteran
  • *
  • Posts: 1070
    • View Profile
(No subject)
« Reply #3 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
Quidquid latine dictum sit, altum sonatur.

Karosh_Steinkatz

  • Hydlaa Citizen
  • *
  • Posts: 486
    • View Profile
(No subject)
« Reply #4 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.


Back to Planeshift again \\o/

acraig

  • Administrator
  • Veteran
  • *
  • Posts: 1562
    • View Profile
(No subject)
« Reply #5 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.
----------
Andrew
"For all I know, she's lying, everyone's lying; welcome to the Internet"

dfryer

  • Veteran
  • *
  • Posts: 1070
    • View Profile
(No subject)
« Reply #6 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
Quidquid latine dictum sit, altum sonatur.

acraig

  • Administrator
  • Veteran
  • *
  • Posts: 1562
    • View Profile
(No subject)
« Reply #7 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.
----------
Andrew
"For all I know, she's lying, everyone's lying; welcome to the Internet"

dfryer

  • Veteran
  • *
  • Posts: 1070
    • View Profile
(No subject)
« Reply #8 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)
Quidquid latine dictum sit, altum sonatur.

Vengeance

  • Veteran
  • *
  • Posts: 1452
    • View Profile
(No subject)
« Reply #9 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

dfryer

  • Veteran
  • *
  • Posts: 1070
    • View Profile
(No subject)
« Reply #10 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)
« Last Edit: May 26, 2004, 10:36:49 am by dfryer »
Quidquid latine dictum sit, altum sonatur.

dfryer

  • Veteran
  • *
  • Posts: 1070
    • View Profile
(No subject)
« Reply #11 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)
Quidquid latine dictum sit, altum sonatur.

Vengeance

  • Veteran
  • *
  • Posts: 1452
    • View Profile
(No subject)
« Reply #12 on: May 27, 2004, 07:00:17 am »
I don\'t think so but it is worth checking...