MySQL Crash
#1

SOLVED












Hello when I try to start my server it shows me this message in server_log

22:34:37] [debug] Server crashed while executing OGRP.amx
[22:34:37] [debug] AMX backtrace:
[22:34:37] [debug] #0 native fread () [00405770] from samp-server.exe
[22:34:37] [debug] #1 0009c178 in ?? () from OGRP.amx
[22:34:37] [debug] #2 000b6ed0 in public SSCANF_OnGameModeInit () from OGRP.amx
[22:34:37] [debug] #3 native CallLocalFunction () [00472ad0] from samp-server.exe
[22:34:37] [debug] #4 0000a528 in public zcmd_OnGameModeInit () from OGRP.amx
[22:34:37] [debug] #5 native CallLocalFunction () [00472ad0] from samp-server.exe
[22:34:37] [debug] #6 00009e88 in public Timers_OnScriptInit () from OGRP.amx
[22:34:37] [debug] #7 native CallLocalFunction () [00472ad0] from samp-server.exe
[22:34:37] [debug] #8 00009a04 in public YVers_OnScriptInit () from OGRP.amx
[22:34:37] [debug] #9 native CallLocalFunction () [00472ad0] from samp-server.exe
[22:34:37] [debug] #10 00008724 in public Itter_OnGameModeInit () from OGRP.amx
[22:34:37] [debug] #11 native CallLocalFunction () [00472ad0] from samp-server.exe
[22:34:37] [debug] #12 00001cbc in public Streamer_OnGameModeInit () from OGRP.amx
[22:34:37] [debug] #13 native CallLocalFunction () [00472ad0] from samp-server.exe
[22:34:37] [debug] #14 00000a20 in public OnGameModeInit () from OGRP.amx
[22:34:37] [debug] Native backtrace:
[22:34:37] [debug] #0 7c901010 in ?? () from C:\WINDOWS\system32\ntdll.dll
[22:34:37] [debug] #1 00493fc0 in ?? () from samp-server.exe
Reply
#2

MySQL has nothing to do with the crash. The native fread caused the crash because the file handle was invalid.
Use debug info: https://github.com/Zeex/samp-plugin-...ith-debug-info

Re-compile OGRP file, start the server and post the server log. It will say the line and the function fread was used inside.
Reply
#3

Edit: I compiled it and still the same errors in server_log


Code:
----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3z, ©2005-2014 SA-MP Team

[16:04:27] filterscripts = ""  (string)
[16:04:27] 
[16:04:27] Server Plugins
[16:04:27] --------------
[16:04:27]  Loading plugin: streamer
[16:04:27] 

*** Streamer Plugin v2.6.1 by Incognito loaded ***

[16:04:27]   Loaded.
[16:04:27]  Loading plugin: sscanf
[16:04:27] 

[16:04:27]  ===============================

[16:04:27]       sscanf plugin loaded.     

[16:04:27]          Version:  2.8.1        

[16:04:27]    © 2012 Alex "******" Cole  

[16:04:27]  ===============================

[16:04:27]   Loaded.
[16:04:27]  Loading plugin: mysql
[16:04:27]  >> plugin.mysql: R34 successfully loaded.
[16:04:27]   Loaded.
[16:04:27]  Loading plugin: whirlpool
[16:04:27]  
[16:04:27]  ==================
[16:04:27]  
[16:04:27]   Whirlpool loaded
[16:04:27]  
[16:04:27]  ==================
[16:04:27]  
[16:04:27]   Loaded.
[16:04:27]  Loading plugin: crashdetect
[16:04:27]   CrashDetect v4.13 is OK.
[16:04:27]   Loaded.
[16:04:27]  Loading plugin: nativechecker
[16:04:27]   Loaded.
[16:04:27]  Loaded 6 plugins.

[16:04:27] 
[16:04:27] Filterscripts
[16:04:27] ---------------
[16:04:27]   Loaded 0 filterscripts.

[16:04:29]  
[16:04:29]  ======================================= 
[16:04:29]  |                                     | 
[16:04:29]  |        YSI version 1.03.0011        | 
[16:04:29]  |        By Alex "******" Cole        | 
[16:04:29]  |                                     | 
[16:04:29]  |  Checking the latest YSI version..  | 
[16:04:29]  |                                     | 
[16:04:29]  ======================================= 
[16:04:29]  
[16:04:29] [MySQL] (Main Pipelines) Connecting to localhost...
[16:04:29] [LoadHouses] Loading data from database...
[16:04:29] [LoadDynamicDoors] Loading data from database...
[16:04:29] [LoadDynamicMapIcons] Loading data from database...
[16:04:29] [LoadMailboxes] Loading data from database...
[16:04:29] [LoadTurfWars] 0 turfs loaded.
[16:04:29] [LoadPaintballArenas] 10 paintball arenas loaded.
[16:04:29] [LoadEventPoints] 0 event points loaded.
[16:04:29] [LoadGates] 1400 gates loaded.
[16:04:29] sscanf warning: String buffer overflow.
[16:04:29] [LoadElevatorStuff] 1 floors loaded.
[16:04:29] [LoadFamilies] 14 families loaded.
[16:04:29] [LoadPoints] 9 points loaded.
[16:04:30] [LoadCDealerships] 15 dealerships loaded.
[16:04:30] [debug] Server crashed while executing OGRP.amx
[16:04:30] [debug] AMX backtrace:
[16:04:30] [debug] #0 native fread () [00405770] from samp-server.exe
[16:04:30] [debug] #1 000c6684 in Misc_Load () at OGRP.pwn:18574
[16:04:30] [debug] #2 000ea6f4 in public SSCANF_OnGameModeInit () at OGRP.pwn:20488
[16:04:30] [debug] #3 0000bf64 in public zcmd_OnGameModeInit () at D:\Games\GTA San Andreas\samp03\SAMP 0.3z\pawno\include\sscanf2.inc:174
[16:04:30] [debug] #4 native CallLocalFunction () [00472ad0] from samp-server.exe
[16:04:30] [debug] #5 0000b904 in public Timers_OnScriptInit () at D:\Games\GTA San Andreas\samp03\SAMP 0.3z\pawno\include\ZCMD.inc:68
[16:04:30] [debug] #6 native CallLocalFunction () [00472ad0] from samp-server.exe
[16:04:30] [debug] #7 0000b394 in public YVers_OnScriptInit () at D:\Games\GTA San Andreas\samp03\SAMP 0.3z\pawno\include\YSI\y_timers.inc:225
[16:04:30] [debug] #8 native CallLocalFunction () [00472ad0] from samp-server.exe
[16:04:30] [debug] #9 00009d04 in public Itter_OnGameModeInit () at D:\Games\GTA San Andreas\samp03\SAMP 0.3z\pawno\include\YSI\internal\y_version.inc:154
[16:04:30] [debug] #10 native CallLocalFunction () [00472ad0] from samp-server.exe
[16:04:30] [debug] #11 00001aa0 in public OnGameModeInit () at D:\Games\GTA San Andreas\samp03\SAMP 0.3z\pawno\include\foreach.inc:667
[16:04:31] [debug] Native backtrace:
[16:04:31] [debug] #0 7c901010 in ?? () from C:\WINDOWS\system32\ntdll.dll
[16:04:31] [debug] #1 00493fc0 in ?? () from samp-server.exe
Reply
#4

Bump !!!
Reply
#5

Search for any "fopen" in your script and verify that the path and filename you want to open exists.

fopen will still return something if the given file doesn't exist and store it in your supplied handle-variables.
Then after using fread with that invalid filehandle, it crashes because it cannot read from a non-existant file.
https://sampwiki.blast.hk/wiki/Fread

Checkout the first example to find out how to detect if the file exists.


MySQL has nothing to do with basic pawn natives that are only used to open/read/write/delete files.
Reply
#6

Post Misc_Load function.
Reply
#7

Really thanks man that helped me much thank you very very much

SOLVED
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)