SA-MP Forums Archive
MySQL database crashes my server - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MySQL database crashes my server (/showthread.php?tid=494727)



MySQL database crashes my server - Gecko75 - 14.02.2014

I've tried a few things so far.

Each time I start my server (The host's start button) the server runs for a few seconds, then immediately stops when MySQL begins loading everything. I checked the logs, and it stops at Loading something half-way.

All the loading stocks come in order under OnGameModeInit, but I'd assume it's from there, because it stops about mid-way through calling OnGameModeInit.

I'd imagine it's something with MySQL, but I've never encountered this issue with my script ever. I'm not sure about what to do.


Re: MySQL database crashes my server - CuervO - 14.02.2014

Show the mysql_log, enable the debug all mode.

Which version of the SQL Plugin are you using?


Re: MySQL database crashes my server - Konstantinos - 14.02.2014

Load crashdetect plugin and compile with debug info. Re-compile your scripts and start the server again. Post the server log.


Re: MySQL database crashes my server - Gecko75 - 14.02.2014

Here's the server log itself, with crashdetect.
Код:
[10:49:59] ========================================== 
[10:49:59] 
[10:49:59] Loaded 16 labels from MySQL.
[10:49:59] Loaded 5 dynamic gates from MySQL.
[10:49:59] Loaded 20 ATM's from MySQL.
[10:49:59] Loaded 41 admin teleports from MySQL.
[10:50:00] Loaded 315 dynamic objects from MySQL.
[10:50:00] Loaded 3 dynamic infos from MySQL.
[10:50:00] Loaded 16 dynamic gas stations from MySQL.
[10:50:00] Loaded 1 dynamic banks from MySQL.
[10:50:00] Loaded 70 dynamic vehicles from MySQL.
[10:50:01] Loaded 219 dynamic houses from MySQL.
[10:50:01] Loaded 26 dynamic businesses from MySQL.
[10:50:01] Loaded 6 dynamic food stands from MySQL.
[10:50:01] Loaded 6 dynamic park meters from MySQL.
[10:50:02] Loaded 6 APB's from MySQL.
[10:50:02] [debug] Server crashed while executing a-rp.amx
[10:50:02] [debug] AMX backtrace:
[10:50:02] [debug] #0 native cache_get_row_int () [70453cb0] from mysql.DLL
[10:50:02] [debug] #1 00103668 in public LoadDynamicFactions () at C:\Users\theo\Desktop\1.16.2014\True Life RP\gamemodes\A-RP (Non-UCP)\a-rp.pwn:12846
[10:50:02] [debug] Native backtrace:
[10:50:02] [debug] #0 66189055 in ?? () from C:\Windows\SYSTEM32\MSVCR110.dll
[10:50:02] [debug] #1 661891b0 in ?? () from C:\Windows\SYSTEM32\MSVCR110.dll
[10:50:02] [debug] #2 661891c4 in ?? () from C:\Windows\SYSTEM32\MSVCR110.dll
[10:50:02] [debug] #3 70453d3b in ?? () from plugins\mysql.DLL
[10:50:02] [debug] #4 004010b6 in ?? () from samp-server.exe
[10:50:02] [debug] #5 6e4758ca in ?? () from plugins\crashdetect.DLL
[10:50:02] [debug] #6 6e47774f in ?? () from plugins\crashdetect.DLL
[10:50:02] [debug] #7 6e470834 in ?? () from plugins\crashdetect.DLL
[10:50:02] [debug] #8 6e47591a in ?? () from plugins\crashdetect.DLL
[10:50:02] [debug] #9 70457c19 in ?? () from plugins\mysql.DLL
[10:50:02] [debug] #10 004691b6 in ?? () from samp-server.exe
[10:50:02] [debug] #11 004877cb in ?? () from samp-server.exe
[10:50:02] [debug] #12 00496281 in ?? () from samp-server.exe
[10:50:02] [debug] #13 00496291 in ?? () from samp-server.exe
It seems to stop after loading the APB's.


Re: MySQL database crashes my server - Konstantinos - 14.02.2014

Post the line 12846.

Native cache_get_row_int crashed the server. What version of the MySQL plugin do you use?


Re: MySQL database crashes my server - Gecko75 - 14.02.2014

Line 12846.
Код:
			Factions[factionid][fLeaderRank] = cache_get_row_int(total, 36);
This is probably it, because loading the APB's is before loading the factions.

Also, I'm using BlueG's MySQL R33 plugin.


Re: MySQL database crashes my server - Konstantinos - 14.02.2014

I never had problems with cache_get_row_int in R33. There were few versions in which that function crashed the server such as r18. The best suggestion I can give you is to update to R37, hoping it won't crash the server anymore.


Re: MySQL database crashes my server - Gecko75 - 14.02.2014

R37 still contains all of the functions and such from R33?


Re: MySQL database crashes my server - Konstantinos - 14.02.2014

Most of them, yes.
You don't need to worry about it though, in case you get any errors/warnings while compiling with the R37 include (I doubt), post them here so we can help you.


Re: MySQL database crashes my server - Gecko75 - 14.02.2014

Fixed it. Ended up being an error on the Database's behalf, the rows didn't match.

Thanks for the suggestions, guys! Especially with crashdetect. I would've been sitting here staring at the script not knowing what to do.