ulimit -c unlimited
start ur cod2 serv here
gdb /path/to/cod2_lnxded /home/user/core
bt
ulimit -c unlimited
start ur cod2 serv here
gdb /path/to/cod2_lnxded /home/user/core
bt
"Does not work" is an error report for a bug between keyboard and chair.
All hail Artie Effem
Whiskas (7th March 2016)
Got output like this, something wrong with mysql_real_connect()?
Code:Program terminated with signal 11, Segmentation fault. #0 0xb71b3b4b in mysql_options () from /usr/lib/i386-linux-gnu/libmysqlclient.so.18 (gdb) bt #0 0xb71b3b4b in mysql_options () from /usr/lib/i386-linux-gnu/libmysqlclient.so.18 #1 0xb7785cb1 in gsc_mysql_real_connect () from ./libcod2_1_0.so #2 0x080806a0 in ?? () #3 0x080838ca in ?? () #4 0x080839eb in ?? () #5 0x08115eaf in ?? () #6 0x0810700e in ?? () #7 0x08090d12 in ?? () #8 0x08090dbf in ?? () #9 0x08091f94 in ?? () #10 0x0808ad5f in ?? () #11 0x08060724 in ?? () #12 0x0805fc79 in ?? () #13 0x0808b228 in ?? () #14 0x08060724 in ?? () #15 0x0805fdf5 in ?? () #16 0x0805fe07 in ?? () #17 0x08061ff1 in ?? () #18 0x08062038 in ?? () #19 0x080d2ace in ?? () #20 0xb74c14d3 in __libc_start_main () from /lib/i386-linux-gnu/libc.so.6 #21 0x0804a4d1 in ?? ()
Whiskas (7th March 2016)
Code:./libcod2_1_0.so: /usr/lib/i386-linux-gnu/libmysqlclient.so.18: no version information available (required by ./libcod2_1_0.so) linux-gate.so.1 => (0xb7787000) libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb7749000) libmysqlclient.so.18 => /usr/lib/i386-linux-gnu/libmysqlclient.so.18 (0xb7431000) libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb7415000) libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xb73ff000) libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xb73d3000) librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0xb73ca000) libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xb73ac000) libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb7202000) /lib/ld-linux.so.2 (0xb7788000)
Can you debug wether the problem is in initMysql() or in initAsyncMysql?
"Does not work" is an error report for a bug between keyboard and chair.
All hail Artie Effem
Whiskas (7th March 2016)
Sure I can!
Of course:
level.JH_mysql = initMySQL();
and
initAsyncMySQL();
had login params inside them like in my first post.
Solution 1.
Solution 2.PHP Code:
init()
{
//get your host, user, pass, db, port here
level.JH_mysql = mysql_reuse_connection();
if(!isDefined(level.JH_mysql))
level.JH_mysql = initMySQL();
//initAsyncMySQL();
}
Both gives erorr.PHP Code:
init()
{
//get your host, user, pass, db, port here
level.JH_mysql = mysql_reuse_connection();
//if(!isDefined(level.JH_mysql))
// level.JH_mysql = initMySQL();
initAsyncMySQL();
}
Debugging 1. solution:2. solutionCode:Program terminated with signal 11, Segmentation fault. #0 0xb71b3b4b in mysql_options () from /usr/lib/i386-linux-gnu/libmysqlclient.so.18 (gdb) bt #0 0xb71b3b4b in mysql_options () from /usr/lib/i386-linux-gnu/libmysqlclient.so.18 #1 0xb7785cb1 in gsc_mysql_real_connect () from ./libcod2_1_0.so #2 0x080806a0 in ?? () #3 0x080838ca in ?? () #4 0x080839eb in ?? () #5 0x08115eaf in ?? () #6 0x0810700e in ?? () #7 0x08090d12 in ?? () #8 0x08090dbf in ?? () #9 0x08091f94 in ?? () #10 0x0808ad5f in ?? () #11 0x08060724 in ?? () #12 0x0805fc79 in ?? () #13 0x0808b228 in ?? () #14 0x08060724 in ?? () #15 0x0805fdf5 in ?? () #16 0x0805fe07 in ?? () #17 0x08061ff1 in ?? () #18 0x08062038 in ?? () #19 0x080d2ace in ?? () #20 0xb74c14d3 in __libc_start_main () from /lib/i386-linux-gnu/libc.so.6 #21 0x0804a4d1 in ?? ()Edit:Code:Program terminated with signal 11, Segmentation fault. #0 0xb71b3b4b in mysql_options () from /usr/lib/i386-linux-gnu/libmysqlclient.so.18 (gdb) bt #0 0xb71b3b4b in mysql_options () from /usr/lib/i386-linux-gnu/libmysqlclient.so.18 #1 0xb7785cb1 in gsc_mysql_real_connect () from ./libcod2_1_0.so #2 0x080806a0 in ?? () #3 0x080838ca in ?? () #4 0x080839eb in ?? () #5 0x08115eaf in ?? () #6 0x0810700e in ?? () #7 0x08090d12 in ?? () #8 0x08090dbf in ?? () #9 0x08091f94 in ?? () #10 0x0808ad5f in ?? () #11 0x08060724 in ?? () #12 0x0805fc79 in ?? () #13 0x0808b228 in ?? () #14 0x08060724 in ?? () #15 0x0805fdf5 in ?? () #16 0x0805fe07 in ?? () #17 0x08061ff1 in ?? () #18 0x08062038 in ?? () #19 0x080d2ace in ?? () #20 0xb74c14d3 in __libc_start_main () from /lib/i386-linux-gnu/libc.so.6 #21 0x0804a4d1 in ?? ()
If both are disabled, server works. :P
Last edited by Whiskas; 7th March 2016 at 20:21.
Looks almost like your connection is failing hard and/or your mysqlclient is buggy.
Can you try compiling libcod from source (mitch's git) and doublecheck your mysql parameters?
"Does not work" is an error report for a bug between keyboard and chair.
All hail Artie Effem
Whiskas (7th March 2016)
God I'm the most dumbest in the world!
I'm running mysql on same machine as my codserver. Tried with "localhost" instead of my machine's ip and it worked! (I thought i did this before ._.).
Sorry for loosing your time and big THANK YOU for you guys!
You should set your listen ip in my.conf
"Does not work" is an error report for a bug between keyboard and chair.
All hail Artie Effem