MacOS Sierra and Panorama X Interesting Behavior

I just installed MacOS Sierra this evening. I opened a database and all seemed okay. I started making some minor changes to several forms. When I chose one form, I received a dialog box saying

Internal Error

An uncaught exception was raised. Choose “Continue” to continue running in an inconsistent state. Choose “Crash” to halt the application andfile a bug with Crash Reporter. Choosing “Crash” will result in the loss of all unsaved data.

I have never seen this alert before, so I guess it is related to Sierra. Here’s the screen shot of the dialog box.

Here’s the text reported when I chose Show Details:

Exception Name: NSInvalidArgumentException
Description: *** -[DBTextView replaceCharactersInRange:withString:]: nil NSString given.
User Info: (null)

0 CoreFoundation 0x00007fffb62fb52b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x00007fffca9d3cad objc_exception_throw + 48
2 CoreFoundation 0x00007fffb6379a0d +[NSException raise:format:] + 205
3 AppKit 0x00007fffb40a81e2 -[NSTextView replaceCharactersInRange:withString:] + 211
4 PanoramaX 0x000000010837b5b9 PanoramaX + 1443257
5 PanoramaX 0x0000000108345cc4 PanoramaX + 1223876
6 PanoramaX 0x000000010834242a PanoramaX + 1209386
7 PanoramaX 0x000000010831b5fd PanoramaX + 1050109
8 PanoramaX 0x000000010832436b PanoramaX + 1086315
9 CoreFoundation 0x00007fffb6277eb2 __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke + 114
10 CoreFoundation 0x00007fffb6277d6f -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 239
11 PanoramaX 0x000000010832433f PanoramaX + 1086271
12 CoreFoundation 0x00007fffb6277eb2 __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke + 114
13 CoreFoundation 0x00007fffb6277d46 -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 198
14 PanoramaX 0x0000000108311f3e PanoramaX + 1011518
15 PanoramaX 0x000000010831b591 PanoramaX + 1050001
16 PanoramaX 0x000000010830b9f2 PanoramaX + 985586
17 PanoramaX 0x000000010830b4cf PanoramaX + 984271
18 PanoramaX 0x000000010831aeea PanoramaX + 1048298
19 PanoramaX 0x0000000108295fad PanoramaX + 503725
20 PanoramaX 0x000000010829750c PanoramaX + 509196
21 PanoramaX 0x000000010828fbd7 PanoramaX + 478167
22 PanoramaX 0x000000010828d68b PanoramaX + 468619
23 PanoramaX 0x0000000108404965 PanoramaX + 2005349
24 libsystem_trace.dylib 0x00007fffcb4e303d _os_activity_initiate + 61
25 AppKit 0x00007fffb461b4e7 -[NSApplication(NSResponder) sendAction:to:from:] + 456
26 AppKit 0x00007fffb4159de2 -[NSMenuItem _corePerformAction] + 324
27 AppKit 0x00007fffb4159b4e -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 114
28 libsystem_trace.dylib 0x00007fffcb4e303d _os_activity_initiate + 61
29 AppKit 0x00007fffb41e2b99 -[NSMenu performActionForItemAtIndex:] + 121
30 AppKit 0x00007fffb41e2b10 -[NSMenu _internalPerformActionForItemAtIndex:] + 94
31 AppKit 0x00007fffb41e293d -[NSCarbonMenuImpl _carbonCommandProcessEvent:handlerCallRef:] + 107
32 AppKit 0x00007fffb40992ac NSSLMMenuEventHandler + 986
33 HIToolbox 0x00007fffb57eb0d5 _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1708
34 HIToolbox 0x00007fffb57ea346 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 428
35 HIToolbox 0x00007fffb57ffdc4 SendEventToEventTarget + 40
36 HIToolbox 0x00007fffb584bc96 _ZL18SendHICommandEventjPK9HICommandjjhPKvP20OpaqueEventTargetRefS5_PP14OpaqueEventRef + 411
37 HIToolbox 0x00007fffb58772bb SendMenuCommandWithContextAndModifiers + 59
38 HIToolbox 0x00007fffb587726a SendMenuItemSelectedEvent + 188
39 HIToolbox 0x00007fffb587713d ZL19FinishMenuSelectionP13SelectionDataP10MenuResultS2 + 96
40 HIToolbox 0x00007fffb5877b77 _ZL14MenuSelectCoreP8MenuData5PointdjPP13OpaqueMenuRefPt + 702
41 HIToolbox 0x00007fffb5877826 _HandleMenuSelection2 + 460
42 AppKit 0x00007fffb4089079 _NSHandleCarbonMenuEvent + 239
43 AppKit 0x00007fffb4303322 _DPSEventHandledByCarbon + 54
44 AppKit 0x00007fffb46194eb -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 613
45 AppKit 0x00007fffb3efdfbd -[NSApplication run] + 926
46 AppKit 0x00007fffb3ec8a8a NSApplicationMain + 1237
47 libdyld.dylib 0x00007fffcb2b1255 start + 1

I think that is the standard Apple “your application has crashed” dialog. Usually that dialog is disabled, but there is a preference that enables it.

Does going back and opening the same form cause the crash again?

It consistently showed the same response when choosing the same form. I quit and restarted Panorama, and restarted the computer, and kept getting the same message. When I chose continue, it allowed me to see the form, with the Title “Window”, so I then created a new form and copied the objects from the old form to the new form, and the new form worked normally. I deleted the old form and renamed the new one, so the problem seems to be solved.
I think it was quite interesting that a “crash” allowed me to continue. Seemed like a good option to add. I don’t know of any way to set a preference on this issue.

I’ve gotten the same error twice in the first minutes of running PanX on Sierra. Both times using Undo

Oh wait. That is not a crash dialog, that is an Objective-C runtime error. In the past those errors would only show up in the Console, and the program would just automatically continue without any other effect. These messages also show up in the Xcode debugger.

I’ve never heard of this stopping the program and bringing up an alert before. I’m not sure if this is new in macOS Sierra or maybe there is some setting or preference that is enabling this. I’m not finding much on Google at this point.

Sorry, I was vague on details - it was late here. I was editing the formula of a PopupButtonObject, then using Undo a few times to get back where I started.

You can get the error with this too:

If clipboard() = ""
Message "Nada"

On the general topic of Sierra, this site includes a comment on problems with apps - some of which may relate to Panorama behaviour.