Hi,
please advise how to circumvent the folowing problem.
If i add any item for example:
RichView1->AddBulletEx("", 5, ImageList2, 0);
after i compile and click 3 times on the item i inserted (can be anything, picture, text, etc) the program raises an exception EAccessViolation with the message: "Access violation at address xxxx in module yyyy. Read of address 00000....'
This hapens only one time, at firsdt 3 clicks, after that no matter what item i click ot how many times, will never raise the exception again. But it happes all the time first time after the execution of the program.
Where should i add a try - catch to ensure will not raise this exception anymore ?
Thank you
Clicking multiple times on an object gives exception
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Are you sure you do not have any code in events (OnClick, OnRVMouseUp/Down, OnSelect, etc.) that causes this exception?
To find where this exception occurs, I need to view a call stack at the moment of the exception.
Compile your project with:
- optimization off
- stack frames on
- all debug info on
(you can find these options on the Compiler page of the Project Options).
When the exception occurs, open a call stack window (View | Debug Windows | Call Stack). In this window, press Ctrl+A to select all items, then Ctrl+C to copy them to the Clipboard.
To find where this exception occurs, I need to view a call stack at the moment of the exception.
Compile your project with:
- optimization off
- stack frames on
- all debug info on
(you can find these options on the Compiler page of the Project Options).
When the exception occurs, open a call stack window (View | Debug Windows | Call Stack). In this window, press Ctrl+A to select all items, then Ctrl+C to copy them to the Clipboard.
Hi,
7C812A5B C:\WINDOWS\system32\kernel32.dll
006F159B System::_16583
7C90378B ntdll.dll
7C90EAFA ntdll.dll
007472F7 Richview::TCustomRichView::WMRVDragDrop
006B162B Controls::TWinControl::MainWndProc
00696C0A Forms::_16460
7E418734 C:\WINDOWS\system32\USER32.dll
7E418816 C:\WINDOWS\system32\USER32.dll
7E4189CD C:\WINDOWS\system32\USER32.dll
7E4196C7 C:\WINDOWS\system32\USER32.dll
0069F5DC Forms::TApplication::ProcessMessage
00401323 WinMain( =:00400000, =NULL, =:00141F0C, =9)
006FC833 __startup
This is the Call Stack.
I do nat have any events programmed. This happens since when i started to use it.
Since i use MadExcept too, here is a comprehensive one:
date/time : 2008-06-30, 01:27:21, 125ms
computer name : 00-90-F5-4C-9C-
user name : Your Username <admin>
registered owner : Your Username / Your Company
operating system : Windows XP Service Pack 2 build 2600
system language : English
system up time : 11 hours 57 minutes
program up time : 1 second
processors : 2x AMD Athlon(tm) 64 FX-60 Dual Core Processor
physical memory : 1400/2047 MB (free/total)
free disk space : (C:) 14.44 GB
display mode : 1920x1200, 32 bit
process id : $92c
allocated memory : 30.22 MB
executable : chatclientP.exe
exec. date/time : 2008-06-30 01:26
compiled with : BCB5
madExcept version : 3.0h
callstack crc : $067ac47f, $0e98f1f7, $0e98f1f7
count : 2
exception number : 1
exception class : EAccessViolation
exception message : Access violation at address 006F59B4 in module 'chatclientP.exe'. Read of address 00000000.
main thread ($d9c):
006f59b4 +01c chatclientP.exe System @IntfCast
0079cbb4 +07c chatclientP.exe CRVFData TCustomRVFormattedData.DoDrag
007478c2 +006 chatclientP.exe RichView TCustomRichView.WMRVDragDrop
006af465 +111 chatclientP.exe Controls TControl.WndProc
006b1ff6 +1d2 chatclientP.exe Controls TWinControl.WndProc
7c90eae0 +010 ntdll.dll KiUserCallbackDispatcher
006b1bf8 +02c chatclientP.exe Controls TWinControl.MainWndProc
006971d8 +014 chatclientP.exe Forms _16460
7e4196c2 +00a USER32.dll DispatchMessageA
0069fba7 +083 chatclientP.exe Forms TApplication.ProcessMessage
0069fbde +00a chatclientP.exe Forms TApplication.HandleMessage
0069fde9 +081 chatclientP.exe Forms TApplication.Run
0040131e +05e chatclientP.exe chatclientP.cpp 21 +7 WinMain
006fce00 +14c chatclientP.exe __startup
thread $3e8: <priority:15>
7c90e9a9 +a ntdll.dll NtWaitForMultipleObjects
cpu registers:
eax = 00000000
ebx = 007ca4a0
ecx = 00000000
edx = 01227488
esi = 0012fde4
edi = 0012fe5c
eip = 006f59b4
esp = 0012fbf8
ebp = 0012fc64
stack dump:
0012fbf8 88 74 22 01 0c cd 79 00 - 38 fc 12 00 b9 cb 79 00 .t"...y.8.....y.
0012fc08 01 00 00 00 5c fc 12 00 - 1c fc 12 00 14 1f 6f 00 ....\.........o.
0012fc18 64 fc 12 00 b4 fd 12 00 - 14 1f 6f 00 64 fc 12 00 d.........o.d...
0012fc28 b4 5f 20 01 b4 5f 20 01 - 18 53 74 00 00 00 00 00 ._..._...St.....
0012fc38 00 00 00 00 92 f6 6a 00 - 3b 00 00 00 4f 00 00 00 ......j.;...O...
0012fc48 5c fe 12 00 e4 fd 12 00 - b4 5f 20 01 80 74 22 01 \........_...t".
0012fc58 01 00 00 00 5c fe 12 00 - 2c 64 20 01 ac fd 12 00 ....\...,d......
0012fc68 c7 78 74 00 68 f4 6a 00 - 5c fe 12 00 e4 fd 12 00 .xt.h.j.\.......
0012fc78 b4 5f 20 01 fb 1f 6b 00 - 5c fe 12 00 60 0f 41 01 ._....k.\...`.A.
0012fc88 b4 5f 20 01 00 d0 fd 7f - 01 00 00 00 00 00 44 01 ._............D.
0012fc98 87 00 09 00 88 fc 12 00 - 10 02 00 00 fc fc 12 00 ................
0012fca8 e7 e5 75 74 20 0f 73 74 - ff ff ff ff 19 0f 73 74 ..ut..st......st
0012fcb8 4a f8 41 7e 00 00 00 00 - 01 00 00 00 50 fd 12 00 J.A~........P...
0012fcc8 01 00 03 00 00 d0 fd 7f - 0c fd 12 00 f6 f7 41 7e ..............A~
0012fcd8 00 00 03 00 01 00 00 00 - 50 fd 12 00 05 f8 41 7e ........P.....A~
0012fce8 01 00 03 00 00 d0 fd 7f - 01 00 00 00 e8 fc 12 00 ................
0012fcf8 00 00 00 00 20 fe 12 00 - 57 04 44 7e 08 f8 41 7e ........W.D~..A~
0012fd08 ff ff ff ff 05 f8 41 7e - 4b f9 41 7e 40 fd 12 00 ......A~K.A~@...
0012fd18 50 fd 12 00 5b f9 41 7e - 00 00 00 00 00 00 00 00 P...[.A~........
0012fd28 20 00 00 00 50 fd 12 00 - 94 fd 12 00 e3 ea 90 7c ....P..........|
disassembling:
[...]
00401306 mov ecx, [$840b58] ; _Form2
0040130c mov edx, [$821f74]
00401312 call +$29e9d1 ($69fce8) ; Forms.TApplication.CreateForm
00401317 21 mov eax, [$840d40]
0040131c mov eax, [eax]
0040131e > call +$29ea45 ($69fd68) ; Forms.TApplication.Run
00401323 22 mov word ptr [ebp-$18], 0
00401329 jmp loc_401346
00401346 27 xor eax, eax
00401348 mov edx, [ebp-$28]
0040134b mov fs:[0], edx
[...]
Regards
7C812A5B C:\WINDOWS\system32\kernel32.dll
006F159B System::_16583
7C90378B ntdll.dll
7C90EAFA ntdll.dll
007472F7 Richview::TCustomRichView::WMRVDragDrop
006B162B Controls::TWinControl::MainWndProc
00696C0A Forms::_16460
7E418734 C:\WINDOWS\system32\USER32.dll
7E418816 C:\WINDOWS\system32\USER32.dll
7E4189CD C:\WINDOWS\system32\USER32.dll
7E4196C7 C:\WINDOWS\system32\USER32.dll
0069F5DC Forms::TApplication::ProcessMessage
00401323 WinMain( =:00400000, =NULL, =:00141F0C, =9)
006FC833 __startup
This is the Call Stack.
I do nat have any events programmed. This happens since when i started to use it.
Since i use MadExcept too, here is a comprehensive one:
date/time : 2008-06-30, 01:27:21, 125ms
computer name : 00-90-F5-4C-9C-
user name : Your Username <admin>
registered owner : Your Username / Your Company
operating system : Windows XP Service Pack 2 build 2600
system language : English
system up time : 11 hours 57 minutes
program up time : 1 second
processors : 2x AMD Athlon(tm) 64 FX-60 Dual Core Processor
physical memory : 1400/2047 MB (free/total)
free disk space : (C:) 14.44 GB
display mode : 1920x1200, 32 bit
process id : $92c
allocated memory : 30.22 MB
executable : chatclientP.exe
exec. date/time : 2008-06-30 01:26
compiled with : BCB5
madExcept version : 3.0h
callstack crc : $067ac47f, $0e98f1f7, $0e98f1f7
count : 2
exception number : 1
exception class : EAccessViolation
exception message : Access violation at address 006F59B4 in module 'chatclientP.exe'. Read of address 00000000.
main thread ($d9c):
006f59b4 +01c chatclientP.exe System @IntfCast
0079cbb4 +07c chatclientP.exe CRVFData TCustomRVFormattedData.DoDrag
007478c2 +006 chatclientP.exe RichView TCustomRichView.WMRVDragDrop
006af465 +111 chatclientP.exe Controls TControl.WndProc
006b1ff6 +1d2 chatclientP.exe Controls TWinControl.WndProc
7c90eae0 +010 ntdll.dll KiUserCallbackDispatcher
006b1bf8 +02c chatclientP.exe Controls TWinControl.MainWndProc
006971d8 +014 chatclientP.exe Forms _16460
7e4196c2 +00a USER32.dll DispatchMessageA
0069fba7 +083 chatclientP.exe Forms TApplication.ProcessMessage
0069fbde +00a chatclientP.exe Forms TApplication.HandleMessage
0069fde9 +081 chatclientP.exe Forms TApplication.Run
0040131e +05e chatclientP.exe chatclientP.cpp 21 +7 WinMain
006fce00 +14c chatclientP.exe __startup
thread $3e8: <priority:15>
7c90e9a9 +a ntdll.dll NtWaitForMultipleObjects
cpu registers:
eax = 00000000
ebx = 007ca4a0
ecx = 00000000
edx = 01227488
esi = 0012fde4
edi = 0012fe5c
eip = 006f59b4
esp = 0012fbf8
ebp = 0012fc64
stack dump:
0012fbf8 88 74 22 01 0c cd 79 00 - 38 fc 12 00 b9 cb 79 00 .t"...y.8.....y.
0012fc08 01 00 00 00 5c fc 12 00 - 1c fc 12 00 14 1f 6f 00 ....\.........o.
0012fc18 64 fc 12 00 b4 fd 12 00 - 14 1f 6f 00 64 fc 12 00 d.........o.d...
0012fc28 b4 5f 20 01 b4 5f 20 01 - 18 53 74 00 00 00 00 00 ._..._...St.....
0012fc38 00 00 00 00 92 f6 6a 00 - 3b 00 00 00 4f 00 00 00 ......j.;...O...
0012fc48 5c fe 12 00 e4 fd 12 00 - b4 5f 20 01 80 74 22 01 \........_...t".
0012fc58 01 00 00 00 5c fe 12 00 - 2c 64 20 01 ac fd 12 00 ....\...,d......
0012fc68 c7 78 74 00 68 f4 6a 00 - 5c fe 12 00 e4 fd 12 00 .xt.h.j.\.......
0012fc78 b4 5f 20 01 fb 1f 6b 00 - 5c fe 12 00 60 0f 41 01 ._....k.\...`.A.
0012fc88 b4 5f 20 01 00 d0 fd 7f - 01 00 00 00 00 00 44 01 ._............D.
0012fc98 87 00 09 00 88 fc 12 00 - 10 02 00 00 fc fc 12 00 ................
0012fca8 e7 e5 75 74 20 0f 73 74 - ff ff ff ff 19 0f 73 74 ..ut..st......st
0012fcb8 4a f8 41 7e 00 00 00 00 - 01 00 00 00 50 fd 12 00 J.A~........P...
0012fcc8 01 00 03 00 00 d0 fd 7f - 0c fd 12 00 f6 f7 41 7e ..............A~
0012fcd8 00 00 03 00 01 00 00 00 - 50 fd 12 00 05 f8 41 7e ........P.....A~
0012fce8 01 00 03 00 00 d0 fd 7f - 01 00 00 00 e8 fc 12 00 ................
0012fcf8 00 00 00 00 20 fe 12 00 - 57 04 44 7e 08 f8 41 7e ........W.D~..A~
0012fd08 ff ff ff ff 05 f8 41 7e - 4b f9 41 7e 40 fd 12 00 ......A~K.A~@...
0012fd18 50 fd 12 00 5b f9 41 7e - 00 00 00 00 00 00 00 00 P...[.A~........
0012fd28 20 00 00 00 50 fd 12 00 - 94 fd 12 00 e3 ea 90 7c ....P..........|
disassembling:
[...]
00401306 mov ecx, [$840b58] ; _Form2
0040130c mov edx, [$821f74]
00401312 call +$29e9d1 ($69fce8) ; Forms.TApplication.CreateForm
00401317 21 mov eax, [$840d40]
0040131c mov eax, [eax]
0040131e > call +$29ea45 ($69fd68) ; Forms.TApplication.Run
00401323 22 mov word ptr [ebp-$18], 0
00401329 jmp loc_401346
00401346 27 xor eax, eax
00401348 mov edx, [ebp-$28]
0040134b mov fs:[0], edx
[...]
Regards
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Hmm, does it happen only in your application, or in any demo project created with TRichView?
What version of TRichView do you use?
What line exactly in TCustomRVFormattedData.DoDrag generates the exception? (probably your project was not compiled with stack frames on, so this function is not shown in the stack window, but the error definitely occurs in TCustomRVFormattedData.DoDrag).
I cannot reproduce this problem, and it looks like it is specific to your application/system, because otherwise TRichView would be unusable.
What version of TRichView do you use?
What line exactly in TCustomRVFormattedData.DoDrag generates the exception? (probably your project was not compiled with stack frames on, so this function is not shown in the stack window, but the error definitely occurs in TCustomRVFormattedData.DoDrag).
I cannot reproduce this problem, and it looks like it is specific to your application/system, because otherwise TRichView would be unusable.
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: