Hi all,I've found something which seems like a bug in the interaction between the notification framework and stamping.
When new mail messages enter Chandler, I'd like to annotate them and put them into a mail directory Item so they will be accessible to the IMAP server. Currently, this works perfectly for all the entry cases I've tested (the IMAP client, Item>New Item>Message, drag and drop from Thunderbird/Mail.app/etc) except stamping. When a message is stamped, a repository commit during the callback causes a very nasty error (which I've reproduced at the bottom of this page).
A bit more exploration led to the creation of a parcel which illustrates this bug. It appears that the problem is indeed caused by the commit during an onCollectionNotification or watchKind callback. Removing the commit fixes the problem, and the test parcel is sufficiently simple that it seems likely the bug is coming from code already in Chandler's trunk.
Grant did some exploring and found the following:
So, here's what's seems to be going on:The self.onCollectionNotification() callback that results from notificationQueueSubscribe() is always happening in the main thread. When you commit your changes (as you should), that causes a whole bunch of stuff to happen, including changes to CPIA blocks in the app. That eventually causes CPIA to get into a weird state; probably what's happening is the commit in the middle of the refresh exposes some dependency on the order of notification processing.
After discussing this with Grant, Andi, and Bryan, Grant recommended I take this to the list.
Does this seem like a bug to people who know more about these mechanisms? Should I file a bug report? If yes, is there any documentation on the right way to file one?
Thanks very much -Travis Traceback (most recent call last):File "/Users/travis/dev/chandler/chandler/application/Application.py", line 655, in OnCommand
Block.post (blockEvent, arguments, block)File "/Users/travis/dev/chandler/chandler/parcels/osaf/framework/blocks/Block.py", line 183, in post
self.dispatchEvent (event)File "/Users/travis/dev/chandler/chandler/parcels/osaf/framework/blocks/Block.py", line 1028, in dispatchEvent
bubbleUpCallMethod (blockOrWidget, methodName, event)File "/Users/travis/dev/chandler/chandler/parcels/osaf/framework/blocks/Block.py", line 935, in bubbleUpCallMethod
blockOrWidget = blockOrWidget.parentBlockchandlerdb.item.ItemError.StaleItemError: <DetailSynchronizedAttributeEditorBlock (stale): 81890f64-16a7-11db-a954-93550c3bde89>
Traceback (most recent call last):File "/Users/travis/dev/chandler/chandler/application/Application.py", line 655, in OnCommand
Block.post (blockEvent, arguments, block)File "/Users/travis/dev/chandler/chandler/parcels/osaf/framework/blocks/Block.py", line 183, in post
self.dispatchEvent (event)File "/Users/travis/dev/chandler/chandler/parcels/osaf/framework/blocks/Block.py", line 1028, in dispatchEvent
bubbleUpCallMethod (blockOrWidget, methodName, event)File "/Users/travis/dev/chandler/chandler/parcels/osaf/framework/blocks/Block.py", line 935, in bubbleUpCallMethod
blockOrWidget = blockOrWidget.parentBlockchandlerdb.item.ItemError.StaleItemError: <DetailSynchronizedAttributeEditorBlock (stale): 81890f64-16a7-11db-a954-93550c3bde89>
Traceback (most recent call last):File "/Users/travis/dev/chandler/chandler/application/Application.py", line 655, in OnCommand
Block.post (blockEvent, arguments, block)File "/Users/travis/dev/chandler/chandler/parcels/osaf/framework/blocks/Block.py", line 183, in post
self.dispatchEvent (event)File "/Users/travis/dev/chandler/chandler/parcels/osaf/framework/blocks/Block.py", line 1028, in dispatchEvent
bubbleUpCallMethod (blockOrWidget, methodName, event)File "/Users/travis/dev/chandler/chandler/parcels/osaf/framework/blocks/Block.py", line 935, in bubbleUpCallMethod
blockOrWidget = blockOrWidget.parentBlockchandlerdb.item.ItemError.StaleItemError: <DetailSynchronizedAttributeEditorBlock (stale): 81890f64-16a7-11db-a954-93550c3bde89>
Traceback (most recent call last):File "/Users/travis/dev/chandler/chandler/application/Application.py", line 640, in OnCommand
blockEvent = getattr (block, 'event', None)chandlerdb.item.ItemError.StaleItemError: <MailMessageButtonBlock (stale): 818e89e4-16a7-11db-a954-93550c3bde89>
Traceback (most recent call last):File "/Users/travis/dev/chandler/chandler/application/Application.py", line 640, in OnCommand
blockEvent = getattr (block, 'event', None)chandlerdb.item.ItemError.StaleItemError: <TaskStampBlock (stale): 818eb662-16a7-11db-a954-93550c3bde89>
Traceback (most recent call last):File "/Users/travis/dev/chandler/chandler/application/Application.py", line 640, in OnCommand
blockEvent = getattr (block, 'event', None)chandlerdb.item.ItemError.StaleItemError: <CalendarStampBlock (stale): 818ed6d8-16a7-11db-a954-93550c3bde89>
Traceback (most recent call last):File "/Users/travis/dev/chandler/chandler/application/Application.py", line 640, in OnCommand
blockEvent = getattr (block, 'event', None)chandlerdb.item.ItemError.StaleItemError: <PrivateSwitchButtonBlock (stale): 818f1102-16a7-11db-a954-93550c3bde89>
Traceback (most recent call last):File "/Users/travis/dev/chandler/chandler/application/Application.py", line 640, in OnCommand
blockEvent = getattr (block, 'event', None)chandlerdb.item.ItemError.StaleItemError: <ReadOnlyIconBlock (stale): 818f4d20-16a7-11db-a954-93550c3bde89>
Traceback (most recent call last):File "/Users/travis/dev/chandler/chandler/application/Application.py", line 655, in OnCommand
Block.post (blockEvent, arguments, block)File "/Users/travis/dev/chandler/chandler/parcels/osaf/framework/blocks/Block.py", line 183, in post
self.dispatchEvent (event)File "/Users/travis/dev/chandler/chandler/parcels/osaf/framework/blocks/Block.py", line 1028, in dispatchEvent
bubbleUpCallMethod (blockOrWidget, methodName, event)File "/Users/travis/dev/chandler/chandler/parcels/osaf/framework/blocks/Block.py", line 935, in bubbleUpCallMethod
blockOrWidget = blockOrWidget.parentBlockchandlerdb.item.ItemError.StaleItemError: <DetailSynchronizedAttributeEditorBlock (stale): 81890f64-16a7-11db-a954-93550c3bde89>
Traceback (most recent call last):File "/Users/travis/dev/chandler/chandler/application/Application.py", line 655, in OnCommand
Block.post (blockEvent, arguments, block)File "/Users/travis/dev/chandler/chandler/parcels/osaf/framework/blocks/Block.py", line 183, in post
self.dispatchEvent (event)File "/Users/travis/dev/chandler/chandler/parcels/osaf/framework/blocks/Block.py", line 1028, in dispatchEvent
bubbleUpCallMethod (blockOrWidget, methodName, event)File "/Users/travis/dev/chandler/chandler/parcels/osaf/framework/blocks/Block.py", line 935, in bubbleUpCallMethod
blockOrWidget = blockOrWidget.parentBlockchandlerdb.item.ItemError.StaleItemError: <DetailSynchronizedAttributeEditorBlock (stale): 81890f64-16a7-11db-a954-93550c3bde89>
Traceback (most recent call last):File "/Users/travis/dev/chandler/chandler/application/Application.py", line 655, in OnCommand
Block.post (blockEvent, arguments, block)File "/Users/travis/dev/chandler/chandler/parcels/osaf/framework/blocks/Block.py", line 183, in post
self.dispatchEvent (event)File "/Users/travis/dev/chandler/chandler/parcels/osaf/framework/blocks/Block.py", line 1028, in dispatchEvent
bubbleUpCallMethod (blockOrWidget, methodName, event)File "/Users/travis/dev/chandler/chandler/parcels/osaf/framework/blocks/Block.py", line 935, in bubbleUpCallMethod
blockOrWidget = blockOrWidget.parentBlockchandlerdb.item.ItemError.StaleItemError: <DetailSynchronizedAttributeEditorBlock (stale): 81890f64-16a7-11db-a954-93550c3bde89>
Traceback (most recent call last):File "/Users/travis/dev/chandler/chandler/application/Application.py", line 655, in OnCommand
Block.post (blockEvent, arguments, block)File "/Users/travis/dev/chandler/chandler/parcels/osaf/framework/blocks/Block.py", line 183, in post
self.dispatchEvent (event)File "/Users/travis/dev/chandler/chandler/parcels/osaf/framework/blocks/Block.py", line 1028, in dispatchEvent
bubbleUpCallMethod (blockOrWidget, methodName, event)File "/Users/travis/dev/chandler/chandler/parcels/osaf/framework/blocks/Block.py", line 935, in bubbleUpCallMethod
blockOrWidget = blockOrWidget.parentBlockchandlerdb.item.ItemError.StaleItemError: <DetailSynchronizedAttributeEditorBlock (stale): 81890f64-16a7-11db-a954-93550c3bde89>
Traceback (most recent call last):File "/Users/travis/dev/chandler/chandler/application/Application.py", line 655, in OnCommand
Block.post (blockEvent, arguments, block)File "/Users/travis/dev/chandler/chandler/parcels/osaf/framework/blocks/Block.py", line 183, in post
self.dispatchEvent (event)File "/Users/travis/dev/chandler/chandler/parcels/osaf/framework/blocks/Block.py", line 1028, in dispatchEvent
bubbleUpCallMethod (blockOrWidget, methodName, event)File "/Users/travis/dev/chandler/chandler/parcels/osaf/framework/blocks/Block.py", line 935, in bubbleUpCallMethod
blockOrWidget = blockOrWidget.parentBlockchandlerdb.item.ItemError.StaleItemError: <DetailSynchronizedAttributeEditorBlock (stale): 81890f64-16a7-11db-a954-93550c3bde89>
Traceback (most recent call last):File "/Users/travis/dev/chandler/chandler/application/Application.py", line 655, in OnCommand
Block.post (blockEvent, arguments, block)File "/Users/travis/dev/chandler/chandler/parcels/osaf/framework/blocks/Block.py", line 183, in post
self.dispatchEvent (event)File "/Users/travis/dev/chandler/chandler/parcels/osaf/framework/blocks/Block.py", line 1028, in dispatchEvent
bubbleUpCallMethod (blockOrWidget, methodName, event)File "/Users/travis/dev/chandler/chandler/parcels/osaf/framework/blocks/Block.py", line 935, in bubbleUpCallMethod
blockOrWidget = blockOrWidget.parentBlockchandlerdb.item.ItemError.StaleItemError: <DetailSynchronizedAttributeEditorBlock (stale): 81890f64-16a7-11db-a954-93550c3bde89>
Traceback (most recent call last):File "/Users/travis/dev/chandler/chandler/application/Application.py", line 655, in OnCommand
Block.post (blockEvent, arguments, block)File "/Users/travis/dev/chandler/chandler/parcels/osaf/framework/blocks/Block.py", line 183, in post
self.dispatchEvent (event)File "/Users/travis/dev/chandler/chandler/parcels/osaf/framework/blocks/Block.py", line 1028, in dispatchEvent
bubbleUpCallMethod (blockOrWidget, methodName, event)File "/Users/travis/dev/chandler/chandler/parcels/osaf/framework/blocks/Block.py", line 935, in bubbleUpCallMethod
blockOrWidget = blockOrWidget.parentBlockchandlerdb.item.ItemError.StaleItemError: <DetailSynchronizedAttributeEditorBlock (stale): 81890f64-16a7-11db-a954-93550c3bde89>
Traceback (most recent call last):File "/Users/travis/dev/chandler/chandler/application/Application.py", line 199, in OnClose
Block.finishEdits()File "/Users/travis/dev/chandler/chandler/parcels/osaf/framework/blocks/Block.py", line 704, in finishEdits
saveValueMethod(onBlock)File "/Users/travis/dev/chandler/chandler/parcels/osaf/framework/blocks/ControlBlocks.py", line 1490, in saveValue
editor.EndControlEdit(self.item, self.attributeName, widget)File "/Users/travis/dev/chandler/chandler/parcels/osaf/framework/blocks/Block.py", line 306, in getProxiedContents
return getProxiedItem(getattr(self, 'contents', None))chandlerdb.item.ItemError.StaleItemError: <DetailSynchronizedAttributeEditorBlock (stale): 81890f64-16a7-11db-a954-93550c3bde89>
twistedTasker.tar.gz
Description: GNU Zip compressed data
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Open Source Applications Foundation "chandler-dev" mailing list http://lists.osafoundation.org/mailman/listinfo/chandler-dev
