{ Clear ListViewLayers }
try
if Assigned(ListViewLayers1.Items) then
ListViewLayers1.Clear;
except
on E: Exception do
begin
ShowMessage(E.ClassName + #10#13 + E.Message);
end;
end;
지우기를 호출하기 전에 목록 뷰가 비어 있는지 확인할 수있는 방법은 무엇입니까?할당 (ListViewLayers1.Items)이 예외를 생성하는 이유
예외는 EAccessViolation입니다. 그러나 ListViewLayers1이 디자인 타임에 만들어졌고 앱 수명 내내 다른 시간에 액세스 할 수있는 이유를 이해하지 못합니다. 오류를 가정
EurekaLog 7.0.7.1
Exception:
--------------------------------------------------------------------------------------------------------------
2.2 Address: 00D2E79E
2.5 Type : EAccessViolation
2.6 Message: Access violation at address 00D2E79E in module 'FaceBookDesigner.exe'. Read of address 00000000
2.7 ID : 20970000
2.11 Sent : 0
User:
-------------------------
3.2 Name : Windows User
3.3 Email:
Steps to reproduce:
------------
8.1 Text:
Call Stack Information:
-------------------------------------------------------------------------------------------------------------------------------------------------------------
|Methods |Details|Stack |Address |Module |Offset |Unit |Class |Procedure/Method |Line |
-------------------------------------------------------------------------------------------------------------------------------------------------------------
|*Exception Thread: ID=10000; Parent=0; Priority=0 |
|Class=; Name=MAIN |
|DeadLock=0; Wait Chain= |
|Comment= |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Processes Information:
----------------------
Assembler Information:
---------------------------------------------------------------------------------------------------------------------------
; Base Address: $D2E000, Allocation Base: $400000, Region Size: 94208
; Allocation Protect: PAGE_EXECUTE_WRITECOPY, Protect: PAGE_EXECUTE_READ
; State: MEM_COMMIT, Type: MEM_IMAGE
;
;
; Unit1.TForm1.UpdateGUI (Line=1803 - Offset=8)
; ---------------------------------------------
00D2E738 8B45FC MOV EAX, [EBP-4]
00D2E73B 8B80A0030000 MOV EAX, [EAX+$000003A0]
00D2E741 8B90D0060000 MOV EDX, [EAX+$000006D0]
00D2E747 8B45FC MOV EAX, [EBP-4]
00D2E74A 8B80A0030000 MOV EAX, [EAX+$000003A0]
00D2E750 E86FBEE6FF CALL -$194191 ; ($00B9A5C4) imageenview.TImageEnView.GetLayer
00D2E755 8B8080000000 MOV EAX, [EAX+$00000080]
00D2E75B BA20EAD200 MOV EDX, $00D2EA20 ; ($00D2EA20) Unit1.TForm1.UpdateGUI (Line=1829) ANSI: 'Border'
00D2E760 E81FD26DFF CALL -$922DE1 ; ($0040B984) System._LStrEqual
00D2E765 7518 JNZ +$18 ; ($00D2E77F) Unit1.TForm1.UpdateGUI (Line=1806)
;
; Line=1804 - Offset=55
; ---------------------
00D2E767 BA34EAD200 MOV EDX, $00D2EA34 ; ($00D2EA34) Unit1.TForm1.UpdateGUI (Line=1829) UNICODE: 'Replace'
00D2E76C 8B45FC MOV EAX, [EBP-4]
00D2E76F 8B8018040000 MOV EAX, [EAX+$00000418]
00D2E775 8B08 MOV ECX, [EAX]
00D2E777 FF9120010000 CALL DWORD PTR [ECX+$00000120]
00D2E77D EB16 JMP +$16 ; ($00D2E795) Unit1.TForm1.UpdateGUI (Line=1808)
;
; Line=1806 - Offset=79
; ---------------------
00D2E77F BA50EAD200 MOV EDX, $00D2EA50 ; ($00D2EA50) Unit1.TForm1.UpdateGUI (Line=1829) UNICODE: 'Border'
00D2E784 8B45FC MOV EAX, [EBP-4]
00D2E787 8B8018040000 MOV EAX, [EAX+$00000418]
00D2E78D 8B08 MOV ECX, [EAX]
00D2E78F FF9120010000 CALL DWORD PTR [ECX+$00000120]
;
; Line=1808 - Offset=101
; ----------------------
00D2E795 8B45FC MOV EAX, [EBP-4]
00D2E798 8B80B0030000 MOV EAX, [EAX+$000003B0]
;
; Line=1808 - Offset=110
; ----------------------
00D2E79E 8B10 MOV EDX, [EAX] ; <-- EXCEPTION
00D2E7A0 FF9200010000 CALL DWORD PTR [EDX+$00000100]
00D2E7A6 8BD8 MOV EBX, EAX
00D2E7A8 8B45FC MOV EAX, [EBP-4]
00D2E7AB 8B80B0030000 MOV EAX, [EAX+$000003B0]
00D2E7B1 8B80B4020000 MOV EAX, [EAX+$000002B4]
00D2E7B7 E8282B95FF CALL -$6AD4D8 ; ($006812E4) Vcl.TListItems.GetCount
00D2E7BC 48 DEC EAX
00D2E7BD 3BD8 CMP EBX, EAX
00D2E7BF 7D17 JGE +$17 ; ($00D2E7D8) Unit1.TForm1.UpdateGUI (Line=1808)
00D2E7C1 8B45FC MOV EAX, [EBP-4]
00D2E7C4 8B80B0030000 MOV EAX, [EAX+$000003B0]
00D2E7CA 8B80B4020000 MOV EAX, [EAX+$000002B4]
00D2E7D0 E80F2B95FF CALL -$6AD4F1 ; ($006812E4) Vcl.TListItems.GetCount
00D2E7D5 48 DEC EAX
00D2E7D6 7F04 JG +4 ; ($00D2E7DC) Unit1.TForm1.UpdateGUI (Line=1808)
00D2E7D8 33D2 XOR EDX, EDX
Registers:
-----------------------------
EAX: 00000000 EDI: 0018FABC
EBX: 00D2C96F ESI: 00000000
ECX: 0018FAB0 EBP: 0018FAC0
EDX: 00000000 ESP: 0018FAB8
EIP: 00D2E79E FLG: 00010246
EXP: 00D2E79E STK: 0018FAC0
Stack: Memory Dump:
------------------ ---------------------------------------------------------------------------
0018FAFC: 0018FB28 00D2E79E: 8B 10 FF 92 00 01 00 00 8B D8 8B 45 FC 8B 80 B0 ...........E....
0018FAF8: 04641BC0 00D2E7AE: 03 00 00 8B 80 B4 02 00 00 E8 28 2B 95 FF 48 3B ..........(+..H;
0018FAF4: 06091090 00D2E7BE: D8 7D 17 8B 45 FC 8B 80 B0 03 00 00 8B 80 B4 02 .}..E...........
0018FAF0: 0878A920 00D2E7CE: 00 00 E8 0F 2B 95 FF 48 7F 04 33 D2 EB 02 B2 01 ....+..H..3.....
0018FAEC: 00000000 00D2E7DE: 8B 45 FC 8B 80 58 04 00 00 8B 08 FF 91 80 00 00 .E...X..........
0018FAE8: 00000000 00D2E7EE: 00 8B 45 FC 8B 80 B0 03 00 00 8B 10 FF 92 00 01 ..E.............
0018FAE4: 00000000 00D2E7FE: 00 00 85 C0 7E 17 8B 45 FC 8B 80 B0 03 00 00 8B ....~..E........
0018FAE0: 00000000 00D2E80E: 80 B4 02 00 00 E8 CC 2A 95 FF 48 7F 04 33 D2 EB .......*..H..3..
0018FADC: 0878A920 00D2E81E: 02 B2 01 8B 45 FC 8B 80 5C 04 00 00 8B 08 FF 91 ....E...\.......
0018FAD8: 0091D1DC 00D2E82E: 80 00 00 00 8B 45 FC 8B 80 B0 03 00 00 8B 10 FF .....E..........
0018FAD4: 08EEACA0 00D2E83E: 92 00 01 00 00 8B D8 8B 45 FC 8B 80 B0 03 00 00 ........E.......
0018FAD0: 0018FAFC 00D2E84E: 8B 80 B4 02 00 00 E8 8B 2A 95 FF 48 3B D8 7D 17 ........*..H;.}.
0018FACC: 0040A4CC 00D2E85E: 8B 45 FC 8B 80 B0 03 00 00 8B 80 B4 02 00 00 E8 .E..............
0018FAC8: 0018FB0C 00D2E86E: 72 2A 95 FF 48 7F 04 33 D2 EB 02 B2 01 8B 45 FC r*..H..3......E.
0018FAC4: 00D2CB35 00D2E87E: 8B 80 60 04 00 00 8B 08 FF 51 50 8B 45 FC 8B 80 ..`......QP.E...
0018FAC0: 0018FAFC 00D2E88E: B0 03 00 00 8B 10 FF 92 00 01 00 00 85 C0 7E 17 ..............~.
'ListViewLayers1'은 유효한 객체 포인터입니까? ListViewLayers1이 유효하지 않으면'Items'에 접근 할 수 없습니다. –
ListViewLayers1은 디자인 타임에 만들어진 호출과 같은 형식으로되어 있습니다. – Bill
ListViewLayers1.Items.Count> 0 일 때 시도하면 ListViewLayers1.Clear; 수에 접근 할 수 없습니다. – Bill