Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange crash #4

Closed
oscar-broman opened this issue Jun 17, 2012 · 4 comments
Closed

Strange crash #4

oscar-broman opened this issue Jun 17, 2012 · 4 comments

Comments

@oscar-broman
Copy link

I'm not sure where or what's causing this.. It happens occasionally, and not right after any special events.

[15:26:28] [debug] Server crashed due to an unknown error
[15:26:28] [debug] Native backtrace:
[15:26:29] [debug] #0  74b2155f in Load () from \\psf\Home\Desktop\PAWN-Boilerplate\plugins\crashdetect.DLL
[15:26:29] [debug] #1  74b22844 in Load () from \\psf\Home\Desktop\PAWN-Boilerplate\plugins\crashdetect.DLL
[15:26:29] [debug] #2  74b2470e in Load () from \\psf\Home\Desktop\PAWN-Boilerplate\plugins\crashdetect.DLL
[15:26:29] [debug] #3  75a2003f in GetProfileStringW () from C:\Windows\syswow64\kernel32.dll
[15:26:29] [debug] #4  0049cc86 in ?? () from \\psf\Home\Desktop\PAWN-Boilerplate\samp-server.exe
[15:26:29] [debug] #5  004960c0 in ?? () from \\psf\Home\Desktop\PAWN-Boilerplate\samp-server.exe
[15:26:29] [debug] #6  759e339a in BaseThreadInitThunk () from C:\Windows\syswow64\kernel32.dll
[15:26:29] [debug] #7  774c9ef2 in RtlInitializeExceptionChain () from C:\Windows\SysWOW64\ntdll.dll
[15:26:29] [debug] #8  774c9ec5 in RtlInitializeExceptionChain () from C:\Windows\SysWOW64\ntdll.dll
@Zeex
Copy link
Owner

Zeex commented Jun 17, 2012

Yeah those first three entries look pretty odd. Can you also post the contents of crashinfo.txt please?

Edit:

Now I get somewhat similar with 4.7.5 (well, I have three Load's in a row) but it becomes OK after re-compiling the same version...

Edit2:

After a bit of disassembling I can say that GetProfileStringW should actually be UnhandlerExceptionFilter, and the following three Loads are most likely ExceptionFilter, crashdetect::Crash and crashdetect::PrintNativeBacktrace so you backtrace becomes:

[15:26:29] [debug] #0  74b2155f in crashdetect::PrintNativeBacktrace () from \\psf\Home\Desktop\PAWN-Boilerplate\plugins\crashdetect.DLL
[15:26:29] [debug] #1  74b22844 in crashdetect::Crash () from \\psf\Home\Desktop\PAWN-Boilerplate\plugins\crashdetect.DLL
[15:26:29] [debug] #2  74b2470e in ExceptionFilter () from \\psf\Home\Desktop\PAWN-Boilerplate\plugins\crashdetect.DLL
[15:26:29] [debug] #3  75a2003f in UnhandledExceptionFilter () from C:\Windows\syswow64\kernel32.dll
[15:26:29] [debug] #4  0049cc86 in ?? () from \\psf\Home\Desktop\PAWN-Boilerplate\samp-server.exe
[15:26:29] [debug] #5  004960c0 in ?? () from \\psf\Home\Desktop\PAWN-Boilerplate\samp-server.exe
[15:26:29] [debug] #6  759e339a in BaseThreadInitThunk () from C:\Windows\syswow64\kernel32.dll
[15:26:29] [debug] #7  774c9ef2 in RtlInitializeExceptionChain () from C:\Windows\SysWOW64\ntdll.dll
[15:26:29] [debug] #8  774c9ec5 in RtlInitializeExceptionChain () from C:\Windows\SysWOW64\ntdll.dll

Not very helpful though. Those 0049cc86 and 004960c0 don't tell much as well, this is basically a call to UnhandledExceptionFilter.

crashinfo.txt would be more helpful in this case.

@oscar-broman
Copy link
Author

Alright, here it is:


SA-MP Server: 0.3e

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

Registers:
EAX: 0x038A8C93 EBX: 0x0001016E ECX: 0x025C5EF0 EDX: 0x0018FDD4
ESI: 0x00000000 EDI: 0x000080B7 EBP: 0x00000000 ESP: 0x0018FDA8
EFLAGS: 0x00010216

Stack:
+0000: 0x000080B7   0x02422836   0x0040174F   0x0259D798
+0010: 0x000080B7   0x0018FDD4   0x00000064   0x02422836
+0020: 0x759E10FF   0x00000000   0x0001016F   0x00000024
+0030: 0x00000001   0x00000000   0x00000000   0x00000000
+0040: 0x00000000   0x00000000   0x3CC49B2A   0x0047D4EA
+0050: 0x0259D798   0x0242283A   0x0018FE1C   0x759E1136
+0060: 0x00762518   0x3BC564F9   0x006C1108   0x00000000
+0070: 0x000001F4   0x0048A04A   0x00000000   0x0048A057
+0080: 0x759E16C5   0x00000000   0x3BC564F9   0x004866CE
+0090: 0x00000000   0x00001DB1   0x0018FF88   0x7EFDE000
+00A0: 0x0000E000   0x00010101   0x00000020   0x00001E61
+00B0: 0x000000A0   0x00000C40   0x00762518   0x656D6167
+00C0: 0x65646F6D   0x00003531   0x004BB014   0x004BB010
+00D0: 0x7EFDE000   0x004A4710   0x0018FE70   0x0018FF78
+00E0: 0x0018FF78   0x004965F8   0x004B13D8   0xFFFFFFFF
+00F0: 0x00494881   0x00494891   0x004A4710   0x0018FF78
+0100: 0x004A43A1   0xFFFFFFFF   0x00496095   0x00000001
+0110: 0x006C1700   0x006C1748   0x00000094   0x00000006
+0120: 0x00000001   0x00001DB1   0x00000002   0x76726553
+0130: 0x20656369   0x6B636150   0x00003120   0x00000000

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

Loaded Modules:
samp-server.exe A: 0x00400000 - 0x004EE000  (\\psf\Home\Desktop\PAWN-Boilerplate\samp-server.exe)
ntdll.dll   A: 0x77490000 - 0x77610000  (C:\Windows\SysWOW64\ntdll.dll)
kernel32.dll    A: 0x759D0000 - 0x75AE0000  (C:\Windows\syswow64\kernel32.dll)
KERNELBASE.dll  A: 0x75800000 - 0x75846000  (C:\Windows\syswow64\KERNELBASE.dll)
SHELL32.dll A: 0x75D80000 - 0x769CA000  (C:\Windows\syswow64\SHELL32.dll)
msvcrt.dll  A: 0x75450000 - 0x754FC000  (C:\Windows\syswow64\msvcrt.dll)
SHLWAPI.dll A: 0x74C20000 - 0x74C77000  (C:\Windows\syswow64\SHLWAPI.dll)
GDI32.dll   A: 0x75C00000 - 0x75C90000  (C:\Windows\syswow64\GDI32.dll)
USER32.dll  A: 0x769F0000 - 0x76AF0000  (C:\Windows\syswow64\USER32.dll)
ADVAPI32.dll    A: 0x76B30000 - 0x76BD0000  (C:\Windows\syswow64\ADVAPI32.dll)
sechost.dll A: 0x75790000 - 0x757A9000  (C:\Windows\SysWOW64\sechost.dll)
RPCRT4.dll  A: 0x75C90000 - 0x75D80000  (C:\Windows\syswow64\RPCRT4.dll)
SspiCli.dll A: 0x74B70000 - 0x74BD0000  (C:\Windows\syswow64\SspiCli.dll)
CRYPTBASE.dll   A: 0x74B60000 - 0x74B6C000  (C:\Windows\syswow64\CRYPTBASE.dll)
LPK.dll A: 0x74BD0000 - 0x74BDA000  (C:\Windows\syswow64\LPK.dll)
USP10.dll   A: 0x756F0000 - 0x7578D000  (C:\Windows\syswow64\USP10.dll)
WSOCK32.dll A: 0x733F0000 - 0x733F7000  (C:\Windows\system32\WSOCK32.dll)
WS2_32.dll  A: 0x76AF0000 - 0x76B25000  (C:\Windows\syswow64\WS2_32.dll)
NSI.dll A: 0x74C80000 - 0x74C86000  (C:\Windows\syswow64\NSI.dll)
WINMM.dll   A: 0x73380000 - 0x733B2000  (C:\Windows\system32\WINMM.dll)
IMM32.DLL   A: 0x75970000 - 0x759D0000  (C:\Windows\system32\IMM32.DLL)
MSCTF.dll   A: 0x75380000 - 0x7544C000  (C:\Windows\syswow64\MSCTF.dll)
MSVCP100.dll    A: 0x746B0000 - 0x74719000  (C:\Windows\system32\MSVCP100.dll)
MSVCR100.dll    A: 0x74260000 - 0x7431E000  (C:\Windows\system32\MSVCR100.dll)
sscanf.DLL  A: 0x10000000 - 0x1000C000  (\\psf\Home\Desktop\PAWN-Boilerplate\plugins\sscanf.DLL)
whirlpool.DLL   A: 0x003F0000 - 0x003FC000  (\\psf\Home\Desktop\PAWN-Boilerplate\plugins\whirlpool.DLL)
MSVCR80.dll A: 0x73550000 - 0x735EB000  (C:\Windows\WinSxS\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.6195_none_d09154e044272b9a\MSVCR80.dll)
mswsock.dll A: 0x72FF0000 - 0x7302C000  (C:\Windows\system32\mswsock.dll)
wshtcpip.dll    A: 0x72FE0000 - 0x72FE5000  (C:\Windows\System32\wshtcpip.dll)
NLAapi.dll  A: 0x72910000 - 0x72920000  (C:\Windows\system32\NLAapi.dll)
napinsp.dll A: 0x72900000 - 0x72910000  (C:\Windows\system32\napinsp.dll)
pnrpnsp.dll A: 0x728E0000 - 0x728F2000  (C:\Windows\system32\pnrpnsp.dll)
DNSAPI.dll  A: 0x72890000 - 0x728D4000  (C:\Windows\system32\DNSAPI.dll)
winrnr.dll  A: 0x72880000 - 0x72888000  (C:\Windows\System32\winrnr.dll)
wshbth.dll  A: 0x72870000 - 0x7287D000  (C:\Windows\system32\wshbth.dll)
mdnsNSP.dll A: 0x72840000 - 0x72861000  (C:\Program Files (x86)\Bonjour\mdnsNSP.dll)
Iphlpapi.DLL    A: 0x730C0000 - 0x730DC000  (C:\Windows\system32\Iphlpapi.DLL)
WINNSI.DLL  A: 0x730B0000 - 0x730B7000  (C:\Windows\system32\WINNSI.DLL)
rasadhlp.dll    A: 0x727F0000 - 0x727F6000  (C:\Windows\system32\rasadhlp.dll)

@Zeex
Copy link
Owner

Zeex commented Jun 17, 2012

From what I found this has something to do with bad public index and/or bad nameofs value in public table record and/or unterminated name string (missing trailing \0) because it crashed while getting public's name in amx_GetPublic and the call sequence was like

main -> something1 -> something2 -> amx_FindPublic -> amx_GetPublic -> crash

Some temporaries that could be useful:

  • index is 0x80B7 (the value of EDI)
  • hdr->publics is 0 (ESI)

Hope that helps.

@oscar-broman
Copy link
Author

Interesting, it could be either YSI or PAWN Boilerplate (both modify the AMX in various ways). I'll keep the server running with a few breakpoints set.

Thanks!

Zeex added a commit that referenced this issue Nov 26, 2012
[18:39:01] [debug] #0 00491f90 in ?? () from C:\samp-server\samp-server.exe
[18:39:01] [debug] #1 004925c0 in ?? () from C:\samp-server\samp-server.exe
[18:39:01] [debug] #2 00404f44 in ?? () from C:\samp-server\samp-server.exe
[18:39:01] [debug] #3 74cda023 in std::allocator<crashdetect::NPCall>::construct () from C:\samp-server\plugins\crashdetect.DLL
[18:39:01] [debug] #4 8b0c428d in ?? ()
[18:39:01] [debug] #5 e7f0b8ff in ?? ()
[18:39:01] [debug] #6 08e974d0 in ?? () from C:\samp-server\samp-server.exe
[18:39:01] [debug] #7 ccffff76 in ?? ()
[18:39:01] [debug] #8 cccccccc in ?? ()
[18:39:01] [debug] #9 cccccccc in ?? ()
[18:39:01] [debug] #10 cccccccc in ?? ()
[18:39:01] [debug] #11 cccccccc in ?? ()
[18:39:01] [debug] #12 8dcccccc in ?? ()
[18:39:01] [debug] #13 cbe9bc4d in ?? ()
[18:39:01] [debug] #14 8bfffa89 in ?? ()
[18:39:01] [debug] #15 e0838445 in ?? ()
[18:39:01] [debug] #16 0c840f01 in ?? () from C:\samp-server\samp-server.exe
[18:39:01] [debug] #17 83000000 in ?? ()
[18:39:01] [debug] #18 8bfe8465 in ?? ()
[18:39:01] [debug] #19 d5e9084d in ?? ()
[18:39:01] [debug] #20 c3fffa85 in ?? ()
[18:39:01] [debug] #21 e9d04d8d in ?? ()
[18:39:01] [debug] #22 fffa89aa in ?? ()
[18:39:01] [debug] #23 e9ac4d8d in ?? ()
[18:39:01] [debug] #24 fffa89a2 in ?? ()
[18:39:01] [debug] #25 e99c4d8d in ?? ()
[18:39:01] [debug] #26 fffa899a in ?? ()
[18:39:01] [debug] #27 e98c4d8d in ?? ()
[18:39:01] [debug] #28 fffa8992 in ?? ()
[18:39:01] [debug] #29 0824548b in ?? () from C:\samp-server\samp-server.exe
[18:39:01] [debug] #30 8b0c428d in ?? ()
[18:39:01] [debug] #31 ffff648a in ?? ()
[18:39:01] [debug] #32 e8c833ff in ?? ()
[18:39:01] [debug] #33 ffff75ab in ?? ()
[18:39:01] [debug] #34 d0e818b8 in ?? ()
[18:39:01] [debug] #35 7595e974 in ?? () from C:\samp-server\samp-server.exe
[18:39:01] [debug] #36 ccccffff in ?? ()
[18:39:01] [debug] #37 cccccccc in ?? ()
[18:39:01] [debug] #38 cccccccc in ?? ()
[18:39:01] [debug] #39 cccccccc in ?? ()
[18:39:01] [debug] #40 cccccccc in ?? ()
[18:39:01] [debug] #41 cccccccc in ?? ()
[18:39:01] [debug] #42 cccccccc in ?? ()
[18:39:01] [debug] #43 cccccccc in ?? ()
[18:39:01] [debug] #44 8dcccccc in ?? ()
[18:39:01] [debug] #45 30e90c4d in ?? () from C:\samp-server\samp-server.exe
[18:39:01] [debug] #46 8dfffa7c in ?? ()
[18:39:01] [debug] #47 28e9dc4d in ?? () from C:\samp-server\samp-server.exe
[18:39:01] [debug] #48 8bfffa7c in ?? ()
[18:39:01] [debug] #49 ffff6485 in ?? ()
[18:39:01] [debug] #50 01e083ff in ?? () from C:\samp-server\samp-server.exe
[18:39:01] [debug] #51 000f840f in ?? ()
[18:39:01] [debug] #52 a5830000 in ?? ()
[18:39:01] [debug] #53 ffffff64 in ?? ()
[18:39:01] [debug] #54 084d8bfe in ?? () from C:\samp-server\samp-server.exe
[18:39:01] [debug] #55 fa8925e9 in ?? ()
[18:39:01] [debug] #56 4d8dc3ff in ?? () from C:\samp-server\samp-server.exe
[18:39:01] [debug] #57 891ce9c8 in ?? ()
[18:39:01] [debug] #58 4d8dfffa in ?? () from C:\samp-server\samp-server.exe
[18:39:01] [debug] #59 8914e9b8 in ?? ()
[18:39:01] [debug] #60 858bfffa in ?? ()
[18:39:01] [debug] #61 ffffff64 in ?? ()
[18:39:01] [debug] #62 0f02e083 in ?? () from C:\samp-server\samp-server.exe
@zentaos zentaos mentioned this issue Sep 22, 2013
@ghost ghost mentioned this issue Sep 20, 2015
@Aleks4k Aleks4k mentioned this issue May 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants