TOpenDialog无法在Mac上运行

时间:2014-04-01 12:48:59

标签: macos delphi

我在XE3中有一个非常简单的测试应用程序,带有一个按钮,一个标签和一个TOpenDialog。 这是整个代码,有一个匹配的表单:

unit Main;

interface

uses
  System.SysUtils, System.Types, System.UITypes, System.Rtti, System.Classes,
  System.Variants, FMX.Types, FMX.Controls, FMX.Forms, FMX.Dialogs;

type
  TForm1 = class(TForm)
    Button1: TButton;
    Label1: TLabel;
    OpenDialog1: TOpenDialog;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.fmx}

procedure TForm1.Button1Click(Sender: TObject);
begin
     if OpenDialog1.Execute
      then begin
           Label1.Text:= OpenDialog1.FileName;
      end;
end;

end.

当我在调试下运行并单击Mac上的按钮时,按钮保持按下(蓝色)但没有出现对话框,我得到了#34; Bullom的Beachball"或者应用程序在Mac上崩溃。我已经重新启动了Mac几次,但这没有任何改进。

更新的 我已经更新了XCode,修补了OSX,重新建立了连接,刷新了本地文件,但仍然无法正常工作。

我从Mac收到崩溃日志:

Process:         testopen [586]
Path:            /Users/USER/Desktop/*/testopen.app/Contents/MacOS/testopen
Identifier:      testopen
Version:         0.0 (1.0.0)
Code Type:       X86 (Native)
Parent Process:  ??? [1]
Responsible:     Terminal [367]
User ID:         501

Date/Time:       2014-04-02 14:04:34.435 +0100
OS Version:      Mac OS X 10.9.2 (13C64)
Report Version:  11
Anonymous UUID:  FA044E38-7FD1-1FE2-3F10-F19845519E2C


Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x0000000000000000

External Modification Warnings:
Debugger attached to process.

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   testopen                        0x00032b8a @DbgEvalFrame + 111586
1   com.apple.CoreFoundation        0x92176109 CFHash + 169
2   libcache.dylib                  0x956d56d0 _entry_get + 30
3   libcache.dylib                  0x956d507e _entry_table_resize + 304
4   libcache.dylib                  0x956d5bff cache_set_and_retain + 446
5   com.apple.CoreFoundation        0x921d466a -[NSCache setObject:forKey:cost:] + 74
6   com.apple.AppKit                0x911f3f56 rectForString + 917
7   com.apple.AppKit                0x911eea7c _NSGetTextCellBoundingRect + 1080
8   com.apple.AppKit                0x911ee59b -[NSCell cellSizeForBounds:] + 194
9   com.apple.AppKit                0x911ee3c3 -[NSTextFieldCell cellSizeForBounds:] + 255
10  com.apple.AppKit                0x91478c5d -[NSImageTextFieldCell cellSizeForBounds:] + 73
11  com.apple.FinderKit             0x902335cf -[FI_TSidebarItemCell(TrackingAreas) cellSizeForBounds:] + 73
12  com.apple.AppKit                0x913fa1eb -[NSCell _centerInnerBounds:] + 70
13  com.apple.AppKit                0x9147f8dd -[NSImageTextFieldCell _centerInnerBounds:] + 474
14  com.apple.AppKit                0x912c1998 -[NSTextFieldCell drawInteriorWithFrame:inView:] + 548
15  com.apple.FinderKit             0x90231a8a -[FI_TSidebarItemCell drawInteriorWithFrame:inView:] + 147
16  com.apple.AppKit                0x912c0c11 -[NSTextFieldCell drawWithFrame:inView:] + 359
17  com.apple.AppKit                0x9147f6fb -[NSImageTextFieldCell drawWithFrame:inView:] + 632
18  com.apple.FinderKit             0x90231968 -[FI_TSidebarItemCell drawWithFrame:inView:] + 1644
19  com.apple.AppKit                0x9141ee41 -[NSTableView _drawContentsAtRow:column:withCellFrame:] + 401
20  com.apple.AppKit                0x9147f418 -[NSOutlineView _drawContentsAtRow:column:withCellFrame:] + 87
21  com.apple.AppKit                0x9141eab3 -[NSTableView drawRow:clipRect:] + 1507
22  com.apple.AppKit                0x9141e13a -[NSTableView drawRowIndexes:clipRect:] + 111
23  com.apple.AppKit                0x9147e5bf -[NSOutlineView drawRowIndexes:clipRect:] + 103
24  com.apple.AppKit                0x912daaa1 -[NSTableView drawRect:] + 1197
25  com.apple.AppKit                0x9147d7f7 -[NSTrackableOutlineView drawRect:] + 70
26  com.apple.FinderKit             0x9023a21c -[FI_TSidebarView drawRect:] + 763
27  com.apple.AppKit                0x912b32a8 -[NSView _drawRect:clip:] + 3816
28  com.apple.AppKit                0x912b1cdf -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 1829
29  com.apple.AppKit                0x912b200c -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2642
30  com.apple.AppKit                0x912b200c -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2642
31  com.apple.AppKit                0x912b200c -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2642
32  com.apple.AppKit                0x912b200c -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2642
33  com.apple.AppKit                0x912b200c -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2642
34  com.apple.AppKit                0x912b200c -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2642
35  com.apple.AppKit                0x912b200c -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2642
36  com.apple.AppKit                0x912b200c -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2642
37  com.apple.AppKit                0x912b200c -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2642
38  com.apple.AppKit                0x912b200c -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2642
39  com.apple.AppKit                0x912b200c -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2642
40  com.apple.AppKit                0x912b0288 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 1264
41  com.apple.AppKit                0x912af900 -[NSThemeFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 290
42  com.apple.AppKit                0x912acc67 -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] + 3645
43  com.apple.AppKit                0x9128a75c -[NSView displayIfNeeded] + 1414
44  com.apple.AppKit                0x912a877c -[NSWindow displayIfNeeded] + 324
45  com.apple.AppKit                0x912a57eb -[NSWindow _reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:] + 2072
46  com.apple.AppKit                0x912a4fc5 -[NSWindow _doOrderWindowWithoutAnimation:relativeTo:findKey:forCounter:force:isModal:] + 79
47  com.apple.AppKit                0x9196941f __71-[NSWindow _doOrderWindow:relativeTo:findKey:forCounter:force:isModal:]_block_invoke2763 + 137
48  com.apple.AppKit                0x9127d6e0 NSPerformWithScreenUpdatesDisabled + 97
49  com.apple.AppKit                0x912a4e17 -[NSWindow _doOrderWindow:relativeTo:findKey:forCounter:force:isModal:] + 1096
50  com.apple.AppKit                0x914becae -[NSApplication _orderFrontModalWindow:relativeToWindow:] + 811
51  com.apple.AppKit                0x914be641 -[NSApplication _commonBeginModalSessionForWindow:relativeToWindow:modalDelegate:didEndSelector:contextInfo:] + 904
52  com.apple.AppKit                0x914c8642 -[NSApplication beginModalSessionForWindow:] + 72
53  com.apple.AppKit                0x914c84ef -[NSApplication runModalForWindow:] + 132
54  com.apple.AppKit                0x917fbdb7 -[NSSavePanel runModal] + 403
55  testopen                        0x00160be9 catch_exception_raise_state_identity + 1216589
56  testopen                        0x00610b62 catch_exception_raise_state_identity + 6131654
57  testopen                        0x005d694b catch_exception_raise_state_identity + 5893551
58  testopen                        0x005d5ebd catch_exception_raise_state_identity + 5890849
59  testopen                        0x0065c2fc catch_exception_raise_state_identity + 6440800
60  testopen                        0x005b3ef5 catch_exception_raise_state_identity + 5751641
61  testopen                        0x005b4286 catch_exception_raise_state_identity + 5752554
62  testopen                        0x0068be2c catch_exception_raise_state_identity + 6636176
63  testopen                        0x005fea1e catch_exception_raise_state_identity + 6057602
64  testopen                        0x001609ca catch_exception_raise_state_identity + 1216046
65  com.apple.AppKit                0x9135aebb -[NSWindow sendEvent:] + 719
66  com.apple.AppKit                0x912f98fd -[NSApplication sendEvent:] + 4034
67  com.apple.AppKit                0x9113e1fc -[NSApplication run] + 823
68  testopen                        0x00160be9 catch_exception_raise_state_identity + 1216589
69  testopen                        0x005f9efe catch_exception_raise_state_identity + 6038370
70  testopen                        0x006bf097 catch_exception_raise_state_identity + 6845691

0 个答案:

没有答案