Hello,
I'm getting a reproducible crash in one of my applications. Not sure if I do it
right, however.
In a NSSavePanel, I have three checkboxes and one text field. One checkbox
(“password:”) must do either of the followings:
1: show the text field and set the focus to it
2: or hide the text field.
For that, I have a NSButton object, with a property: ItemToSetVisible as
NSViewMBS. In the code, the action event looks like this:
if ItemToSetVisible<>nil then
ItemToSetVisible.isHidden=me.intValue=0
if not ItemToSetVisible.isHidden then
if ItemToSetVisible isa NSTextViewMBS or ItemToSetVisible isa
NSSecureTextFieldMBS then call
ItemToSetVisible.window.makeFirstResponder(ItemToSetVisible)
end if
end if
When the MakeFirstResponder call is made, the application crashes (but only the
second time it's called (?)) like this:
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000020f90437
Exception Note: EXC_CORPSE_NOTIFY
VM Regions Near 0x20f90437:
mapped file 000000001364a000-0000000014d10000 [ 22.8M] r--/r-x
SM=ALI
-->
__TEXT 000000008fea2000-000000008fed7000 [ 212K] r-x/rwx
SM=COW /usr/lib/dyld
Application Specific Information:
Performing @selector(action:) from sender NSButton 0x1e90440
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 XojoFramework 0x0116ac44 RuntimeObjectIsa + 86
1 MBS_MacBase_NSView_Plugin_19517.dylib 0x096f013d
NewNSObjectMBS(NSObject*, objc_class*) + 621
2 MBS_MacBase_NSView_Plugin_19517.dylib 0x096ff30b
window(REALobjectStruct*, long) + 251
3 DT10.debug 0x002306f3
NSViewMBS.window.Get%o<NSWindowMBS>%o<NSViewMBS>i4 + 156
4 DT10.debug 0x008c046e
CNSButton.Event_Action%%o<CNSButton> + 716
5 MBS_MacCocoa_NSControl_Plugin_19517.dylib 0x0a099251
-[NSControlDelegateMBS action:] + 289
6 libobjc.A.dylib 0x99f2c3ee -[NSObject
performSelector:withObject:] + 70
7 com.apple.AppKit 0x967841bd __36-[NSApplication
sendAction:to:from:]_block_invoke + 51
8 libsystem_trace.dylib 0x9930a3c1 _os_activity_initiate + 85
9 com.apple.AppKit 0x967840de -[NSApplication
sendAction:to:from:] + 610
10 com.apple.AppKit 0x96797991 -[NSControl sendAction:to:]
+ 102
11 com.apple.AppKit 0x96797885 __26-[NSCell
_sendActionFrom:]_block_invoke + 176
12 libsystem_trace.dylib 0x9930a3c1 _os_activity_initiate + 85
13 com.apple.AppKit 0x967977b4 -[NSCell _sendActionFrom:] +
161
14 com.apple.AppKit 0x969f9349 __48-[NSCell
trackMouse:inRect:ofView:untilMouseUp:]_block_invoke1010 + 43
15 libsystem_trace.dylib 0x9930a3c1 _os_activity_initiate + 85
16 com.apple.AppKit 0x96795b61 -[NSCell
trackMouse:inRect:ofView:untilMouseUp:] + 2744
17 com.apple.AppKit 0x967e2003 -[NSButtonCell
trackMouse:inRect:ofView:untilMouseUp:] + 809
18 com.apple.AppKit 0x96794190 -[NSControl mouseDown:] + 693
19 com.apple.AppKit 0x96d8811b -[NSWindow
_handleMouseDownEvent:isDelayedEvent:] + 6266
20 com.apple.AppKit 0x96d89922 -[NSWindow
_reallySendEvent:isDelayedEvent:] + 2303
21 com.apple.AppKit 0x967207b7 -[NSWindow sendEvent:] + 567
22 com.apple.AppKit 0x9669bb45 -[NSApplication sendEvent:]
+ 2919
23 XojoFramework 0x00fe6095 0xf14000 + 860309
24 com.apple.AppKit 0x9678b084 -[NSApplication
_modalSession:sendEvent:] + 1296
25 com.apple.AppKit 0x9678aad2 -[NSApplication
_doModalLoop:peek:] + 854
26 com.apple.AppKit 0x9698eb90 __35-[NSApplication
runModalForWindow:]_block_invoke + 182
27 com.apple.AppKit 0x967880ad -[NSApplication
runModalForWindow:] + 144
28 com.apple.AppKit 0x96c19414 -[NSSavePanel runModal] + 873
29 com.apple.AppKit 0x96c17adb -[NSSavePanel
runModalForDirectory:file:types:] + 301
30 com.apple.AppKit 0x96c19035 -[NSSavePanel
runModalForDirectory:file:] + 56
31 MBS_MacCocoa_NSPanel_Plugin_19517.dylib 0x0a1018bd
runModalForDirectoryFile(REALobjectStruct*, REALfolderItemStruct*,
REALstringStruct*) + 397
32 DT10.debug 0x00355408
NSSavePanelMBS.runModalForDirectory%i4%o<NSSavePanelMBS>o<FolderItem>s + 104
33 DT10.debug 0x009485be
WinMain.WinMain.GetFileToSaveTo%o<CSaveData>%o<WinMain.WinMain>b + 4250
34 DT10.debug 0x00990565
WinMain.WinMain.DoMenuCmd%%o<WinMain.WinMain>i4&i4b + 52393
35 DT10.debug 0x009a92dc
WinMain.WinMain.DoMenuCmd%%o<WinMain.WinMain>i4b + 119
36 DT10.debug 0x00937ff3
WinMain.WinMain._FileSave_Action%b%o<WinMain.WinMain> + 83
37 XojoFramework 0x010cfe98
RuntimeMenuItemClick(RunMenuItem*, unsigned char, Window*, unsigned char*) +
1128
38 XojoFramework 0x00fced1e
CocoaMenu::_MenuItemAction(NSMenuItem*) + 58
39 XojoFramework 0x00fcf2d6 0xf14000 + 766678
40 libobjc.A.dylib 0x99f2c3ee -[NSObject
performSelector:withObject:] + 70
41 com.apple.AppKit 0x967841bd __36-[NSApplication
sendAction:to:from:]_block_invoke + 51
42 libsystem_trace.dylib 0x9930a3c1 _os_activity_initiate + 85
43 com.apple.AppKit 0x967840de -[NSApplication
sendAction:to:from:] + 610
44 com.apple.AppKit 0x96783d84 -[NSMenuItem
_corePerformAction] + 434
45 com.apple.AppKit 0x96783aa2 -[NSCarbonMenuImpl
performActionWithHighlightingForItemAtIndex:] + 162
46 com.apple.AppKit 0x967830e3 -[NSMenu
_performActionWithHighlightingForItemAtIndex:sendAccessibilityNotification:] +
79
47 com.apple.AppKit 0x9678308f -[NSMenu
_performActionWithHighlightingForItemAtIndex:] + 48
48 com.apple.AppKit 0x9678305a __31-[NSMenu
performKeyEquivalent:]_block_invoke + 43
49 libsystem_trace.dylib 0x9930a3c1 _os_activity_initiate + 85
50 com.apple.AppKit 0x967828ae -[NSMenu
performKeyEquivalent:] + 380
51 com.apple.AppKit 0x967818b0 -[NSApplication
_handleKeyEquivalent:] + 887
52 com.apple.AppKit 0x9669c3be -[NSApplication sendEvent:]
+ 5088
53 XojoFramework 0x00fe6095 0xf14000 + 860309
54 XojoFramework 0x00fe60d1 0xf14000 + 860369
55 DT10.debug 0x00145227 Delegate.Invoke%% + 34
56 DT10.debug 0x00052831
Application._CallFunctionWithExceptionHandling%%o<Application>p + 248
57 XojoFramework 0x01167e21
CallFunctionWithExceptionHandling(void (*)()) + 312
58 XojoFramework 0x00fe6008 0xf14000 + 860168
59 com.apple.AppKit 0x964eeba7 -[NSApplication run] + 1159
60 XojoFramework 0x01167eca mainloop() + 46
61 XojoFramework 0x01165fd8 RuntimeRun + 49
62 DT10.debug 0x00120d60 REALbasic._RuntimeRun + 34
63 DT10.debug 0x00c49d01 _Main + 295
64 DT10.debug 0x00c4756c main + 36
65 DT10.debug 0x00c7adb3 start + 53
Do you have an idea what the problem is?
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info