Server crashed - Floating point exception
-
- Posts: 57
- Joined: Mon Jul 13, 2015 1:43 pm
- Location: IR
- Player profile: http://ddnet.tw/players/Sv3N/
- Mapper profile: http://ddnet.tw/mappers/FlushA/
- Clan: I.R.T
Server crashed - Floating point exception
Hello,
My server when runned and after some hours get crashed and show this print
how fix this problem to stop server crash
My server when runned and after some hours get crashed and show this print
Floating point exception (core dumped)
how fix this problem to stop server crash
✟Տ℣ʒN✟
- deen
- Posts: 3576
- Joined: Mon May 05, 2014 2:30 pm
- Player profile: https://ddnet.org/players/deen/
- Discord: deen#5910
Re: Server crashed - Floating point exception
Two possibilities:
- Find out how to make it crash and post the instructions, then a developer can fix it
- Compile your server with
bam server_debug
. Then either run it withgdb DDNet-Server_d
or run it normally and open the core file with gdb afterwards
-
- Posts: 57
- Joined: Mon Jul 13, 2015 1:43 pm
- Location: IR
- Player profile: http://ddnet.tw/players/Sv3N/
- Mapper profile: http://ddnet.tw/mappers/FlushA/
- Clan: I.R.T
Re: Server crashed - Floating point exception
I compiled with server_sql_debug and runned DDNet-Server_sql_d
after some hours server crashed and show this
Segmentation fault (core dumped)
after some hours server crashed and show this
Segmentation fault (core dumped)
✟Տ℣ʒN✟
- deen
- Posts: 3576
- Joined: Mon May 05, 2014 2:30 pm
- Player profile: https://ddnet.org/players/deen/
- Discord: deen#5910
Re: Server crashed - Floating point exception
You have the core file? It depends on your distribution where it is. Then you can run
gdb ./DDNet-Server_sql_d core
and write bt
to get a backtrace.-
- Posts: 57
- Joined: Mon Jul 13, 2015 1:43 pm
- Location: IR
- Player profile: http://ddnet.tw/players/Sv3N/
- Mapper profile: http://ddnet.tw/mappers/FlushA/
- Clan: I.R.T
Re: Server crashed - Floating point exception
after crash I write bt and show this codes
Code: Select all
Program received signal SIGFPE, Arithmetic exception.
0x000000000044eeee in CServer::GetAnnouncementLine (this=0x7ffff4de0010,
pFileName=0x75a0b8 <g_Config+11960> "announcement.txt")
at src/engine/server/server.cpp:2263
2263 Rand = rand() % v.size();
(gdb) bt
#0 0x000000000044eeee in CServer::GetAnnouncementLine (this=0x7ffff4de0010,
pFileName=0x75a0b8 <g_Config+11960> "announcement.txt")
at src/engine/server/server.cpp:2263
#1 0x00000000004ac4c2 in CGameContext::OnTick (this=0x7ffff7fb2010)
at src/game/server/gamecontext.cpp:756
#2 0x000000000044c419 in CServer::Run (this=0x7ffff4de0010)
at src/engine/server/server.cpp:1700
#3 0x000000000044ebab in main (argc=1, argv=0x7fffffffe178)
at src/engine/server/server.cpp:2211
(gdb)
✟Տ℣ʒN✟
- deen
- Posts: 3576
- Joined: Mon May 05, 2014 2:30 pm
- Player profile: https://ddnet.org/players/deen/
- Discord: deen#5910
Re: Server crashed - Floating point exception
Makes no sense to me, have you modified the source code?
-
- Posts: 57
- Joined: Mon Jul 13, 2015 1:43 pm
- Location: IR
- Player profile: http://ddnet.tw/players/Sv3N/
- Mapper profile: http://ddnet.tw/mappers/FlushA/
- Clan: I.R.T
Re: Server crashed - Floating point exception
Send source to your private message inbox,
please check there.
please check there.
✟Տ℣ʒN✟
- deen
- Posts: 3576
- Joined: Mon May 05, 2014 2:30 pm
- Player profile: https://ddnet.org/players/deen/
- Discord: deen#5910
Re: Server crashed - Floating point exception
I'm not going to check your source code for bugs.
-
- Posts: 57
- Joined: Mon Jul 13, 2015 1:43 pm
- Location: IR
- Player profile: http://ddnet.tw/players/Sv3N/
- Mapper profile: http://ddnet.tw/mappers/FlushA/
- Clan: I.R.T
Re: Server crashed - Floating point exception
Code: Select all
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff3239700 (LWP 31060)]
0x000000000046bacc in CGameContext::Console (this=0x0)
at src/game/server/gamecontext.h:100
100 src/game/server/gamecontext.h: No such file or directory.
gamecontext.h
line 100:
class IConsole *Console() { return m_pConsole; }
✟Տ℣ʒN✟
-
- Posts: 400
- Joined: Sat Apr 11, 2015 5:05 pm
- Player profile: http://ddnet.tw/players/Chairn/
- Clan: QuintessenZ
Re: Server crashed - Floating point exception
First bug is probably because
Then you have null pointer, you probably access something that does not exist yet(if it crashes when games open).
v.size()
returns 0
, which is a forbidden operation.Then you have null pointer, you probably access something that does not exist yet(if it crashes when games open).
Who is online
Users browsing this forum: No registered users and 8 guests