New Plugin - cause Action Groups to hang

Posted on
Thu Aug 30, 2012 12:39 am
pgershon offline
Posts: 509
Joined: Jul 10, 2004

New Plugin - cause Action Groups to hang

I am working on a Squeezebox plugin. I have the code reading my Squeezebox settings correctly and dynamically updating a bunch of States created for the Device. My system is hanging, however, when I try to set up a "new" Action Group while the plugin is running. I am not sure why, but I must fore quit Indigo each time to continue. Everything is fine once I disable the plugin. I have gone so far as to remove my Actions.xml file from the plugin, but this did not help.

I am not sure what to do next in terms of debugging. My concurrent loop is as below (not sure this is helpful):


Code: Select all
   def runConcurrentThread(self):
      try:
         while True:
            sleeptime = 0.01
            s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
            s.connect((self.pluginPrefs[u"sqHOST"],int(self.pluginPrefs[u"sqPORT"])))
            for musicPlayer in indigo.devices.iter("com.perrygershon.indigoplugin.squeezebox"):
               SQplayerid=musicPlayer.states["playerid"]
               s.send(SQplayerid+" artist ?\r\n")
               data = s.recv(1024)
               data=data.rstrip("\r\n")+" "
               data=self.sqprocess(data,SQplayerid+" artist ")
               musicPlayer.updateStateOnServer("artist", value=data)
               s.send(SQplayerid+" title ?\r\n")
               data = s.recv(1024)
               data=data.rstrip("\r\n")+" "
               data=self.sqprocess(data,SQplayerid+" title ")
               musicPlayer.updateStateOnServer("track", value=data)
               s.send(SQplayerid+" duration ?\r\n")
               data = s.recv(1024)
               data=data.rstrip("\r\n")+" "
               data=self.sqprocess(data,SQplayerid+" duration ")
               musicPlayer.updateStateOnServer("duration", value=data)
               s.send(SQplayerid+" time ?\r\n")
               data = s.recv(1024)
               data=data.rstrip("\r\n")+" "
               data=self.sqprocess(data,SQplayerid+" time ")
               musicPlayer.updateStateOnServer("elapsed", value=data)
               s.send(SQplayerid+" playlist name ?\r\n")
               data = s.recv(1024)
               data=data.rstrip("\r\n")+" "
               data=self.sqprocess(data,SQplayerid+" playlist name ")
               musicPlayer.updateStateOnServer("playlist", value=data)
               s.send(SQplayerid+" path ?\r\n")
               data = s.recv(1024)
               data=data.rstrip("\r\n")+" "
               data=self.sqprocess(data,SQplayerid+" path ")
               musicPlayer.updateStateOnServer("path", value=data)
               s.send(SQplayerid+" mode ?\r\n")
               data = s.recv(1024)
               data=data.rstrip("\r\n")+" "
               data=self.sqprocess(data,SQplayerid+" mode ")
               musicPlayer.updateStateOnServer("mode", value=data)
               s.send(SQplayerid+" power ?\r\n")
               data = s.recv(1024)
               data=data.rstrip("\r\n")+" "
               data=self.sqprocess(data,SQplayerid+" power ")
               musicPlayer.updateStateOnServer("onOffState", value=data)
               s.send(SQplayerid+" mixer volume  ?\r\n")
               data = s.recv(1024)
               data=data.rstrip("\r\n")+" "
               data=self.sqprocess(data,SQplayerid+" mixer ")
               data=self.sqprocess(data,"volume ")
               musicPlayer.updateStateOnServer("volume", value=data)
            s.close()
            self.sleep(sleeptime)
      except self.StopThread:
         pass   # Optionally catch the StopThread exception and do any needed cleanup.
      
   def stopConcurrentThread(self):
      self.stopThread = True


Start of hang report (too long to attach in full):


Code: Select all
Date/Time:       2012-08-30 01:44:50 -0400
OS Version:      10.8.1 (Build 12B19)
Architecture:    x86_64
Report Version:  11

Command:         Indigo 5
Path:            /Applications/Indigo 5.app/Contents/MacOS/Indigo 5
Version:         5.1.5 (5.1.5)
Parent:          launchd [280]

PID:             99296
Event:           hang
Duration:        0.98s
Steps:           10 (100ms sampling interval)

Hardware model:  Macmini4,1
Active cpus:     2
Free pages:      186921 pages (+5866)
Pageins:         0 pages
Pageouts:        0 pages


Process:         Indigo 5 [99296]
Path:            /Applications/Indigo 5.app/Contents/MacOS/Indigo 5
Architecture:    i386
Parent:          launchd [280]
UID:             501
Task size:       9093 pages (+34)
CPU Time:        0.694s

  Thread 0x32ecef   priority <multiple> cpu time   0.651s
  9 ??? (Indigo 5 + 5398) [0x2516]
    9 NSApplicationMain + 1053 (AppKit) [0x9591b8e6]
      9 -[NSApplication run] + 855 (AppKit) [0x959786dc]
        9 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 119 (AppKit) [0x9598228c]
          9 _DPSNextEvent + 724 (AppKit) [0x95982a5a]
            9 BlockUntilNextEventMatchingListInMode + 88 (HIToolbox) [0x949a2494]
              9 ReceiveNextEventCommon + 162 (HIToolbox) [0x949a2545]
                9 RunCurrentEventLoopInMode + 242 (HIToolbox) [0x949a28aa]
                  9 CFRunLoopRunInMode + 123 (CoreFoundation) [0x986a1bdb]
                    9 CFRunLoopRunSpecific + 378 (CoreFoundation) [0x986a1d6a]
                      9 __CFRunLoopRun + 934 (CoreFoundation) [0x986a2576]
                        9 __CFRunLoopDoSources0 + 233 (CoreFoundation) [0x9867c7f9]
                          9 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15 (CoreFoundation) [0x9867cdcf]
                            9 ??? (Indigo 5 + 323436) [0x4ff6c]
                              8 ??? (Indigo 5 + 321271) [0x4f6f7]
                                8 ??? (Indigo 5 + 333440) [0x52680]
                                  8 ??? (Indigo 5 + 333200) [0x52590]
                                    8 boost::detail::function::void_function_obj_invoker1<boost::_bi::bind_t<void, boost::_mfi::mf1<void, TCList_cachedClient<CDeviceWrapper>, CXmlContainer const&>, boost::_bi::list2<boost::_bi::value<TCList_cachedClient<CDeviceWrapper>*>, boost::arg<1> > >, void, CXmlContainer const&>::invoke(boost::detail::function::function_buffer&, CXmlContainer const&) + 31 (Indigo 5) [0x25040]
                                      8 boost::_mfi::mf1<void, TCList_cachedClient<CDeviceWrapper>, CXmlContainer const&>::operator()(TCList_cachedClient<CDeviceWrapper>*, CXmlContainer const&) const + 45 (Indigo 5) [0x24f9b]
                                        8 TCList_cachedClient<CDeviceWrapper>::_HandleRemote_ReplacedElem(CXmlContainer const&) + 182 (Indigo 5) [0x27304]
                                          8 ??? (Indigo 5 + 145845) [0x249b5]
                                            8 ??? (Indigo 5 + 875921) [0xd6d91]
                                              8 ??? (Indigo 5 + 927956) [0xe38d4]
                                                8 ??? (Indigo 5 + 568564) [0x8bcf4]
                                                  8 -[NSObject(NSKeyValueObserverNotification) didChangeValueForKey:] + 131 (Foundation) [0x9889f848]
                                                    7 NSKeyValueDidChange + 401 (Foundation) [0x988e882d]
                                                      7 NSKeyValueNotifyObserver + 378 (Foundation) [0x988e6e70]
                                                        7 -[NSSelectionBinder observeValueForKeyPath:ofObject:change:context:] + 318 (AppKit) [0x95ac6766]
                                                          7 -[NSBinder observeValueForKeyPath:ofObject:change:context:] + 410 (AppKit) [0x95ac0d92]
                                                            7 -[NSValueBinder _observeValueForKeyPath:ofObject:context:] + 181 (AppKit) [0x95ac3e6f]
                                                              5 -[NSSelectionBinder _adjustObject:mode:observedController:observedKeyPath:context:editableState:adjustState:] + 813 (AppKit) [0x95ac6a9b]
                                                                3 -[_NSSelectionBinderPlugin populateObject:withContent:valueKey:objectKey:insertsNullPlaceholder:] + 449 (AppKit) [0x95fee844]
                                                                  3 -[_NSPopUpButtonPlugin addContentObject:isPlaceholder:insertsNullPlaceholder:value:index:cellOrControl:] + 184 (AppKit) [0x95feebd2]
                                                                    3 -[_NSPopUpButtonPlugin _insertPopUpButtonItemInCellOrControl:title:representedObject:menuItemIndex:index:] + 88 (AppKit) [0x95ac826f]
                                                                      3 -[NSMenu insertItemWithTitle:action:keyEquivalent:atIndex:] + 276 (AppKit) [0x959734ad]
                                                                        2 -[NSMenu insertItem:atIndex:] + 1015 (AppKit) [0x95973a78]
                                                                          2 -[NSNotificationCenter postNotificationName:object:userInfo:] + 92 (Foundation) [0x9889f8c8]
                                                                            1 _CFXNotificationPost + 1995 (CoreFoundation) [0x986b383b]
                                                                              1 <executing in user space>
                                                                            1 _CFXNotificationPost + 2802 (CoreFoundation) [0x986b3b62]
                                                                              1 _Block_release + 198 (libsystem_blocks.dylib) [0x926cfa13]
                                                                                1 __destroy_helper_block_ + 48 (CoreFoundation) [0x98768510]
                                                                                  1 objc_release + 37 (libobjc.A.dylib) [0x9a41e275]
                                                                                    1 -[NSObject release] + 25 (libobjc.A.dylib) [0x9a4338e9]
                                                                                      1 objc::DenseMap<objc_object*, unsigned long, true, objc::DenseMapInfo<objc_object*>, objc::DenseMapInfo<unsigned long> >::find(objc_object* const&) + 1 (libobjc.A.dylib) [0x9a41c427]
                                                                                        1 <executing in user space>
                                                                        1 -[NSMenu insertItem:atIndex:] + 505 (AppKit) [0x9597387a]
                                                                          1 +[NSMenu(NSKeyEquivalents) _recursivelyRegisterMenuItem:forKeyEquivalentUniquingInMenu:] + 64 (AppKit) [0x95973acf]
                                                                            1 -[NSMenuItem _requiresKERegistration] + 35 (AppKit) [0x9592889d]
                                                                              1 -[NSMenuItem _desiredKeyEquivalent] + 63 (AppKit) [0x9592890f]
                                                                                1 -[NSMenuItem userKeyEquivalent] + 96 (AppKit) [0x959289ba]
                                                                                  1 -[NSMenuItem _fetchFreshUserKeyEquivalentInfo] + 164 (AppKit) [0x95928b80]
                                                                                    1 objc_msgSend + 26 (libobjc.A.dylib) [0x9a41ac0a]
                                                                                      1 <executing in user space>
                                                                2 -[_NSSelectionBinderPlugin populateObject:withContent:valueKey:objectKey:insertsNullPlaceholder:] + 126 (AppKit) [0x95fee701]
                                                                  2 -[_NSPopUpButtonPlugin removeAllContentObjectsInCellOrControl:] + 225 (AppKit) [0x95feeb00]
                                                                    2 -[NSPopUpButton removeAllItems] + 52 (AppKit) [0x95a847fd]
                                                                      2 -[NSPopUpButtonCell removeAllItems] + 65 (AppKit) [0x95a8484d]
                                                                        2 -[NSPopUpButtonCell removeItemAtIndex:] + 59 (AppKit) [0x95a848b6]
                                                                          2 -[NSMenu removeItemAtIndex:] + 654 (AppKit) [0x95a6fe0c]
                                                                            2 -[NSNotificationCenter postNotificationName:object:userInfo:] + 92 (Foundation) [0x9889f8c8]
                                                                              1 _CFXNotificationPost + 2802 (CoreFoundation) [0x986b3b62]
                                                                                1 free + 217 (libsystem_c.dylib) [0x9753ccdc]
                                                                                  1 tiny_free_list_remove_ptr + 1 (libsystem_c.dylib) [0x975454a1]
                                                                                    1 <executing in user space>
                                                                              1 _CFXNotificationPost + 2037 (CoreFoundation) [0x986b3865]
                                                                                1 <executing in user space>
                                                              1 -[NSSelectionBinder _adjustObject:mode:observedController:observedKeyPath:context:editableState:adjustState:] + 852 (AppKit) [0x95ac6ac2]
                                                                1 objc_msgSend + 26 (libobjc.A.dylib) [0x9a41ac0a]
                                                                  1 <executing in user space>
                                                              1 -[NSSelectionBinder _adjustObject:mode:observedController:observedKeyPath:context:editableState:adjustState:] + 1382 (AppKit) [0x95ac6cd4]
                                                                1 -[_NSModelObservingTracker startObservingModelObjectsAtReferenceIndexes:] + 479 (AppKit) [0x95aed4b7]
                                                                  1 -[_NSModelObservingTracker _startObservingModelObject:] + 273 (AppKit) [0x95aed6fc]
                                                                    1 -[_NSModelObservingTracker _registerOrUnregister:observerNotificationsForModelObject:] + 210 (AppKit) [0x95aed872]
                                                                      1 -[_NSModelObservingTracker _registerOrUnregister:observerNotificationsForKeyPath:ofModelObject:] + 199 (AppKit) [0x95b76812]
                                                                        1 -[NSObject(NSKeyValueObserverRegistration) addObserver:forKeyPath:options:context:] + 201 (Foundation) [0x988dc850]
                                                                          1 -[NSObject(NSKeyValueObserverRegistration) _addObserver:forProperty:options:context:] + 647 (Foundation) [0x988ddbf4]
                                                                            1 _spin_lock$VARIANT$mp + 13 (libsystem_c.dylib) [0x9750f35d]
                                                                              1 <executing in user space>
                                                    1 NSKeyValueDidChange + 446 (Foundation) [0x988e885a]
                                                      1 NSKeyValuePopPendingNotificationPerThread + 50 (Foundation) [0x988e88be]
                                                        1 CFArrayRemoveValueAtIndex + 132 (CoreFoundation) [0x98682294]
                                                          1 _CFArrayReplaceValues + 351 (CoreFoundation) [0x9867972f]
                                                            1 <executing in user space>
                              1 ??? (Indigo 5 + 321410) [0x4f782]
                                1 ??? (Indigo 5 + 569669) [0x8c145]
                                  1 -[NSAutoreleasePool release] + 125 (Foundation) [0x988b8d56]
                                    1 _CFAutoreleasePoolPop + 51 (CoreFoundation) [0x9869d7b3]
                                      1 (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 490 (libobjc.A.dylib) [0x9a41d5b2]
                                        1 -[NSObject release] + 47 (libobjc.A.dylib) [0x9a4338ff]
                                          1 -[__NSDictionaryI dealloc] + 201 (CoreFoundation) [0x9879f8b9]
                                            1 _object_dispose + 29 (libobjc.A.dylib) [0x9a425013]
                                              1 objc_destructInstance + 77 (libobjc.A.dylib) [0x9a41cc5f]
                                                1 objc_clear_deallocating + 165 (libobjc.A.dylib) [0x9a41cd1c]
                                                  1 weak_unregister_no_lock + 268 (libobjc.A.dylib) [0x9a431f07]
                                                    1 <executing in user space>
  1 weak_entry_for_referent(weak_table_t*, objc_object*) + 152 (libobjc.A.dylib) [0x9a431f9f]
    1 <executing in user space>

  Thread 0x32ecf7   DispatchQueue 1701273966 priority 49       
  10 _dispatch_mgr_thread + 53 (libdispatch.dylib) [0x9576a7fd]
    10 kevent + 10 (libsystem_kernel.dylib) [0x91aa29ae]
     *10 ??? (mach_kernel + 3471600) [0xffffff800054f8f0]

  Thread 0x32ecfd   priority 45       
  10 start_wqthread + 30 (libsystem_c.dylib) [0x9750ccca]
    10 _pthread_wqthread + 448 (libsystem_c.dylib) [0x97524e19]
      10 __workq_kernreturn + 10 (libsystem_kernel.dylib) [0x91aa20ee]
       *10 ??? (mach_kernel + 3911152) [0xffffff80005badf0]

  Thread 0x32ed08   priority 47         cpu time   0.015s
  10 thread_start + 34 (libsystem_c.dylib) [0x9750ccee]
    10 _pthread_start + 344 (libsystem_c.dylib) [0x97522557]
      10 ??? (Indigo 5 + 2689671) [0x291a87]
        10 boost::detail::thread_data<CThreadAdapter>::run() + 22 (Indigo 5) [0x564b2]
          10 ??? (Indigo 5 + 347168) [0x55c20]
            10 ??? (Indigo 5 + 345427) [0x55553]
              10 ??? (Indigo 5 + 429141) [0x69c55]
                10 ??? (Indigo 5 + 341049) [0x54439]
                  10 ??? (Indigo 5 + 340731) [0x542fb]
                    10 boost::condition_variable::timed_wait(boost::unique_lock<boost::mutex>&, boost::posix_time::ptime const&) + 397 (Indigo 5) [0x29471d]
                      10 pthread_cond_timedwait$UNIX2003 + 70 (libsystem_c.dylib) [0x975ad0f8]
                        10 __psynch_cvwait + 10 (libsystem_kernel.dylib) [0x91aa18e2]
                         *10 psynch_cvcontinue + 0 (mach_kernel) [0xffffff80005b5cb0]

  Thread 0x32ed0d   priority 47       
  10 thread_start + 34 (libsystem_c.dylib) [0x9750ccee]
    10 _pthread_start + 344 (libsystem_c.dylib) [0x97522557]
      10 ??? (Indigo 5 + 2689671) [0x291a87]
        10 boost::detail::thread_data<CThreadAdapter>::run() + 22 (Indigo 5) [0x564b2]
          10 ??? (Indigo 5 + 347168) [0x55c20]
            10 ??? (Indigo 5 + 345624) [0x55618]
              10 ??? (Indigo 5 + 341539) [0x54623]
                10 pthread_cond_wait$UNIX2003 + 71 (libsystem_c.dylib) [0x975ad0ad]
                  10 __psynch_cvwait + 10 (libsystem_kernel.dylib) [0x91aa18e2]
                   *10 psynch_cvcontinue + 0 (mach_kernel) [0xffffff80005b5cb0]

  Thread 0x32ed0e   priority 47         cpu time   0.001s
  10 thread_start + 34 (libsystem_c.dylib) [0x9750ccee]
    10 _pthread_start + 344 (libsystem_c.dylib) [0x97522557]
      10 ??? (Indigo 5 + 2689671) [0x291a87]
        10 boost::detail::thread_data<CThreadAdapter>::run() + 22 (Indigo 5) [0x564b2]
          10 ??? (Indigo 5 + 347168) [0x55c20]
            10 ??? (Indigo 5 + 345427) [0x55553]
              10 __select + 10 (libsystem_kernel.dylib) [0x91aa1be6]
               *10 ??? (mach_kernel + 3581120) [0xffffff800056a4c0]

  Thread 0x32ed59   priority <multiple> cpu time   0.026s
  10 thread_start + 34 (libsystem_c.dylib) [0x9750ccee]
    10 _pthread_start + 344 (libsystem_c.dylib) [0x97522557]
      10 __NSThread__main__ + 1396 (Foundation) [0x988f129b]
        10 -[NSThread main] + 45 (Foundation) [0x988f1318]
          9 -[NSUIHeartBeat _heartBeatThread:] + 879 (AppKit) [0x95b67a6d]
            9 usleep$UNIX2003 + 60 (libsystem_c.dylib) [0x975ac936]
              9 __semwait_signal + 10 (libsystem_kernel.dylib) [0x91aa1c72]
               *9 semaphore_wait_continue + 0 (mach_kernel) [0xffffff8000233e90]
          1 -[NSUIHeartBeat _heartBeatThread:] + 1295 (AppKit) [0x95b67c0d]
            1 -[NSWindow(NSWindow_Theme) heartBeat:] + 159 (AppKit) [0x95b9001e]
              1 -[NSControl heartBeat:] + 43 (AppKit) [0x95b900d5]
                1 -[NSButtonCell(NSDefaultButtonIndicatorPrivate) heartBeat:] + 2707 (AppKit) [0x95b90b72]
                  1 CGContextEndTransparencyLayer + 89 (CoreGraphics) [0x92e10bb7]
                    1 ripc_EndLayer + 893 (libRIP.A.dylib) [0x927fbf71]
                      1 ripc_RenderImage + 259 (libRIP.A.dylib) [0x927f330f]
                        1 ripl_BltImage + 408 (libRIP.A.dylib) [0x927f370a]
                          1 ripd_Lock + 62 (libRIP.A.dylib) [0x927ec881]
                            1 CGSDeviceLock + 313 (CoreGraphics) [0x92dced76]
                              1 _CGSLockWindow + 3428 (CoreGraphics) [0x92dcfcbb]
                                1 _CGSSynchronizeWindowBackingStore + 131 (CoreGraphics) [0x92e233f0]
                                  1 mach_msg_trap + 10 (libsystem_kernel.dylib) [0x91a9f7d2]
                                   *1 ipc_mqueue_receive_continue + 0 (mach_kernel) [0xffffff8000213030]

  Thread 0x32edac   priority 47       
  10 start_wqthread + 30 (libsystem_c.dylib) [0x9750ccca]
    10 _pthread_wqthread + 448 (libsystem_c.dylib) [0x97524e19]
      10 __workq_kernreturn + 10 (libsystem_kernel.dylib) [0x91aa20ee]
       *10 ??? (mach_kernel + 3911152) [0xffffff80005badf0]

  Binary Images:
              0x1000 -           0x436fff  com.perceptiveautomation.indigo-client5 5.1.5 (5.1.5) <E78EC0CD-9138-3E3D-BFB4-E22AC96CA7D6> /Applications/Indigo 5.app/Contents/MacOS/Indigo 5
          0x91a8d000 -         0x91aa7ffc  libsystem_kernel.dylib <C6BA5A9F-08BB-3544-9A36-070DEDE92279> /usr/lib/system/libsystem_kernel.dylib
          0x926cf000 -         0x926cffff  libsystem_blocks.dylib <3A743C5D-CFA5-37D8-80A8-B6795A9DB04F> /usr/lib/system/libsystem_blocks.dylib
          0x927e3000 -         0x9280cff7  libRIP.A.dylib <48626D20-EFD2-3F8C-B458-30514DDD7984> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib
          0x92d86000 -         0x931c8ff3  com.apple.CoreGraphics 1.600.0 <2E04AAAD-8403-3819-BD6C-9836D42F58B1> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics
          0x9494b000 -         0x94d2dff7  com.apple.HIToolbox 2.0 <04C20B6A-FE3D-396E-BCAF-AC4DBAB3747E> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
          0x95766000 -         0x95778ff7  libdispatch.dylib <833C83BE-278C-353E-AC6D-9B85FAC50A1D> /usr/lib/system/libdispatch.dylib
          0x9581f000 -         0x963d8fff  com.apple.AppKit 6.8 (1187) <5E13B150-4096-3B61-9DC0-6ABA48F6515B> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
          0x9750c000 -         0x975c9ffb  libsystem_c.dylib <7D90CAC5-EC98-35F8-A52E-81B54F0C7DCC> /usr/lib/system/libsystem_c.dylib
          0x9866b000 -         0x98852ffb  com.apple.CoreFoundation 6.8 (744) <A2BB4949-264A-302B-897E-713860894FE6> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
          0x98853000 -         0x98b70fff  com.apple.Foundation 6.8 (945) <B6F00754-C3F7-3E33-B708-CCEA2AA3E969> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
          0x9a415000 -         0x9a52215f  libobjc.A.dylib <9663A040-F232-3E2A-8318-AA40B940AF6F> /usr/lib/libobjc.A.dylib
 *0xffffff8000200000 - 0xffffff800073d30c  mach_kernel <3005059E-270B-3B9F-940D-7A66C05DDC9D> /mach_kernel


Process:         accountsd [488]
Path:            /System/Library/Frameworks/Accounts.framework/Versions/A/Support/accountsd
Architecture:    x86_64
Parent:          launchd [280]
UID:             501
Sudden Term:     Clean (allows idle exit)
Task size:       1337 pages

  Thread 0x890      DispatchQueue 1          priority 20       
  10 start + 1 (libdyld.dylib) [0x7fff89dfa7e1]
    10 ??? (accountsd + 3040) [0x1089f6be0]
      10 CFRunLoopRunSpecific + 290 (CoreFoundation) [0x7fff91fe6dd2]
        10 __CFRunLoopRun + 1078 (CoreFoundation) [0x7fff91fe7606]
          10 __CFRunLoopServiceMachPort + 195 (CoreFoundation) [0x7fff91fe1f23]
            10 mach_msg_trap + 10 (libsystem_kernel.dylib) [0x7fff8cff6686]
             *10 ipc_mqueue_receive_continue + 0 (mach_kernel) [0xffffff8000213030]

  Thread 0x89b      DispatchQueue 2          priority 33       
  10 _dispatch_mgr_thread + 54 (libdispatch.dylib) [0x7fff91270a2a]
    10 kevent + 10 (libsystem_kernel.dylib) [0x7fff8cff8d16]
     *10 ??? (mach_kernel + 3471600) [0xffffff800054f8f0]

  Thread 0x32edbc   priority 31       
  10 start_wqthread + 13 (libsystem_c.dylib) [0x7fff8d0de1b1]
    10 _pthread_wqthread + 412 (libsystem_c.dylib) [0x7fff8d0f3cf3]
      10 __workq_kernreturn + 10 (libsystem_kernel.dylib) [0x7fff8cff86d6]
       *10 ??? (mach_kernel + 3911152) [0xffffff80005badf0]

  Binary Images:
         0x1089f6000 -        0x1089f6fff  accountsd <6B917177-B1C5-3840-A150-895F9111AE9E> /System/Library/Frameworks/Accounts.framework/Versions/A/Support/accountsd
      0x7fff89df8000 -     0x7fff89dfbff7  libdyld.dylib <F59367C9-C110-382B-A695-9035A6DD387E> /usr/lib/system/libdyld.dylib
      0x7fff8cfe6000 -     0x7fff8d001ff7  libsystem_kernel.dylib <F646589B-13F8-3685-8C17-92C77993AE86> /usr/lib/system/libsystem_kernel.dylib
      0x7fff8d0dd000 -     0x7fff8d1a9fef  libsystem_c.dylib <16B6B86C-53EE-36E8-AC2B-4AADC1008098> /usr/lib/system/libsystem_c.dylib
      0x7fff9126c000 -     0x7fff91281ff7  libdispatch.dylib <0B6B6E7F-4D8A-3F3B-A4BF-6CF34638DBBB> /usr/lib/system/libdispatch.dylib
      0x7fff91fb2000 -     0x7fff9219bfff  com.apple.CoreFoundation 6.8 (744) <47AEA7C7-EF9B-3FC6-AEBF-CE02FC650301> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
 *0xffffff8000200000 - 0xffffff800073d30c  mach_kernel <3005059E-270B-3B9F-940D-7A66C05DDC9D> /mach_kernel


Process:         AdobeAcrobat [430]
Path:            /Applications/Adobe Acrobat X Pro/Adobe Acrobat Pro.app/Contents/MacOS/AdobeAcrobat
Architecture:    i386
Parent:          launchd [280]
UID:             501
Task size:       39759 pages (+5)
CPU Time:        0.001s


Process:         AirPort Base Station Agent [712]
Path:            /System/Library/CoreServices/AirPort Base Station Agent.app/Contents/MacOS/AirPort Base Station Agent
Architecture:    x86_64
Parent:          launchd [280]
UID:             501
Sudden Term:     Clean
Task size:       491 pages

  Thread 0xd6b      DispatchQueue 1          priority 31       
  10 start + 1 (libdyld.dylib) [0x7fff89dfa7e1]
    10 ??? (AirPort Base Station Agent + 71957) [0x1060a1915]
      10 CFRunLoopRun + 97 (CoreFoundation) [0x7fff91ff5a81]
        10 CFRunLoopRunSpecific + 290 (CoreFoundation) [0x7fff91fe6dd2]
          10 __CFRunLoopRun + 1078 (CoreFoundation) [0x7fff91fe7606]
            10 __CFRunLoopServiceMachPort + 195 (CoreFoundation) [0x7fff91fe1f23]
              10 mach_msg_trap + 10 (libsystem_kernel.dylib) [0x7fff8cff6686]
               *10 ipc_mqueue_receive_continue + 0 (mach_kernel) [0xffffff8000213030]

  Thread 0xd97      DispatchQueue 2          priority 33       
  10 _dispatch_mgr_thread + 54 (libdispatch.dylib) [0x7fff91270a2a]
    10 kevent + 10 (libsystem_kernel.dylib) [0x7fff8cff8d16]
     *10 ??? (mach_kernel + 3471600) [0xffffff800054f8f0]

  Thread 0xdd1      priority 31       
  10 thread_start + 13 (libsystem_c.dylib) [0x7fff8d0de1c1]
    10 _pthread_start + 327 (libsystem_c.dylib) [0x7fff8d0f1782]
      10 __select + 10 (libsystem_kernel.dylib) [0x7fff8cff8322]
       *10 ??? (mach_kernel + 3581120) [0xffffff800056a4c0]

  Binary Images:
         0x106090000 -        0x1060a6ff7  com.apple.AirPortBaseStationAgent 1.5.5 (155.7) <F3A0627B-7620-3A09-A390-3FEBA3DE9CCD> /System/Library/CoreServices/AirPort Base Station Agent.app/Contents/MacOS/AirPort Base Station Agent
      0x7fff89df8000 -     0x7fff89dfbff7  libdyld.dylib <F59367C9-C110-382B-A695-9035A6DD387E> /usr/lib/system/libdyld.dylib
      0x7fff8cfe6000 -     0x7fff8d001ff7  libsystem_kernel.dylib <F646589B-13F8-3685-8C17-92C77993AE86> /usr/lib/system/libsystem_kernel.dylib
      0x7fff8d0dd000 -     0x7fff8d1a9fef  libsystem_c.dylib <16B6B86C-53EE-36E8-AC2B-4AADC1008098> /usr/lib/system/libsystem_c.dylib
      0x7fff9126c000 -     0x7fff91281ff7  libdispatch.dylib <0B6B6E7F-4D8A-3F3B-A4BF-6CF34638DBBB> /usr/lib/system/libdispatch.dylib
      0x7fff91fb2000 -     0x7fff9219bfff  com.apple.CoreFoundation 6.8 (744) <47AEA7C7-EF9B-3FC6-AEBF-CE02FC650301> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
 *0xffffff8000200000 - 0xffffff800073d30c  mach_kernel <3005059E-270B-3B9F-940D-7A66C05DDC9D> /mach_kernel


Process:         appleeventsd [51]
Path:            /System/Library/CoreServices/appleeventsd
Architecture:    x86_64
Parent:          launchd [1]
UID:             71
Sudden Term:     Dirty (allows idle exit)
Task size:       712 pages

  Thread 0x202      DispatchQueue 2          priority 33       
  10 _dispatch_mgr_thread + 54 (libdispatch.dylib) [0x7fff91270a2a]
    10 kevent + 10 (libsystem_kernel.dylib) [0x7fff8cff8d16]
     *10 ??? (mach_kernel + 3471600) [0xffffff800054f8f0]

  Thread 0x203      DispatchQueue 7          priority 31       
  10 _dispatch_sig_thread + 45 (libdispatch.dylib) [0x7fff9126ddc9]
    10 __sigsuspend_nocancel + 10 (libsystem_kernel.dylib) [0x7fff8cff8566]
     *10 ??? (mach_kernel + 3581120) [0xffffff800056a4c0]

  Binary Images:
         0x10bd64000 -        0x10bd64fff  appleeventsd <D689616F-79C5-301C-B260-30FAD64BC2A5> /System/Library/CoreServices/appleeventsd
      0x7fff8cfe6000 -     0x7fff8d001ff7  libsystem_kernel.dylib <F646589B-13F8-3685-8C17-92C77993AE86> /usr/lib/system/libsystem_kernel.dylib
      0x7fff9126c000 -     0x7fff91281ff7  libdispatch.dylib <0B6B6E7F-4D8A-3F3B-A4BF-6CF34638DBBB> /usr/lib/system/libdispatch.dylib
 *0xffffff8000200000 - 0xffffff800073d30c  mach_kernel <3005059E-270B-3B9F-940D-7A66C05DDC9D> /mach_kernel


Process:         AppleIDAuthAgent [495]
Path:            /System/Library/CoreServices/AppleIDAuthAgent
Architecture:    x86_64
Parent:          launchd [280]
UID:             501
Sudden Term:     Clean (allows idle exit)
Task size:       503 pages

  Thread 0x927      DispatchQueue 2          priority 33       
  10 _dispatch_mgr_thread + 54 (libdispatch.dylib) [0x7fff91270a2a]
    10 kevent + 10 (libsystem_kernel.dylib) [0x7fff8cff8d16]
     *10 ??? (mach_kernel + 3471600) [0xffffff800054f8f0]

  Thread 0x929      DispatchQueue 7          priority 31       
  10 _dispatch_sig_thread + 45 (libdispatch.dylib) [0x7fff9126ddc9]
    10 __sigsuspend_nocancel + 10 (libsystem_kernel.dylib) [0x7fff8cff8566]
     *10 ??? (mach_kernel + 3581120) [0xffffff800056a4c0]

  Thread 0xa0e      DispatchQueue 17         priority 31       
  10 start_wqthread + 13 (libsystem_c.dylib) [0x7fff8d0de1b1]
    10 _pthread_wqthread + 404 (libsystem_c.dylib) [0x7fff8d0f3ceb]
      10 _dispatch_worker_thread2 + 249 (libdispatch.dylib) [0x7fff9126f207]
        10 _dispatch_queue_invoke + 52 (libdispatch.dylib) [0x7fff9126f335]
          10 _dispatch_queue_drain + 180 (libdispatch.dylib) [0x7fff9126f48c]
            10 _dispatch_queue_invoke + 72 (libdispatch.dylib) [0x7fff9126f349]
              10 _dispatch_source_invoke + 691 (libdispatch.dylib) [0x7fff912702d7]
                10 _dispatch_client_callout + 8 (libdispatch.dylib) [0x7fff9126e0fa]
                  10 _dispatch_after_timer_callback + 22 (libdispatch.dylib) [0x7fff912729ab]
                    10 _dispatch_client_callout + 8 (libdispatch.dylib) [0x7fff9126e0fa]
                      10 _dispatch_call_block_and_release + 15 (libdispatch.dylib) [0x7fff91271f3d]
                        10 ??? (AppleIDAuthAgent + 12731) [0x1033451bb]
                          10 semaphore_wait_trap + 10 (libsystem_kernel.dylib) [0x7fff8cff66c2]
                           *10 semaphore_wait_continue + 0 (mach_kernel) [0xffffff8000233e90]

  Binary Images:
         0x103342000 -        0x103373fff  AppleIDAuthAgent <6CD06F27-701A-3FE6-B6CD-9A77FD389AE9> /System/Library/CoreServices/AppleIDAuthAgent
      0x7fff8cfe6000 -     0x7fff8d001ff7  libsystem_kernel.dylib <F646589B-13F8-3685-8C17-92C77993AE86> /usr/lib/system/libsystem_kernel.dylib
      0x7fff8d0dd000 -     0x7fff8d1a9fef  libsystem_c.dylib <16B6B86C-53EE-36E8-AC2B-4AADC1008098> /usr/lib/system/libsystem_c.dylib
      0x7fff9126c000 -     0x7fff91281ff7  libdispatch.dylib <0B6B6E7F-4D8A-3F3B-A4BF-6CF34638DBBB> /usr/lib/system/libdispatch.dylib
 *0xffffff8000200000 - 0xffffff800073d30c  mach_kernel <3005059E-270B-3B9F-940D-7A66C05DDC9D> /mach_kernel


Process:         AppleMobileDeviceHelper [91172]
Path:            /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/Current/AppleMobileDeviceHelper.app/Contents/MacOS/AppleMobileDeviceHelper
Architecture:    x86_64
Parent:          iTunes [422]
UID:             501
Task size:       3951 pages

  Thread 0x70d9f    DispatchQueue 1          priority 31       
  10 ??? (AppleMobileDeviceHelper + 5432) [0x100001538]
    10 ??? (AppleMobileDeviceHelper + 12320) [0x100003020]
      10 ??? (AppleMobileDeviceHelper + 47253) [0x10000b895]
        10 __select + 10 (libsystem_kernel.dylib) [0x7fff8cff8322]
         *10 ??? (mach_kernel + 3581120) [0xffffff800056a4c0]

  Thread 0x70da4    DispatchQueue 2          priority 33       
  10 _dispatch_mgr_thread + 54 (libdispatch.dylib) [0x7fff91270a2a]
    10 kevent + 10 (libsystem_kernel.dylib) [0x7fff8cff8d16]
     *10 ??? (mach_kernel + 3471600) [0xffffff800054f8f0]

  Thread 0x70db0    priority 31       
  10 thread_start + 13 (libsystem_c.dylib) [0x7fff8d0de1c1]
    10 _pthread_start + 327 (libsystem_c.dylib) [0x7fff8d0f1782]
      10 __select + 10 (libsystem_kernel.dylib) [0x7fff8cff8322]
       *10 ??? (mach_kernel + 3581120) [0xffffff800056a4c0]

  Binary Images:
         0x100000000 -        0x100018fff  com.apple.SyncServices.AppleMobileDeviceHelper 5.0 (860.3) <84D1F9B9-D749-A245-164A-6766479E8685> /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/Current/AppleMobileDeviceHelper.app/Contents/MacOS/AppleMobileDeviceHelper
      0x7fff8cfe6000 -     0x7fff8d001ff7  libsystem_kernel.dylib <F646589B-13F8-3685-8C17-92C77993AE86> /usr/lib/system/libsystem_kernel.dylib
      0x7fff8d0dd000 -     0x7fff8d1a9fef  libsystem_c.dylib <16B6B86C-53EE-36E8-AC2B-4AADC1008098> /usr/lib/system/libsystem_c.dylib
      0x7fff9126c000 -     0x7fff91281ff7  libdispatch.dylib <0B6B6E7F-4D8A-3F3B-A4BF-6CF34638DBBB> /usr/lib/system/libdispatch.dylib
 *0xffffff8000200000 - 0xffffff800073d30c  mach_kernel <3005059E-270B-3B9F-940D-7A66C05DDC9D> /mach_kernel


Process:         AppleSpell [573]
Path:            /System/Library/Services/AppleSpell.service/Contents/MacOS/AppleSpell
Architecture:    x86_64
Parent:          launchd [280]
UID:             501
Sudden Term:     Clean
Task size:       5034 pages

  Thread 0xa7e      DispatchQueue 1          priority 46       
  10 start + 1 (libdyld.dylib) [0x7fff89dfa7e1]
    10 ??? (AppleSpell + 7271) [0x10852fc67]
      10 -[NSSpellServer run] + 73 (Foundation) [0x7fff8e4c5066]
        10 CFRunLoopRun + 97 (CoreFoundation) [0x7fff91ff5a81]
          10 CFRunLoopRunSpecific + 290 (CoreFoundation) [0x7fff91fe6dd2]
            10 __CFRunLoopRun + 1078 (CoreFoundation) [0x7fff91fe7606]
              10 __CFRunLoopServiceMachPort + 195 (CoreFoundation) [0x7fff91fe1f23]
                10 mach_msg_trap + 10 (libsystem_kernel.dylib) [0x7fff8cff6686]
                 *10 ipc_mqueue_receive_continue + 0 (mach_kernel) [0xffffff8000213030]

  Thread 0xa80      DispatchQueue 2          priority 48       
  10 _dispatch_mgr_thread + 54 (libdispatch.dylib) [0x7fff91270a2a]
    10 kevent + 10 (libsystem_kernel.dylib) [0x7fff8cff8d16]
     *10 ??? (mach_kernel + 3471600) [0xffffff800054f8f0]

  Binary Images:
         0x10852e000 -        0x1085e3ff7  com.apple.AppleSpell 1.9 (173.1) <6ED0981A-B081-3345-8EBB-E4AB821B077A> /System/Library/Services/AppleSpell.service/Contents/MacOS/AppleSpell
      0x7fff89df8000 -     0x7fff89dfbff7  libdyld.dylib <F59367C9-C110-382B-A695-9035A6DD387E> /usr/lib/system/libdyld.dylib
      0x7fff8cfe6000 -     0x7fff8d001ff7  libsystem_kernel.dylib <F646589B-13F8-3685-8C17-92C77993AE86> /usr/lib/system/libsystem_kernel.dylib
      0x7fff8e343000 -     0x7fff8e69fff7  com.apple.Foundation 6.8 (945) <0C972F73-0C07-3384-98F2-B176E0289494> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
      0x7fff9126c000 -     0x7fff91281ff7  libdispatch.dylib <0B6B6E7F-4D8A-3F3B-A4BF-6CF34638DBBB> /usr/lib/system/libdispatch.dylib
      0x7fff91fb2000 -     0x7fff9219bfff  com.apple.CoreFoundation 6.8 (744) <47AEA7C7-EF9B-3FC6-AEBF-CE02FC650301> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
 *0xffffff8000200000 - 0xffffff800073d30c  mach_kernel <3005059E-270B-3B9F-940D-7A66C05DDC9D> /mach_kernel


Process:         apsd [486]
Path:            /System/Library/PrivateFrameworks/ApplePushService.framework/apsd
Architecture:    x86_64
Parent:          launchd [1]
UID:             0
Task size:       2131 pages (+3)

  Thread 0x886      DispatchQueue 1          priority 31       
  10 start + 1 (libdyld.dylib) [0x7fff89dfa7e1]
    10 ??? (apsd + 19622) [0x10863aca6]
      10 -[NSRunLoop(NSRunLoop) run] + 74 (Foundation) [0x7fff8e3763da]
        10 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 268 (Foundation) [0x7fff8e3ddace]
          10 CFRunLoopRunSpecific + 290 (CoreFoundation) [0x7fff91fe6dd2]
            10 __CFRunLoopRun + 1078 (CoreFoundation) [0x7fff91fe7606]
              10 __CFRunLoopServiceMachPort + 195 (CoreFoundation) [0x7fff91fe1f23]
                10 mach_msg_trap + 10 (libsystem_kernel.dylib) [0x7fff8cff6686]
                 *10 ipc_mqueue_receive_continue + 0 (mach_kernel) [0xffffff8000213030]

  Thread 0x887      DispatchQueue 2          priority 33       
  10 _dispatch_mgr_thread + 54 (libdispatch.dylib) [0x7fff91270a2a]
    10 kevent + 10 (libsystem_kernel.dylib) [0x7fff8cff8d16]
     *10 ??? (mach_kernel + 3471600) [0xffffff800054f8f0]

  Thread 0x8bf      priority 63       
  10 thread_start + 13 (libsystem_c.dylib) [0x7fff8d0de1c1]
    10 _pthread_start + 327 (libsystem_c.dylib) [0x7fff8d0f1782]
      10 __NSThread__main__ + 1345 (Foundation) [0x7fff8e3d8842]
        10 +[NSURLConnection(Loader) _resourceLoadLoop:] + 356 (Foundation) [0x7fff8e37a7d6]
          10 CFRunLoopRunSpecific + 290 (CoreFoundation) [0x7fff91fe6dd2]
            10 __CFRunLoopRun + 1078 (CoreFoundation) [0x7fff91fe7606]
              10 __CFRunLoopServiceMachPort + 195 (CoreFoundation) [0x7fff91fe1f23]
                10 mach_msg_trap + 10 (libsystem_kernel.dylib) [0x7fff8cff6686]
                 *10 ipc_mqueue_receive_continue + 0 (mach_kernel) [0xffffff8000213030]

  Thread 0x8c3      priority 31       
  10 thread_start + 13 (libsystem_c.dylib) [0x7fff8d0de1c1]
    10 _pthread_start + 327 (libsystem_c.dylib) [0x7fff8d0f1782]
      10 __select + 10 (libsystem_kernel.dylib) [0x7fff8cff8322]
       *10 ??? (mach_kernel + 3581120) [0xffffff800056a4c0]

  Thread 0x32ee32   priority 31       
  9 start_wqthread + 13 (libsystem_c.dylib) [0x7fff8d0de1b1]
    9 _pthread_wqthread + 412 (libsystem_c.dylib) [0x7fff8d0f3cf3]
      9 __workq_kernreturn + 10 (libsystem_kernel.dylib) [0x7fff8cff86d6]
       *9 ??? (mach_kernel + 3911152) [0xffffff80005badf0]

  Binary Images:
         0x108636000 -        0x1086b3ff7  apsd <524BF285-5D28-3B0A-9CC0-1AC469933E6E> /System/Library/PrivateFrameworks/ApplePushService.framework/apsd
      0x7fff89df8000 -     0x7fff89dfbff7  libdyld.dylib <F59367C9-C110-382B-A695-9035A6DD387E> /usr/lib/system/libdyld.dylib
      0x7fff8cfe6000 -     0x7fff8d001ff7  libsystem_kernel.dylib <F646589B-13F8-3685-8C17-92C77993AE86> /usr/lib/system/libsystem_kernel.dylib
      0x7fff8d0dd000 -     0x7fff8d1a9fef  libsystem_c.dylib <16B6B86C-53EE-36E8-AC2B-4AADC1008098> /usr/lib/system/libsystem_c.dylib
      0x7fff8e343000 -     0x7fff8e69fff7  com.apple.Foundation 6.8 (945) <0C972F73-0C07-3384-98F2-B176E0289494> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
      0x7fff9126c000 -     0x7fff91281ff7  libdispatch.dylib <0B6B6E7F-4D8A-3F3B-A4BF-6CF34638DBBB> /usr/lib/system/libdispatch.dylib
      0x7fff91fb2000 -     0x7fff9219bfff  com.apple.CoreFoundation 6.8 (744) <47AEA7C7-EF9B-3FC6-AEBF-CE02FC650301> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
 *0xffffff8000200000 - 0xffffff800073d30c  mach_kernel <3005059E-270B-3B9F-940D-7A66C05DDC9D> /mach_kernel

Posted on
Thu Aug 30, 2012 6:14 am
matt (support) offline
Site Admin
User avatar
Posts: 21421
Joined: Jan 27, 2003
Location: Texas

Re: New Plugin - cause Action Groups to hang

It looks like your loop is both polling all of the Squeezeboxes and updating all of their Indigo states very frequently. The delay between the runs of the loop is only 0.01 seconds. That is going to cause the plugin and IndigoServer to be very busy. I'd suggest updating at most every second or two.

Image

Posted on
Thu Aug 30, 2012 8:27 am
pgershon offline
Posts: 509
Joined: Jul 10, 2004

Re: New Plugin - cause Action Groups to hang

Thanks. I will try to slow it down. I actually did some trial and error work and found that writing the time elapsed was causing the problem. When I took out the lines
Code: Select all
               s.send(SQplayerid+" time ?\r\n")
               data = s.recv(1024)
               data=data.rstrip("\r\n")+" "
               data=self.sqprocess(data,SQplayerid+" time ")
               musicPlayer.updateStateOnServer("elapsed", value=data)

the trouble went away. Then when I changed "musicPlayer.updateStateOnServer("elapsed", value=data)" to "musicPlayer.updateStateOnServer("elapsed", value=round(float(data)))" everything worked again fine. I do think I will slow down the polling however - not necessary.

Posted on
Thu Aug 30, 2012 8:40 am
matt (support) offline
Site Admin
User avatar
Posts: 21421
Joined: Jan 27, 2003
Location: Texas

Re: New Plugin - cause Action Groups to hang

There are some optimizations in Indigo for when a state update is requested (updateStateOnServer) but the new state value is unchanged. So in the original case the value was probably updating a ton -- which then causes the Indigo Server to: check for Device State Change triggers that need to fire, update Control Pages inspecting that state, push the new state changes to all connected Indigo clients. If that is happening several times a second, then there will be issues with connected Indigo clients that are trying to update their UIs to reflect the rapid state changes.

Even though rounding the state value helps prevent the problem, definitely increase the sleep to around 1 second. No reason to be updating it 100 times a second...

Image

Posted on
Thu Aug 30, 2012 9:57 am
terrydew offline
Posts: 258
Joined: Jun 10, 2011

Re: New Plugin - cause Action Groups to hang

Matt

This is the same type of problem with the nest plugin and to a lesser degree with the caddix plugin. My question is there a way to modify the way the action group/trigger works to avoid this. My system appears to work in operating mode with these plugins running and it is only when I want to work with the Indigo client that the problems occur. It just seems to me that with all of the great (but more complicated) plugins, we will see this more and more. I really have no idea what I am asking of you, so if it is an unreasonable request please ignore. :D

Terry

Posted on
Thu Aug 30, 2012 10:08 am
matt (support) offline
Site Admin
User avatar
Posts: 21421
Joined: Jan 27, 2003
Location: Texas

Re: New Plugin - cause Action Groups to hang

There are some performance issues we are looking into addressing with regards to the client UI making more requests to the plugin than is required (when dialogs are shown). That said, it is best to have the plugin both not spin its wheels doing busy work (polling more often than needed) and not send more requests than are needed to the IndigoServer.

The problem with the Nest/Caddix plugins might be a bit different than the issue on this thread. Those might be blocked waiting for hardware/network requests. Being blocked isn't going to chew up the CPU utilization, but it can cause problems if the Indigo UI is trying to make a request to the plugin. So if a plugin has to make requests that may block for a long time, those should be moved into a secondary python thread in the plugin.

The changes we are making to the Indigo client will help though. But plugins still need to try to behave nicely and minimize CPU usage and be able to respond to Indigo UI requests in a timely manner.

Image

Posted on
Thu Aug 30, 2012 10:31 am
terrydew offline
Posts: 258
Joined: Jun 10, 2011

Re: New Plugin - cause Action Groups to hang

Can not ask for more. Maybe we need an App Store type approval :D Just kidding. Have been waiting for 20 days for the new Weathersnoop so approval process is a disaster.

Posted on
Thu Aug 30, 2012 10:49 am
jay (support) offline
Site Admin
User avatar
Posts: 18243
Joined: Mar 19, 2008
Location: Austin, Texas

Re: New Plugin - cause Action Groups to hang

Just to get a bit more specific: if a plugin does anything that can take significant time (especially Apple events, network connections, or serial communication that blocks, particularly when the target may be offline and therefore might never respond) then the plugin writer needs to safeguard the main plugin thread so that other requests from Indigo to the plugin (mostly for UI which have to go from client->server->plugin process and back) will not block.

I've just gotten into the habit of putting anything I'm talking to like that into a separate thread to avoid this exact problem. Creating/managing threads in Python is pretty easy so there's very little reason not to do it.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sat Oct 06, 2012 8:59 am
ckeyes888 offline
Posts: 2425
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: New Plugin - cause Action Groups to hang

Anything happening with a Squeezebox plugin?

Thanks,

Carl

Posted on
Wed Nov 20, 2013 12:48 pm
pgershon offline
Posts: 509
Joined: Jul 10, 2004

Re: New Plugin - cause Action Groups to hang

Sorry I saw this over a year late. Yes I have a plugin for Squeezebox. Happy to share it.

Posted on
Wed Nov 20, 2013 12:58 pm
ckeyes888 offline
Posts: 2425
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: New Plugin - cause Action Groups to hang

Love to try the plugin myself. Will it be posted soon?

Thanks,

Carl

Posted on
Wed Nov 20, 2013 6:15 pm
pgershon offline
Posts: 509
Joined: Jul 10, 2004

Re: New Plugin - cause Action Groups to hang

Increased sleep to 2.0 seconds as something in Mavericks caused the Squeezebox plugin to start guzzling CPU. This improved performance for a bot, but after a few hours it returned to 100% CPU usage. Not sure why.

Posted on
Wed Nov 20, 2013 9:35 pm
ckeyes888 offline
Posts: 2425
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: New Plugin - cause Action Groups to hang

Just tried to install the plugin and got this error:

Code: Select all
Error                           ReloadPlugin() caught exception: FileIOError -- rename/move of file or folder failed -- check file/folder permissions




Edit: Got it...just needed to change the permissions of the file.

Thanks,

Carl

Posted on
Wed Nov 20, 2013 9:48 pm
ckeyes888 offline
Posts: 2425
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: New Plugin - cause Action Groups to hang

Almost got it. I entered the IP and port, 9000 in my case, and get this error:

Code: Select all
Squeezebox Plugin Error         plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
  Squeezebox Plugin Error         Error in plugin execution:

Traceback (most recent call last):
  File "plugin.py", line 79, in runConcurrentThread
    data = s.recv(1024)
error: (54, 'Connection reset by peer')


Running 10.5.8 and Indigo 6.04

Here's my server info:

Logitech Media Server Version: 7.7.3 - 1375965195 @ Mon Aug 12 03:11:32 PDT 2013
Hostname: tv
Server IP Address: 192.168.1.80
Server HTTP Port Number: 9000
Operating system: Mac OS X 10.5.8 - EN - utf8
Platform Architecture: x86
Perl Version: 5.8.8 - darwin-thread-multi-2level
Database Version: DBD::SQLite 1.34_01 (sqlite 3.7.7.1)
Total Players Recognized: 1

Any ideas.

Thanks,

Carl

Posted on
Thu Nov 21, 2013 7:27 am
pgershon offline
Posts: 509
Joined: Jul 10, 2004

Re: New Plugin - cause Action Groups to hang

Look at this thread. I think I fixed it. I had same issue on another plugin. Not sure why this is not affecting my machine the same way, but the fix should work.

viewtopic.php?f=18&t=10565&p=68432&hilit=Connection+reset+by+peer#p68432

Who is online

Users browsing this forum: No registered users and 2 guests