ericmckean / wave-protocol

Automatically exported from code.google.com/p/wave-protocol
0 stars 0 forks source link

Shiny when editing inside indented blips #260

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Can't reproduce reliably. Happens when you edit, delete inside indented blips 
and then try to add a new indented blip in the conversation.

Stack trace:

Token:  1303112570144
 One or more exceptions caught, see full set in UmbrellaException#getCauses
  Unknown.$fillInStackTrace (StackTraceCreator.java:147)
  Unknown.fillInStackTrace (StackTraceCreator.java:387)
  Unknown.RuntimeException_2 (Throwable.java:46)
  Unknown.UmbrellaException_0 (com.google.gwt.dev.jjs.ast.JProgram:0)
  Unknown.$doFire (SimpleEventBus.java:214)
  Unknown.$fireEvent_0 (SimpleEventBus.java:103)
  Unknown.$fireEvent (HandlerManager.java:101)
  Unknown.$fireEvent_1 (Widget.java:103)
  Unknown.fireNativeEvent (DomEvent.java:116)
  Unknown.$onBrowserEvent (Widget.java:151)
  Unknown.onBrowserEvent (Widget.java:137)
  Unknown.dispatchEvent_1 (DOM.java:1264)
  Unknown.anonymous (DOMImplStandard.java:187)
  Unknown.entry0 (Impl.java:214)
  Unknown.anonymous (Impl.java:57)
Caused by: Token:  1303112570152
 (TypeError): Cannot read property 'next' of null
 stack: TypeError: Cannot read property 'next' of null
    at $getNext (http://waveinabox.net:9898/webclient/96B870181B409D6BBA993A96FD3E4D3D.cache.html:5522:143)
    at $addCanonical (http://waveinabox.net:9898/webclient/96B870181B409D6BBA993A96FD3E4D3D.cache.html:29958:152)
    at $remove_40 (http://waveinabox.net:9898/webclient/96B870181B409D6BBA993A96FD3E4D3D.cache.html:29984:7)
    at Object.onDeactivated_2 [as onDeactivated_0] (http://waveinabox.net:9898/webclient/96B870181B409D6BBA993A96FD3E4D3D.cache.html:30058:88)
    at Object.onRemovedFromParent_1 [as onRemovedFromParent_0] (http://waveinabox.net:9898/webclient/96B870181B409D6BBA993A96FD3E4D3D.cache.html:10167:89)
    at $notifyRemovedFromParent (http://waveinabox.net:9898/webclient/96B870181B409D6BBA993A96FD3E4D3D.cache.html:9330:75)
    at $removeChildrenInner (http://waveinabox.net:9898/webclient/96B870181B409D6BBA993A96FD3E4D3D.cache.html:9743:5)
    at $removeChildren (http://waveinabox.net:9898/webclient/96B870181B409D6BBA993A96FD3E4D3D.cache.html:9716:3)
    at $removeChild_2 (http://waveinabox.net:9898/webclient/96B870181B409D6BBA993A96FD3E4D3D.cache.html:9703:168)
    at $removeChild_4 (http://waveinabox.net:9898/webclient/96B870181B409D6BBA993A96FD3E4D3D.cache.html:15277:5)
 arguments: next,
 type: non_object_property_load
  Unknown.$fillInStackTrace (StackTraceCreator.java:147)
  Unknown.fillInStackTrace (StackTraceCreator.java:387)
  Unknown.JavaScriptException_0 (Throwable.java:46)
  Unknown.caught_0 (Exceptions.java:29)
  Unknown.$getNext (LinkedPruningSequenceMap.java:52)
  Unknown.$addCanonical (InlineAnchorLiveRenderer.java:272)
  Unknown.$remove_40 (InlineAnchorLiveRenderer.java:262)
  Unknown.onDeactivated_2 (InlineAnchorLiveRenderer.java:313)
  Unknown.onRemovedFromParent_1 (AgentAdapter.java:253)
  Unknown.$notifyRemovedFromParent (ContentNode.java:508)
  Unknown.$removeChildrenInner (ContentElement.java:564)
  Unknown.$removeChildren (ContentElement.java:526)
  Unknown.$removeChild_2 (ContentElement.java:505)
  Unknown.$removeChild_4 (ContentRawDocument.java:198)
  Unknown.$removeChild_5 (ContentRawDocument.java:195)
  Unknown.removeChild_0 (RepaintingPersistentContent.java:72)
  Unknown.deleteElementStart_2 (IndexedDocumentImpl.java:879)
  Unknown.apply_105 (Nindo.java:367)
  Unknown.$apply_40 (Nindo.java:689)
  Unknown.$consumeAndReturnInvertible (IndexedDocumentImpl.java:399)
  Unknown.$consumeLocal (ContentDocument.java:1698)
  Unknown.$consumeAndReturnInvertible_0 (ContentDocument.java:239)
  Unknown.consume_8 (EditorOperationSequencer.java:49)
  Unknown.$deleteNode (Locator.java:39)
  Unknown.exec_0 (WaveletBasedConversationBlip.java:563)
  Unknown.$with (MutableDocumentImpl.java:696)
  Unknown.with_$_0 (MutableDocumentProxy.java:114)
  Unknown.$clearInlineReplyAnchors (WaveletBasedConversationBlip.java:547)
  Unknown.$deleteThread_0 (WaveletBasedConversationBlip.java:416)
  Unknown.$deleteBlip_0 (WaveletBasedConversationThread.java:250)
  Unknown.$delete_1 (WaveletBasedConversationBlip.java:331)
  Unknown.$delete (ActionsImpl.java:129)
  Unknown.onMouseDown_3 (MenuController.java:76)
  Unknown.$dispatch_16 (EventDispatcherPanel.java:271)
  Unknown.dispatch_21 (EventDispatcherPanel.java:270)
  Unknown.$dispatch_14 (EventDispatcherPanel.java:175)
  Unknown.onMouseDown (EventDispatcherPanel.java:276)
  Unknown.dispatch_6 (MouseDownEvent.java:53)
  Unknown.$doFire (SimpleEventBus.java:204)
  Unknown.$fireEvent_0 (SimpleEventBus.java:103)
  Unknown.$fireEvent (HandlerManager.java:101)
  Unknown.$fireEvent_1 (Widget.java:103)
  Unknown.fireNativeEvent (DomEvent.java:116)
  Unknown.$onBrowserEvent (Widget.java:151)
  Unknown.onBrowserEvent (Widget.java:137)
  Unknown.dispatchEvent_1 (DOM.java:1264)
  Unknown.anonymous (DOMImplStandard.java:187)
  Unknown.entry0 (Impl.java:214)
  Unknown.anonymous (Impl.java:57)

Original issue reported on code.google.com by vega113 on 18 Apr 2011 at 7:45

GoogleCodeExporter commented 9 years ago
Michael, can you please take a look at this issue? 

Original comment by vega113 on 18 Apr 2011 at 7:47

GoogleCodeExporter commented 9 years ago
I found a way to reproduce this exception. It happens while trying to delete an 
inline blip while in edit mode.

Original comment by vega113 on 18 Apr 2011 at 9:46

GoogleCodeExporter commented 9 years ago
Yes, I was planning on fixing this this week.

You are correct that the bad state occurs when the blip being edited gets 
deleted.  Once that happens, any later attempt to restore focus to another blip 
will cause a shiny.

The problem is that EditSession needs to be notified if the blip being edited 
gets deleted, so it can terminate the edit session in a way that does not crash 
on deleted blips.  The simple approach of simply listening to the conversation 
model for an onBlipDeleted event of the being-edited blip will work 99% of the 
time, but it won't work for a compound deletion when the blip being edited is 
transitively contained by another object that gets deleted (thread, blip, or 
conversation), because the conversation model only broadcasts events for 
top-most objects of deleted parts.  To handle the compound case requires being 
able to examine the deleted object and traverse its contents, in order to see 
if the being-edited blip is in there, but structural information of deleted 
objects is not reliable due to how document XML deletion works.

An alternative approach is to have the view objects notify listeners if/when 
they get detached from the DOM.  Again, the transitive case needs to be solved 
for that approach.

In short, I think there is a fairly small, direct fix that will solve this 
issue except for the very rare cases of compound deletions, which may not be 
solvable quickly or nicely.  That may be good enough for a long time.

Original comment by hearn...@google.com on 18 Apr 2011 at 2:07

GoogleCodeExporter commented 9 years ago
will do thanks.

Original comment by michael.macfadden on 18 Apr 2011 at 2:17

GoogleCodeExporter commented 9 years ago
Has there been a fix on this issue.  I am trying to reproduce it and can't seem 
to get an exception.

Original comment by michael.macfadden on 23 Apr 2011 at 10:13

GoogleCodeExporter commented 9 years ago
Hmm, yep seems like it is gone. Maybe fix for issue 262 solved also this one?

Original comment by vega113 on 23 Apr 2011 at 10:35

GoogleCodeExporter commented 9 years ago

This bug is still easily reproducible:

1. Create a wave.
2. Click Reply on the root blip.
3. Click Delete on the newly created blip.

I'm pretty sure this bug occurs when the you're editing a blip in a reply 
thread that has no other siblings, and that reply thread gets deleted.  
However, I think my explanation above was way off - it doesn't match the stack 
trace, so I don't think the issue is related to edit sessions - it appears 
something to do with updating the internal structures that track the anchor 
doodads that are used to place threads inline inside the document content of 
their parent blip.

Original comment by hearn...@google.com on 2 May 2011 at 12:55

GoogleCodeExporter commented 9 years ago
Gah - sorry, I should have updated the corresponding JIRA issue.

Original comment by hearn...@google.com on 2 May 2011 at 12:57