4 Replies Latest reply on Oct 17, 2012 12:29 PM by philmodjunk

    FileMaker script chokes when Select Window script step fails

    LSI-FileMaker-Developer

      Summary

      FileMaker script chokes when Select Window script step fails

      Product

      FileMaker Pro

      Version

      12.0v2 Advanced

      Operating system version

      Mac OS X 10.8.2 Mountain Lion

      Description of the issue

      FileMaker appears to hang (not freeze or crash) mid-script when it should not (see screenshot).  Note the "Pressed" state of my Postal Codes button.  Clicking around in the window or trying to close a window only beeps at me.  Opening the Script Debugger reveals that FM is stuck in a script, with no option to continue it (note the grayed out buttons).  Clicking the red X / Halt Script button successfully cancels the script, but the symptoms remain the same; it does not bring FM back to "ready" state.  The FileMaker Pro > Quit option is also grayed out and unavailable, presumably because FM thinks it's still executing a script.

      Only force quitting the application appears to get me out of this limbo state.  Restarting and running the same exact script often times does not produce any problems.  I've had this problem happen maybe 6 or 7 times since I've started working in FileMaker 12; I've never seen this problem before version 12.

      Steps to reproduce the problem

      Unknown; it appears to be random.

      Expected result

      To have the script continue with any subsequent script steps, of course.

      Actual result

      The script appears to pause in an un-resumable state when the Select Window script step is called and the specified window cannot be selected.

      Exact text of any error message(s) that appear

      N/A

      Configuration information

      Being hosted by FileMaker Server Advanced 12.0.2.232, but I do remember this happening when the file was opened locally.  I'm just glad I have it hosted now because of the force quitting 'fix'.

      Workaround

      None, really.

      Screen_Shot_2012-10-07_at_11.44.29_PM.png

        • 1. Re: FileMaker script chokes when Select Window script step fails
          philmodjunk

               Can you get out of this "state" by changing modes such as switching to and from Find mode?

          • 2. Re: FileMaker script chokes when Select Window script step fails
            LSI-FileMaker-Developer

                 I am pretty sure you can't, but I can't remember rightly.  The next time it happens I'll make a note to try switching modes.

            • 3. Re: FileMaker script chokes when Select Window script step fails
              LSI-FileMaker-Developer

                   It happened again, and this time I have some interesting log entries from system.log…

              10/16/12 10:39:15.711 PM FileMaker Pro[9736]: *** Assertion failure in -[FMXApplicationMenu itemAtIndex:], /SourceCache/AppKit/AppKit-1187.34/Menus.subproj/NSMenu.m:861
              10/16/12 10:39:15.711 PM FileMaker Pro[9736]: Invalid parameter not satisfying: (index >= 0) && (index < [_itemArray count])
              10/16/12 10:39:15.719 PM FileMaker Pro[9736]:
              (
              0   CoreFoundation                      0x9551812b __raiseError + 219
              1   libobjc.A.dylib                     0x946e852e objc_exception_throw + 230
              2   CoreFoundation                      0x95477c48 +[NSException raise:format:arguments:] + 136
              3   Foundation                          0x9a38c2e4 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 116
              4   AppKit                              0x914f271f -[NSMenu itemAtIndex:] + 182
              5   FileMaker Pro                       0x0061f6f9 -[FMXApplicationMenu ChangeNotification:] + 169
              6   Foundation                          0x9a3e2c52 __57-[NSNotificationCenter addObserver:selector:name:object:]_block_invoke_0 + 49
              7   CoreFoundation                      0x954d9e01 ___CFXNotificationPost_block_invoke_0 + 257
              8   CoreFoundation                      0x9542543a _CFXNotificationPost + 2794
              9   Foundation                          0x9a3cb788 -[NSNotificationCenter postNotificationName:object:userInfo:] + 92
              10  AppKit                              0x9149dc1e -[NSMenu itemChanged:] + 257
              11  AppKit                              0x9149db18 -[NSMenu _postItemChangedNotificationButIgnoringItOurselves:] + 40
              12  AppKit                              0x915c5fc1 -[NSMenu _menuItem:didChangeStateImageFrom:to:] + 43
              13  AppKit                              0x915c5f48 -[NSMenuItem setState:] + 243
              14  AppKit                              0x91516fac -[NSPopUpButtonCell selectItemAtIndex:] + 185
              15  AppKit                              0x915fd06f -[NSPopUpButton selectItemAtIndex:] + 59
              16  AppKit                              0x9163dcb7 -[_NSPopUpButtonPlugin showValue:inObject:] + 2637
              17  AppKit                              0x9163a9e7 -[NSValueBinder showValue:inObject:] + 321
              18  AppKit                              0x9163a4f0 -[NSValueBinder _adjustObject:mode:observedController:observedKeyPath:context:editableState:adjustState:] + 845
              19  AppKit                              0x9163cff6 -[NSSelectionBinder _adjustObject:mode:observedController:observedKeyPath:context:editableState:adjustState:] + 1624
              20  AppKit                              0x9163a09f -[NSValueBinder _observeValueForKeyPath:ofObject:context:] + 181
              21  AppKit                              0x91636fc2 -[NSBinder observeValueForKeyPath:ofObject:change:context:] + 410
              22  AppKit                              0x9163c996 -[NSSelectionBinder observeValueForKeyPath:ofObject:change:context:] + 318
              23  AppKit                              0x91636e23 -[NSBinder _performConnectionEstablishedRefresh] + 82
              24  AppKit                              0x91635945 -[NSBinder establishConnection] + 359
              25  AppKit                              0x9162deac -[NSObject(NSKeyValueBindingCreation) bind:toObject:withKeyPath:options:] + 703
              26  AppKit                              0x9162dbe5 -[NSNibBindingConnector establishConnection] + 141
              27  AppKit                              0x914b7f5f -[NSIBObjectData nibInstantiateWithOwner:topLevelObjects:] + 1002
              28  AppKit                              0x916cfac0 -[NSNib _instantiateNibWithExternalNameTable:] + 634
              29  AppKit                              0x916cf814 -[NSNib instantiateNibWithOwner:topLevelObjects:] + 296
              30  AppKit                              0x916cecac -[NSViewController loadView] + 215
              31  FileMaker Pro                       0x0045a920 -[FMFormattingViewControllerCocoa initWithPropertyModel:docWindow:] + 128
              32  FileMaker Pro                       0x00425b46 -[FMDocWindowControllerCocoa ConnectToDocWinControllerMac:] + 134
              33  FileMaker Pro                       0x0041fa0d _ZN19DocWinControllerMacC2ER11FMDocWindowRKN5Draco9unistringERKNS2_5XRectEP15CocoaWindowTypebb + 269
              34  FileMaker Pro                       0x00223c71 _ZN11FMDocWindow17CreateOwnerWindowERKN5Draco5XRectES3_bb + 449
              35  FileMaker Pro                       0x002244ae _ZN11FMDocWindowC2ERKS_RKN5Draco13HBAbstractKeyEPKNS2_9unistringEPKNS2_5XRectEl + 1326
              36  FileMaker Pro                       0x0017b41e _ZNK12FMAppSession18CreateWindowObjectERKN5Draco13FMWindowModelERKNS0_13HBAbstractKeyEPKNS0_9unistringEPKNS0_5XRectEl + 126
              37  FMEngine                            0x0416e4cd _ZN5Draco9FMSession10OpenWindowERKNS_10FMFileUserEPKNS_13FMWindowModelEPKNS_9unistringEPKNS_5XRectEbbPKNS_13HBAbstractKeyEl + 205
              38  FMEngine                            0x04188b2d _ZN5Draco17ScriptRuntimeBase14DoCreateWindowEPKNS_10FMFileUserEb + 573
              39  FMEngine                            0x04193909 _ZN5Draco17ScriptRuntimeBase12DispatchStepEv + 4249
              40  FMEngine                            0x041946c5 _ZN5Draco17ScriptRuntimeBase7ExecuteEv + 597
              41  FMEngine                            0x04195133 _ZN5Draco17ScriptRuntimeBase10DoNextStepEv + 371
              42  FMEngine                            0x0419525d _ZN5Draco17ScriptRuntimeBase9DoRunLoopEv + 109
              43  FileMaker Pro                       0x0032215f _ZN13ScriptRuntime6OnIdleEv + 127
              44  FMEngine                            0x0416f010 _ZN5Draco9FMSession6OnIdleEb + 272
              45  FileMaker Pro                       0x0017b802 _ZN12FMAppSession6OnIdleEb + 66
              46  FileMaker Pro                       0x0016abf5 _ZN9CFMProApp4IdleEb + 69
              47  FileMaker Pro                       0x0016ad1d _ZN9CFMProApp17DispatchNullEventEv + 109
              48  FileMaker Pro                       0x004b37a9 -[MFAppDelegate HandleIdleNotification] + 25
              49  Foundation                          0x9a3e2c52 __57-[NSNotificationCenter addObserver:selector:name:object:]_block_invoke_0 + 49
              50  CoreFoundation                      0x954d9e01 ___CFXNotificationPost_block_invoke_0 + 257
              51  CoreFoundation                      0x9542543a _CFXNotificationPost + 2794
              52  Foundation                          0x9a3e8068 -[NSNotificationCenter postNotification:] + 115
              53  Foundation                          0x9a3aa3b8 postQueueNotifications + 843
              54  CoreFoundation                      0x95439dfe __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30
              55  CoreFoundation                      0x95439d3d __CFRunLoopDoObservers + 381
              56  CoreFoundation                      0x95413ecf __CFRunLoopRun + 1071
              57  CoreFoundation                      0x9541363a CFRunLoopRunSpecific + 378
              58  CoreFoundation                      0x954134ab CFRunLoopRunInMode + 123
              59  HIToolbox                           0x9404d15a RunCurrentEventLoopInMode + 242
              60  HIToolbox                           0x9404cec9 ReceiveNextEventCommon + 374
              61  HIToolbox                           0x9404cd44 BlockUntilNextEventMatchingListInMode + 88
              62  AppKit                              0x914f8a3a _DPSNextEvent + 724
              63  AppKit                              0x914f826c -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 119
              64  AppKit                              0x914ee6cc -[NSApplication run] + 855
              65  FileMaker Pro                       0x0006e7c0 CMacApp_Main + 576
              66  FileMaker Pro                       0x001700e3 main + 67
              67  FileMaker Pro                       0x00050ce1 start + 53
              68  ???                                 0x00000002 0x0 + 2
              )

                   And I confirmed that after halting the script in Script Debugger, I CAN switch between Browse Mode / Layout Mode etc., but it does nothing to get me out of the weird limbo state.

              • 4. Re: FileMaker script chokes when Select Window script step fails
                philmodjunk

                     There have been other reports of getting trapped in a "modal" state, but I am not sure yours matches the previous reports.

                     For More Information see:     FileMaker enters a modal-like state on editing

                     This is one of many acknowledged bugs that can be found in the Known Bug List thread here in the Report an Issue section of the forum.

                     It can also be downloaded as a database file from:    https://www.dropbox.com/s/jt09b82i0xijbu3/FMP%20Bugs.zip