Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 318695

Summary: Eclipse hangs when opening .confluence file
Product: z_Archived Reporter: Nathan Sowatskey <nsowatsk>
Component: MylynAssignee: David Green <greensopinion>
Status: RESOLVED FIXED QA Contact:
Severity: blocker    
Priority: P2 CC: nsowatsk
Version: unspecified   
Target Milestone: 1.4.0   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
Example of file that causes Eclipse/WikiText editor to hang.
none
Stack trace from bug reporter after force quit.
none
mylyn/context/zip none

Description Nathan Sowatskey CLA 2010-07-02 07:03:46 EDT
Build Identifier: 20100617-1415

1 - Open .confluence file with WikiText editor.
2 - Eclipse hangs.

  Mylyn WikiText	1.3.0.v20100608-0100-e3x	org.eclipse.mylyn.wikitext_feature.feature.group
  Mylyn WikiText SDK	1.3.0.v20100608-0100-e3x	org.eclipse.mylyn.wikitext.sdk.feature.group

Reproducible: Always

Steps to Reproduce:
1 - Open .confluence file with WikiText editor.
2 - Eclipse hangs.
Comment 1 David Green CLA 2010-07-05 19:46:18 EDT
Thanks for the bug.  Can you attach the problematic file?
Comment 2 Nathan Sowatskey CLA 2010-07-16 08:08:59 EDT
*** Bug 320094 has been marked as a duplicate of this bug. ***
Comment 3 Nathan Sowatskey CLA 2010-07-16 08:18:52 EDT
Created attachment 174486 [details]
Example of file that causes Eclipse/WikiText editor to hang.
Comment 4 Nathan Sowatskey CLA 2010-07-16 08:20:44 EDT
Apologies for the delay in getting back to you.

I am not receiving any notifications for this bug, so it took me a while to find it again.

I have attached an example file.

I shall also get a stack trace from the bug reporter after I force quite Eclipse.

Regards

Nathan
Comment 5 Nathan Sowatskey CLA 2010-07-16 08:22:55 EDT
Created attachment 174487 [details]
Stack trace from bug reporter after force quit.
Comment 6 David Green CLA 2010-07-22 13:37:45 EDT
Great, I'll look into this.
Comment 7 David Green CLA 2010-07-22 13:48:13 EDT
there appears to be a bug in how WikiText is parsing the markup:


Stack trace: 
java.util.regex.Matcher.<init>(Unknown Source)
java.util.regex.Pattern.matcher(Unknown Source)
org.eclipse.mylyn.internal.wikitext.confluence.core.block.AbstractConfluenceDelimitedBlock.canStart(AbstractConfluenceDelimitedBlock.java:89)
org.eclipse.mylyn.wikitext.core.parser.markup.MarkupLanguage.startBlock(MarkupLanguage.java:248)
org.eclipse.mylyn.wikitext.core.parser.markup.MarkupLanguage.processContent(MarkupLanguage.java:166)
org.eclipse.mylyn.wikitext.core.parser.MarkupParser.parse(MarkupParser.java:92)
org.eclipse.mylyn.wikitext.core.parser.MarkupParser.parse(MarkupParser.java:82)
org.eclipse.mylyn.internal.wikitext.ui.editor.syntax.FastMarkupPartitioner$PartitionTokenScanner.computeOlp(FastMarkupPartitioner.java:171)
org.eclipse.mylyn.internal.wikitext.ui.editor.syntax.FastMarkupPartitioner$PartitionTokenScanner.setPartialRange(FastMarkupPartitioner.java:133)
org.eclipse.mylyn.internal.wikitext.ui.editor.syntax.FastMarkupPartitioner$PartitionTokenScanner.setRange(FastMarkupPartitioner.java:222)
org.eclipse.jface.text.rules.FastPartitioner.initialize(FastPartitioner.java:163)
org.eclipse.mylyn.internal.wikitext.ui.editor.syntax.FastMarkupPartitioner.resetPartitions(FastMarkupPartitioner.java:75)
org.eclipse.mylyn.internal.wikitext.ui.editor.syntax.FastMarkupPartitioner.setMarkupLanguage(FastMarkupPartitioner.java:65)
org.eclipse.mylyn.internal.wikitext.ui.editor.MarkupEditor.setMarkupLanguage(MarkupEditor.java:999)
org.eclipse.mylyn.internal.wikitext.ui.editor.MarkupEditor.initializeMarkupLanguage(MarkupEditor.java:986)
org.eclipse.mylyn.internal.wikitext.ui.editor.MarkupEditor.doSetInput(MarkupEditor.java:470)
org.eclipse.ui.texteditor.AbstractTextEditor$19.run(AbstractTextEditor.java:3037)
org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:759)
org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:756)
org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2600)
org.eclipse.ui.texteditor.AbstractTextEditor.internalInit(AbstractTextEditor.java:3055)
org.eclipse.ui.texteditor.AbstractTextEditor.init(AbstractTextEditor.java:3082)
org.eclipse.mylyn.internal.wikitext.ui.editor.MarkupEditor.init(MarkupEditor.java:965)
org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:798)
org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:647)
org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
Comment 8 David Green CLA 2010-07-23 21:47:34 EDT
Fixed in CVS.

As a workaround in your document before you get a new build of WikiText, remove the leading '%' character before the {toc}.
Comment 9 David Green CLA 2010-07-23 21:47:42 EDT
Created attachment 175122 [details]
mylyn/context/zip