Page 1 of 1
Server crashed - Floating point exception
Posted: Fri Mar 18, 2016 8:47 am
by FlushA
Hello,
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
Re: Server crashed - Floating point exception
Posted: Fri Mar 18, 2016 7:37 pm
by deen
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 with gdb DDNet-Server_d
or run it normally and open the core file with gdb afterwards
Re: Server crashed - Floating point exception
Posted: Sat Mar 19, 2016 12:57 pm
by FlushA
I compiled with server_sql_debug and runned DDNet-Server_sql_d
after some hours server crashed and show this
Segmentation fault (core dumped)
Re: Server crashed - Floating point exception
Posted: Sat Mar 19, 2016 1:19 pm
by deen
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.
Re: Server crashed - Floating point exception
Posted: Wed Mar 23, 2016 6:05 pm
by FlushA
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)
Re: Server crashed - Floating point exception
Posted: Wed Mar 23, 2016 6:13 pm
by deen
Makes no sense to me, have you modified the source code?
Re: Server crashed - Floating point exception
Posted: Wed Mar 23, 2016 7:05 pm
by FlushA
Send source to your private message inbox,
please check there.
Re: Server crashed - Floating point exception
Posted: Wed Mar 23, 2016 7:20 pm
by deen
I'm not going to check your source code for bugs.
Re: Server crashed - Floating point exception
Posted: Wed Mar 23, 2016 7:52 pm
by FlushA
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; }
Re: Server crashed - Floating point exception
Posted: Wed Mar 23, 2016 11:23 pm
by Chairn
First bug is probably because 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).