SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 22/02/2014, 01:46 AM   #1
ahmedkoki
Big Clucker
 
Join Date: Aug 2012
Posts: 96
Reputation: 5
Default MySQL Crash

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

Last edited by ahmedkoki; 22/02/2014 at 08:12 PM.
ahmedkoki is offline   Reply With Quote
Old 22/02/2014, 09:51 AM   #2
Konstantinos
Spam Machine
 
Konstantinos's Avatar
 
Join Date: Dec 2011
Posts: 11,828
Reputation: 1401
Default Re: MySQL Crash

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.
__________________
Life is like riding a bicycle. To keep your balance, you must keep moving.

[Tutorial] How to use SQLite
[FilterScript] Tune System
Konstantinos is offline   Reply With Quote
Old 22/02/2014, 12:42 PM   #3
ahmedkoki
Big Clucker
 
Join Date: Aug 2012
Posts: 96
Reputation: 5
Default Re: MySQL Crash

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, (C)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]    (c) 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
ahmedkoki is offline   Reply With Quote
Old 22/02/2014, 07:03 PM   #4
ahmedkoki
Big Clucker
 
Join Date: Aug 2012
Posts: 96
Reputation: 5
Default Re: MySQL Crash

Bump !!!
ahmedkoki is offline   Reply With Quote
Old 22/02/2014, 07:55 PM   #5
PowerPC603
High-roller
 
Join Date: Nov 2010
Location: Belgium
Posts: 1,733
Reputation: 238
Default Re: MySQL Crash

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.
http://wiki.sa-mp.com/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.
__________________
Gamemode: PPC_Trucking
Extras-file (for PPC_Trucking): /delproperty, /evict, /propertyid, /porthouse, /portbus, /properties
------------------------------------------------------------------------------------
PPC-Trucking-V2 (home-hosted, only open on occasion for testing purposes): ppctruckingv2.no-ip.info:7777
Youtube channel: https://www.youtube.com/channel/UC-4...Mpglma8f0Ld-YQ
------------------------------------------------------------------------------------
Filterscripts: PPC_Speedometer - PPC_Housing - PPC_Business
PowerPC603 is offline   Reply With Quote
Old 22/02/2014, 08:04 PM   #6
Konstantinos
Spam Machine
 
Konstantinos's Avatar
 
Join Date: Dec 2011
Posts: 11,828
Reputation: 1401
Default Re: MySQL Crash

Post Misc_Load function.
__________________
Life is like riding a bicycle. To keep your balance, you must keep moving.

[Tutorial] How to use SQLite
[FilterScript] Tune System
Konstantinos is offline   Reply With Quote
Old 22/02/2014, 08:11 PM   #7
ahmedkoki
Big Clucker
 
Join Date: Aug 2012
Posts: 96
Reputation: 5
Default Re: MySQL Crash

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

SOLVED
ahmedkoki is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
MySql Crash Shirley Scripting Help 2 08/09/2013 07:01 AM
MySQL R7 Crash Sp3cter Scripting Help 0 21/07/2013 12:57 PM
MySQL crash/failure? NRJ53 Scripting Help 0 18/07/2013 03:33 PM
[HELP] MYSQL CRASH :( wups Help Archive 1 05/06/2010 07:27 AM
MySQL crash help Ironboy500 Help Archive 9 31/03/2010 01:01 PM


All times are GMT. The time now is 02:33 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.