• Welcome to Forum.Deepsoftware.Com. Please login or sign up.
 
April 27, 2024, 12:00:55 am

News:

SMF - Just Installed!


Access violation

Started by opc0de, June 05, 2012, 03:20:40 am

Previous topic - Next topic

opc0de

I have an event in OnSms Received witch causes sometimes an access violation in TnrPduSms.GetPhone. Here is the error log :
This error ocurrs after 50 - 70 sms received.



date/time         : 2012-06-05, 09:04:12, 254ms
computer name     : OPC0DE-PC
user name         : opc0de <admin>
registered owner  : opc0de
operating system  : Windows 7 x64 Service Pack 1 build 7601
system language   : English
system up time    : 3 days 23 hours
program up time   : 15 hours 16 minutes
processors        : 2x Pentium(R) Dual-Core CPU E5700 @ 3.00GHz
physical memory   : 1664/4061 MB (free/total)
free disk space   : (C:) 60.82 GB (D:) 99.52 GB
display mode      : 1360x768, 32 bit
process id        : $1728
allocated memory  : 39.12 MB
executable        : SmsGateway.exe
exec. date/time   : 2012-06-04 17:48
version           : 1.0.0.0
compiled with     : Delphi XE2
madExcept version : 3.0n
callstack crc     : $50107c82, $fd99a1b9, $43a92ff4
count             : 2
exception number  : 1
exception class   : EAccessViolation
exception message : Access violation at address 005A7CAA in module 'SmsGateway.exe'. Read of address 00000004.

thread $178 (TSmsThread):
005a7caa +012 SmsGateway.exe nrgsmpdu        643  +1 TnrPduSms.GetPhone
007d2766 +072 SmsGateway.exe uMain           140  +3 TForm1.gsmSmsReceived
005aee50 +14c SmsGateway.exe nrgsm          1418 +30 TnrGsm.DoProcessNotifySms
005ab5bd +035 SmsGateway.exe nrgsm           500  +3 TSmsThread.DoSynchroEvent
005ab5d2 +00a SmsGateway.exe nrgsm           506  +2 TSmsThread.Execute
004b6bcf +02b SmsGateway.exe madExcept               HookedTThreadExecute
00480eca +042 SmsGateway.exe System.Classes          ThreadProc
00407cf0 +028 SmsGateway.exe System          928  +0 ThreadWrapper
004b6ab1 +00d SmsGateway.exe madExcept               CallThreadProcSafe
004b6b1b +037 SmsGateway.exe madExcept               ThreadExceptFrame
75773398 +010 kernel32.dll                           BaseThreadInitThunk
>> created by main thread ($c7c) at:
00407d5a +05a SmsGateway.exe System          928  +0 BeginThread

main thread ($c7c):
7547f5b7 +00e USER32.dll                      WaitMessage
0058de1d +149 SmsGateway.exe Vcl.Forms        TApplication.Idle
0058d043 +017 SmsGateway.exe Vcl.Forms        TApplication.HandleMessage
0058d369 +0c9 SmsGateway.exe Vcl.Forms        TApplication.Run
007e20b7 +03b SmsGateway.exe SmsGateway 17 +3 initialization
75773398 +010 kernel32.dll                    BaseThreadInitThunk

thread $1798:
77aa0136 +0e ntdll.dll     NtWaitForMultipleObjects
75773398 +10 kernel32.dll  BaseThreadInitThunk

thread $748 (TMsgThread):
75457908 +26 USER32.dll                           GetMessageW
0059ef0e +b6 SmsGateway.exe nrcomm         416 +3 TMsgThread.Execute
004b6bcf +2b SmsGateway.exe madExcept             HookedTThreadExecute
00480eca +42 SmsGateway.exe System.Classes        ThreadProc
00407cf0 +28 SmsGateway.exe System         928 +0 ThreadWrapper
004b6ab1 +0d SmsGateway.exe madExcept             CallThreadProcSafe
004b6b1b +37 SmsGateway.exe madExcept             ThreadExceptFrame
75773398 +10 kernel32.dll                         BaseThreadInitThunk
>> created by main thread ($c7c) at:
00407d5a +5a SmsGateway.exe System         928 +0 BeginThread

thread $16b8 (TCommThread):
77a9f8aa +0e ntdll.dll                             NtWaitForSingleObject
759c0a8b +92 KERNELBASE.dll                        WaitForSingleObjectEx
7577118f +3e kernel32.dll                          WaitForSingleObjectEx
75771143 +0d kernel32.dll                          WaitForSingleObject
0059ed11 +75 SmsGateway.exe nrcomm         359 +12 TCommThread.Execute
004b6bcf +2b SmsGateway.exe madExcept              HookedTThreadExecute
00480eca +42 SmsGateway.exe System.Classes         ThreadProc
00407cf0 +28 SmsGateway.exe System         928  +0 ThreadWrapper
004b6ab1 +0d SmsGateway.exe madExcept              CallThreadProcSafe
004b6b1b +37 SmsGateway.exe madExcept              ThreadExceptFrame
75773398 +10 kernel32.dll                          BaseThreadInitThunk
>> created by main thread ($c7c) at:
00407d5a +5a SmsGateway.exe System         928  +0 BeginThread

thread $eac (TMsgThread):
75457908 +26 USER32.dll                           GetMessageW
0059ef0e +b6 SmsGateway.exe nrcomm         416 +3 TMsgThread.Execute
004b6bcf +2b SmsGateway.exe madExcept             HookedTThreadExecute
00480eca +42 SmsGateway.exe System.Classes        ThreadProc
00407cf0 +28 SmsGateway.exe System         928 +0 ThreadWrapper
004b6ab1 +0d SmsGateway.exe madExcept             CallThreadProcSafe
004b6b1b +37 SmsGateway.exe madExcept             ThreadExceptFrame
75773398 +10 kernel32.dll                         BaseThreadInitThunk
>> created by main thread ($c7c) at:
00407d5a +5a SmsGateway.exe System         928 +0 BeginThread

thread $1754 (TCommThread):
77a9f8aa +0e ntdll.dll                             NtWaitForSingleObject
759c0a8b +92 KERNELBASE.dll                        WaitForSingleObjectEx
7577118f +3e kernel32.dll                          WaitForSingleObjectEx
75771143 +0d kernel32.dll                          WaitForSingleObject
0059ed11 +75 SmsGateway.exe nrcomm         359 +12 TCommThread.Execute
004b6bcf +2b SmsGateway.exe madExcept              HookedTThreadExecute
00480eca +42 SmsGateway.exe System.Classes         ThreadProc
00407cf0 +28 SmsGateway.exe System         928  +0 ThreadWrapper
004b6ab1 +0d SmsGateway.exe madExcept              CallThreadProcSafe
004b6b1b +37 SmsGateway.exe madExcept              ThreadExceptFrame
75773398 +10 kernel32.dll                          BaseThreadInitThunk
>> created by main thread ($c7c) at:
00407d5a +5a SmsGateway.exe System         928  +0 BeginThread

thread $6b8 (TMsgThread):
75457908 +26 USER32.dll                           GetMessageW
0059ef0e +b6 SmsGateway.exe nrcomm         416 +3 TMsgThread.Execute
004b6bcf +2b SmsGateway.exe madExcept             HookedTThreadExecute
00480eca +42 SmsGateway.exe System.Classes        ThreadProc
00407cf0 +28 SmsGateway.exe System         928 +0 ThreadWrapper
004b6ab1 +0d SmsGateway.exe madExcept             CallThreadProcSafe
004b6b1b +37 SmsGateway.exe madExcept             ThreadExceptFrame
75773398 +10 kernel32.dll                         BaseThreadInitThunk
>> created by main thread ($c7c) at:
00407d5a +5a SmsGateway.exe System         928 +0 BeginThread

thread $8b0 (TCommThread):
77a9f8aa +0e ntdll.dll                             NtWaitForSingleObject
759c0a8b +92 KERNELBASE.dll                        WaitForSingleObjectEx
7577118f +3e kernel32.dll                          WaitForSingleObjectEx
75771143 +0d kernel32.dll                          WaitForSingleObject
0059ed11 +75 SmsGateway.exe nrcomm         359 +12 TCommThread.Execute
004b6bcf +2b SmsGateway.exe madExcept              HookedTThreadExecute
00480eca +42 SmsGateway.exe System.Classes         ThreadProc
00407cf0 +28 SmsGateway.exe System         928  +0 ThreadWrapper
004b6ab1 +0d SmsGateway.exe madExcept              CallThreadProcSafe
004b6b1b +37 SmsGateway.exe madExcept              ThreadExceptFrame
75773398 +10 kernel32.dll                          BaseThreadInitThunk
>> created by main thread ($c7c) at:
00407d5a +5a SmsGateway.exe System         928  +0 BeginThread

thread $1724:
77aa1f1f +0b ntdll.dll     NtWaitForWorkViaWorkerFactory
75773398 +10 kernel32.dll  BaseThreadInitThunk


cpu registers:
eax = 03f5fdfc
ebx = 049a5e80
ecx = fffffffe
edx = 00000000
esi = 023313a0
edi = 00000000
eip = 005a7caa
esp = 03f5fd48
ebp = 03f5fd50

stack dump:
03f5fd48  fc fd f5 03 00 00 00 00 - 60 fe f5 03 6b 27 7d 00  ........`...k'}.
03f5fd58  20 30 7d 00 70 fe f5 03 - 18 74 40 00 60 fe f5 03  .0}.p....t@.`...
03f5fd68  80 5e 9a 04 00 00 00 00 - 00 00 00 00 00 00 00 00  .^..............
03f5fd78  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
03f5fd88  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
03f5fd98  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
03f5fda8  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
03f5fdb8  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
03f5fdc8  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
03f5fdd8  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
03f5fde8  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
03f5fdf8  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
03f5fe08  80 5e 9a 04 00 00 00 00 - 00 00 00 00 00 00 00 00  .^..............
03f5fe18  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
03f5fe28  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
03f5fe38  00 00 00 00 00 00 00 00 - 00 00 00 00 d0 c2 34 02  ..............4.
03f5fe48  00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00  ................
03f5fe58  00 00 00 00 10 42 9e 04 - b4 fe f5 03 56 ee 5a 00  .....B......V.Z.
03f5fe68  00 00 00 00 32 00 00 00 - d4 fe f5 03 18 74 40 00  ....2........t@.
03f5fe78  b4 fe f5 03 c8 b5 5a 00 - 2c d4 a4 04 11 00 00 00  ......Z.,.......

disassembling:
[...]
005a7c9b       add     esp, -8
005a7c9e       mov     [ebp-8], edx
005a7ca1       mov     [ebp-4], eax
005a7ca4 643   mov     eax, [ebp-8]
005a7ca7       mov     edx, [ebp-4]
005a7caa     > mov     edx, [edx+4]
005a7cad       call    -$19fa8e ($408224)     ; System.@UStrAsg
005a7cb2 644   pop     ecx
005a7cb3       pop     ecx
005a7cb4       pop     ebp
005a7cb5       ret

chinachengxinyong

you need past source code on here then our roman can help you.we can learn from his suggestion