AMX backtrace since update to R41-2
#1

Hello,
I have a little problem since I updated MySQL to R41-2.
When I use "gmx" in the console. Server crash and there is an amx backtrace.
Here is a copy of server_log, then

Quote:

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

SA-MP Dedicated Server
----------------------
v0.3.7-R2, ©2005-2015 SA-MP Team

[03:49:17]
[03:49:17] Server Plugins
[03:49:17] --------------
[03:49:17] Loading plugin: sscanf
[03:49:17]

[03:49:17] ===============================

[03:49:17] sscanf plugin loaded.

[03:49:17] Version: 2.8.2

[03:49:17] © 2012 Alex "******" Cole

[03:49:17] ===============================

[03:49:17] Loaded.
[03:49:17] Loading plugin: crashdetect
[03:49:17] CrashDetect v4.15.1 is OK.
[03:49:17] Loaded.
[03:49:17] Loading plugin: streamer
[03:49:17]

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

[03:49:17] Loaded.
[03:49:17] Loading plugin: mysql
[03:49:17] >> plugin.mysql: R41-2 successfully loaded.
[03:49:17] Loaded.
[03:49:17] Loaded 4 plugins.

[03:49:17]
[03:49:17] Filterscripts
[03:49:17] ---------------
[03:49:17] Loaded 0 filterscripts.

[03:49:17]
[03:49:17]
[03:49:17] [MySQL] Connexion а la base de donnйe йtablie.
[03:49:17] Number of vehicle models: 0
[03:49:17] [SERVEUR] 22 objets ont йtй chargйs sur le serveur.
[03:49:17] [SERVEUR] 0 vйhicules ont йtй chargйs.
[03:49:17] [SERVEUR] 2 racks ont йtй chargйs sur le serveur.
[03:49:17] [SERVEUR] Les informations serveurs ont йtй initialisйes.
Console input: gmx
[03:50:43] [SERVEUR] Les informations serveurs ont йtй sauvegardйes.
[03:50:43] [debug] Server crashed due to an unknown error
[03:50:43] [debug] Native backtrace:
[03:50:43] [debug] #0 00401700 in ?? () from samp-server.exe

Quote:

SA-MP Server: 0.3.7-R2



Exception At Address: 0x00401700 Module: (samp-server.exe)



Registers:

EAX: 0x09CA041A EBX: 0x001BA517 ECX: 0x007C00C0 EDX: 0x0019FBCC

ESI: 0x029C0802 EDI: 0x000DD28B EBP: 0x00000000 ESP: 0x0019FBA0

EFLAGS: 0x00010202



Stack:

+0000: 0x000DD28B 0x028E4E30 0x0040174F 0x028E4E30

+0010: 0x000DD28B 0x0019FBCC 0x0019FC6C 0x028E4E30

+0020: 0x0019FC18 0x6F98E834 0x001BA518 0x0019FC88

+0030: 0x00000000 0x007C0000 0x0019FC40 0x000007FF

+0040: 0x6F9E9670 0x0000000F 0x0019FBF4 0x6F9B5015

+0050: 0x028E4E30 0x6F98E834 0x0019FC6C 0x6F9E9670

+0060: 0x028E4E30 0x6F98E834 0x0019FC6C 0x6F98E82C

+0070: 0x6F98E834 0x0019FD14 0x0019FCD8 0x6F957CC2

+0080: 0x028E4E30 0x6F98E834 0x0019FC6C 0x5BC3FE98

+0090: 0x0000047A 0x008FE034 0x008BFA08 0x00000000

+00A0: 0x00820000 0x008F21E8 0x02000002 0x007C5450

+00B0: 0xD80013CB 0x777292E9 0x5F00005F 0x777767B0

+00C0: 0x3A01003B 0xFFFFFFFE 0x028E4E30 0xFFFFFFFF

+00D0: 0x6F98E834 0x0019FD1C 0x6F98E82C 0x0000007F

+00E0: 0x7776F44C 0x77745FD6 0x6F98E834 0x028E4E30

+00F0: 0x6F98E835 0x3BB4BA4B 0x0019FCAC 0x0019FCE4

+0100: 0x007C4068 0x7592A310 0x00020818 0x00000038

+0110: 0x00000000 0x008E4720 0x00000008 0x00000008

+0120: 0x00020000 0x00020000 0x5BC3FE98 0x0019FD3C

+0130: 0x6F986C4A 0xFFFFFFFF 0x0019FD48 0x6F976CB4



--------------------------



Loaded Modules:

samp-server.exe A: 0x00400000 - 0x00519000 (D:\Serveur SAMP\samp-server.exe)

ntdll.dll A: 0x77700000 - 0x77883000 (C:\WINDOWS\SYSTEM32\ntdll.dll)

KERNEL32.DLL A: 0x75910000 - 0x759F0000 (C:\WINDOWS\System32\KERNEL32.DLL)

KERNELBASE.dll A: 0x76E60000 - 0x77001000 (C:\WINDOWS\System32\KERNELBASE.dll)

SHELL32.dll A: 0x74530000 - 0x75909000 (C:\WINDOWS\System32\SHELL32.dll)

msvcrt.dll A: 0x759F0000 - 0x75AAE000 (C:\WINDOWS\System32\msvcrt.dll)

cfgmgr32.dll A: 0x776C0000 - 0x776F6000 (C:\WINDOWS\System32\cfgmgr32.dll)

windows.storage.dll A: 0x76550000 - 0x76ABE000 (C:\WINDOWS\System32\windows.storage.dll)

combase.dll A: 0x774A0000 - 0x776B1000 (C:\WINDOWS\System32\combase.dll)

ucrtbase.dll A: 0x74230000 - 0x74310000 (C:\WINDOWS\System32\ucrtbase.dll)

RPCRT4.dll A: 0x77370000 - 0x77431000 (C:\WINDOWS\System32\RPCRT4.dll)

SspiCli.dll A: 0x741C0000 - 0x741DE000 (C:\WINDOWS\System32\SspiCli.dll)

CRYPTBASE.dll A: 0x741B0000 - 0x741BA000 (C:\WINDOWS\System32\CRYPTBASE.dll)

bcryptPrimitives.dll A: 0x77440000 - 0x7749A000 (C:\WINDOWS\System32\bcryptPrimitives.dll)

sechost.dll A: 0x76500000 - 0x76541000 (C:\WINDOWS\System32\sechost.dll)

powrprof.dll A: 0x764B0000 - 0x764F5000 (C:\WINDOWS\System32\powrprof.dll)

advapi32.dll A: 0x744B0000 - 0x74527000 (C:\WINDOWS\System32\advapi32.dll)

shlwapi.dll A: 0x741E0000 - 0x74226000 (C:\WINDOWS\System32\shlwapi.dll)

GDI32.dll A: 0x76C40000 - 0x76C6B000 (C:\WINDOWS\System32\GDI32.dll)

gdi32full.dll A: 0x76AC0000 - 0x76C1B000 (C:\WINDOWS\System32\gdi32full.dll)

USER32.dll A: 0x75B10000 - 0x75C6F000 (C:\WINDOWS\System32\USER32.dll)

win32u.dll A: 0x77350000 - 0x77365000 (C:\WINDOWS\System32\win32u.dll)

kernel.appcore.dll A: 0x77190000 - 0x7719D000 (C:\WINDOWS\System32\kernel.appcore.dll)

shcore.dll A: 0x772B0000 - 0x77338000 (C:\WINDOWS\System32\shcore.dll)

profapi.dll A: 0x77200000 - 0x7720F000 (C:\WINDOWS\System32\profapi.dll)

WSOCK32.dll A: 0x672F0000 - 0x672F8000 (C:\WINDOWS\SYSTEM32\WSOCK32.dll)

WINMM.dll A: 0x734A0000 - 0x734C4000 (C:\WINDOWS\SYSTEM32\WINMM.dll)

WS2_32.dll A: 0x77100000 - 0x77163000 (C:\WINDOWS\System32\WS2_32.dll)

WINMMBASE.dll A: 0x00780000 - 0x007A3000 (C:\WINDOWS\SYSTEM32\WINMMBASE.dll)

IMM32.DLL A: 0x76480000 - 0x764A5000 (C:\WINDOWS\System32\IMM32.DLL)

sscanf.DLL A: 0x10000000 - 0x1000F000 (D:\Serveur SAMP\plugins\sscanf.DLL)

VCRUNTIME140.dll A: 0x70410000 - 0x70425000 (C:\WINDOWS\SYSTEM32\VCRUNTIME140.dll)

MSVCP100.dll A: 0x58290000 - 0x582F9000 (C:\WINDOWS\SYSTEM32\MSVCP100.dll)

dbghelp.dll A: 0x705E0000 - 0x70725000 (C:\WINDOWS\SYSTEM32\dbghelp.dll)

MSVCR100.dll A: 0x581D0000 - 0x5828F000 (C:\WINDOWS\SYSTEM32\MSVCR100.dll)

streamer.DLL A: 0x6F9B0000 - 0x6F9F8000 (D:\Serveur SAMP\plugins\streamer.DLL)

MSVCR120.dll A: 0x74010000 - 0x740FE000 (C:\WINDOWS\SYSTEM32\MSVCR120.dll)

MSVCP120.dll A: 0x73F60000 - 0x73FD1000 (C:\WINDOWS\SYSTEM32\MSVCP120.dll)

mysql.DLL A: 0x6F950000 - 0x6F9A5000 (D:\Serveur SAMP\plugins\mysql.DLL)

log-core.dll A: 0x6E150000 - 0x6E16E000 (D:\Serveur SAMP\log-core.dll)

libmariadb.dll A: 0x6E070000 - 0x6E14E000 (D:\Serveur SAMP\libmariadb.dll)

MSVCP140.dll A: 0x6E000000 - 0x6E06D000 (C:\WINDOWS\SYSTEM32\MSVCP140.dll)

napinsp.dll A: 0x707E0000 - 0x707F2000 (C:\WINDOWS\system32\napinsp.dll)

pnrpnsp.dll A: 0x707A0000 - 0x707B6000 (C:\WINDOWS\system32\pnrpnsp.dll)

NLAapi.dll A: 0x70780000 - 0x70794000 (C:\WINDOWS\system32\NLAapi.dll)

mswsock.dll A: 0x72850000 - 0x7289E000 (C:\WINDOWS\System32\mswsock.dll)

DNSAPI.dll A: 0x72120000 - 0x7219C000 (C:\WINDOWS\SYSTEM32\DNSAPI.dll)

NSI.dll A: 0x77340000 - 0x77347000 (C:\WINDOWS\System32\NSI.dll)

IPHLPAPI.DLL A: 0x73E90000 - 0x73EBF000 (C:\WINDOWS\SYSTEM32\IPHLPAPI.DLL)

winrnr.dll A: 0x70C80000 - 0x70C8C000 (C:\WINDOWS\System32\winrnr.dll)

wshbth.dll A: 0x70D00000 - 0x70D11000 (C:\WINDOWS\System32\wshbth.dll)

rasadhlp.dll A: 0x70C90000 - 0x70C98000 (C:\Windows\System32\rasadhlp.dll)

bcrypt.dll A: 0x728A0000 - 0x728BB000 (C:\WINDOWS\SYSTEM32\bcrypt.dll)
EDIT: When I remove query from OnGameModeExit, nothing happen, no crash.
pawn Код:
public OnGameModeExit()
{
    /*foreach(new rack : Racks) SaveRack(rack);
    foreach(new item : Items) SaveItem(item);
    foreach(new vehicle : Vehicles) SaveVehicle(vehicle);
    SaveServerInfos();*/

    return 1;
}
When I let just one, that crash, someone to guide me ?

Example with SaveServerInfos function:
pawn Код:
function SaveServerInfos()
{
    new requete[392];
    mysql_format(MySQLConnect, requete, sizeof(requete), "UPDATE serverinfos SET Maintenance = %d, DernierSac = %d, NomRangAdmin1 = '%e', NomRangAdmin2 = '%e', NomRangAdmin3 = '%e', \
        NomRangAdmin4 = '%e', NomRangAdmin5 = '%e' WHERE 1"
,
        InfosServeur[Maintenance], InfosServeur[DernierSac], InfosServeur[NomRangAdmin1], InfosServeur[NomRangAdmin2], InfosServeur[NomRangAdmin3],
        InfosServeur[NomRangAdmin4], InfosServeur[NomRangAdmin5]);
    mysql_tquery(MySQLConnect, requete);
    return print("[SERVEUR] Les informations serveurs ont йtй sauvegardйes.");
}
Reply
#2

PHP код:
WHERE 1", 
What is this? You didn't specified any column. Like WHERE `example` = '1'. Correct me if I'm wrong. Instead of tquery use query as you aren't calling any callback. This is the problem causing crash + check mysql log
Reply
#3

Hey.
WHERE 1 is just something normal to tell to MySQL that it is always true.
Isn't the problem.
tquery are threaded queries, they can't be the cause of the crash, we always need to use her.
+ Even if I have "mysql_log(ALL)", 0 file "mysql_log" in the main repertory, other problem.
Reply
#4

Have you tried by compiling with -d3 ?
Reply
#5

Nop I will try.
EDIT: New problem on log, samp_server.exe closes itself.
Quote:

[16:11:23] [join] Bodie has joined the server (0:XXX)
[16:11:23] [debug] Server crashed due to an unknown error
[16:11:23] [debug] Native backtrace:
[16:11:23] [debug] #0 004016eb in ?? () from samp-server.exe
[16:11:23] [debug] #1 66ea6cc9 in ?? () from plugins\mysql.DLL
[16:11:23] [debug] #2 66ea9712 in ?? () from plugins\mysql.DLL
[16:11:23] [debug] #3 66e8db57 in ?? () from plugins\mysql.DLL
[16:11:23] [debug] #4 66e8ecf4 in ?? () from plugins\mysql.DLL
[16:11:23] [debug] #5 66e8f47e in ?? () from plugins\mysql.DLL
[16:11:23] [debug] #6 00469a66 in ?? () from samp-server.exe
[16:11:23] [debug] #7 0048d4db in ?? () from samp-server.exe
[16:11:23] [debug] #8 0049b4a1 in ?? () from samp-server.exe
[16:11:23] [debug] #9 0049b4b1 in ?? () from samp-server.exe

Reply
#6

Deleted.
Reply
#7

@Yaa, mysql_format is correct, format doesn't have an %e specifier.
Reply
#8

Do you call mysql_close at all? If not, you should and that is probably the reason of the crash when using gmx.

Please update crashdetect plugin to its latest version, compile your scripts with debug info, enable mysql logging:
pawn Код:
mysql_log(ALL);

... = mysql_connect(...);
Delete logs folder completely, start the server, connect. If the server crashes like in the above case then show server log and logs/plugins/mysql.txt
Otherwise, use gmx to reproduce the first case (but this time with mysql_close in the script).
Reply
#9

If that even is a possibility? The problem might be that he is using a threaded query which can't complete fast enough because the server shuts down. (as Yaa already mention through code).
Reply
#10

ERROR, wait.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)