Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 357663 - At (re)start the first tab is not restored
Summary: At (re)start the first tab is not restored
Status: CLOSED DUPLICATE of bug 334093
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.1   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.2 M3   Edit
Assignee: Remy Suen CLA
QA Contact: Remy Suen CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-14 13:34 EDT by Oliver Loch CLA
Modified: 2012-02-08 07:30 EST (History)
2 users (show)

See Also:


Attachments
Deltas.xml (753.04 KB, text/xml)
2011-09-14 13:35 EDT, Oliver Loch CLA
no flags Details
Screenshot showing the blank tab (54.28 KB, image/png)
2011-09-14 13:36 EDT, Oliver Loch CLA
no flags Details
Huge stacktrace from attempting to import a PHP project (105.11 KB, application/octet-stream)
2011-09-14 13:40 EDT, Brian de Alwis CLA
no flags Details
Stack trace from startup, with the blank editors (7.02 KB, application/octet-stream)
2011-09-14 13:52 EDT, Brian de Alwis CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Loch CLA 2011-09-14 13:34:35 EDT
Build Identifier: I20110620-1631

Hello,

as Brian requested here the bug report. 

Please find attached the deltas.xml file.

This is the IRC conversation that took place on freenode.net in #eclipse

===============SNIP=========8<============================

16:12 < grimeton> hi
16:13 < grimeton> i'm running 4.1 and everytime i restart eclipse it opens all tabs with source again but it never loads the data for the 
                  first tab, only for all others
16:13 < grimeton> i can't even make it load the source
16:14 < grimeton> i have to close the tab and then reopen the file again
16:15 -!- mind23 is now known as mind23_off
16:24 < briandealwis> grimeton: it's a known bug that's been fixed
16:24 < briandealwis> ...for 4.2
16:24 < myusuf3> is there a way to rename files in assembly plugin?
16:25 < briandealwis> myusuf3: dunno.  Try #maven
16:26 < grimeton> briandealwis: ah, thx
16:26 < briandealwis> grimeton: waitasec - this bug was supposed to have been fixed for 4.1 ~345745
16:26 < Arbalest> Bug 345745 - https://bugs.eclipse.org/bugs/show_bug.cgi?id=345745 - e4 / UI / unspecified - All / All - RESOLVED / FIXED 
                  / normal / - Assignee: remysuen - [Compatibility] Editors occasionally fail to persist state 
                  (org.eclipse.ui.internal.emptyEditorTab)
16:27 < briandealwis> Are you sure you're not running a milestone or an RC candidate for 4.1?
16:32 < grimeton> briandealwis: let me check
16:32 < grimeton> briandealwis: Build id: I20110620-1631 (version 4.1.0)
16:33 < briandealwis> grimeton: what platform are you on?
16:33 < grimeton> briandealwis: ox s lion
16:33 < grimeton> os x lion
16:34 < grimeton> i just ran the update checker, and it didn't find anything
16:35 < briandealwis> That's unfortunate.  I thought we'd managed to squash the avenues for this bug.
16:35 < briandealwis> grimeton: how often does this happen?
16:35 < grimeton> briandealwis: anything i can do / information i can provide?
16:35 < grimeton> briandealwis: everytime i restart eclipse
16:36 < briandealwis> And how do you quit Eclipse?
16:36 < grimeton> briandealwis: usually hitting cmd+q which is the same as selecting eclipse -> exit eclipse
16:36 < grimeton> it then stores the workspace and all files and exits
16:36 < grimeton> no error message or anything else
16:37 < briandealwis> grimeton: well it should be, but it's better to ask just in case
16:37 < briandealwis> And what Eclipse package did you download?
16:38 < grimeton> there was a hint on eclipse.org, something like "eclipse 4.1 packages are here"
16:38 < grimeton> let me check
16:39 < herlimenezes> hi, I am getting this error for xml files: Attribute "align" must be declared for element type "h1".
16:39 < herlimenezes> does anybody know what can i do to avoid it?
16:40 < herlimenezes> It seems to me as if eclipse does not recognize some html/xml tags...
16:40 < grimeton> briandealwis: http://download.eclipse.org/eclipse/downloads/drops4/R-4.1-201106201631/index.php
16:40 < briandealwis> herlimenezes: a shot in the dark, but what doctype are you specifying?
16:40 < briandealwis> grimeton: thanks - will try to reproduce
16:40 < grimeton> briandealwis: but i have to lie if you ask me if x32 or x64 version
16:41 < briandealwis> grimeton: was just about to ask that :)
16:42 < grimeton> briandealwis: any way to figure this out from inside eclipse?
16:42 < herlimenezes> html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN"
16:42 < briandealwis> grimeton:  you can check by looking at the system properties (About Eclipse > Installation Details > Configuration, 
                      and look for the line towards the top saying "-arch"
16:42 < herlimenezes> for example: it says that "Attribute "align" must be declared for element type "h1"....
16:43 < herlimenezes> that's weird I have never seen this...the html code is ok...
16:43 < grimeton> briandealwis: x86_64
16:43 < briandealwis> thanks grimeton
16:44 < briandealwis> herlimenezes: are you specifying a link to a DTD? maybe try just plain XHTML?
16:46 < briandealwis> e.g., <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
16:46 < briandealwis>    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
16:46 < briandealwis> ...on the off chance that it's the MathML that's throwing off the validation
16:46 < herlimenezes> briandealwis: yes, that is it!
16:48 < herlimenezes> that's weird...I am experiencing a strange behaviour with html files too...
16:48 < herlimenezes> I think there is something undefined, I have already seen preferences tab...but without any success
16:49 < herlimenezes> Files are processed...but there are errors marks...
16:58 < briandealwis> grimeton: could you try quitting by closing the Eclipse windows with the red "X" and see if that causes the problem?
16:59 < grimeton> briandealwis: just a sec
17:01 < grimeton> briandealwis: just tested cmd+q and red dot and eclipse -> exit - doesn't matter
17:02 < grimeton> briandealwis: if i click onto one of the tabs during startup it loads the source of all tabs including the first one
17:02 < briandealwis> huh
17:03 < grimeton> yeah just figured that out right now while testing
17:03 < nitind> herlimenezes: error marks saying what?
17:10 < briandealwis> grimeton: I'm unable to reproduce this.  I wonder if you could move aside the file in 
                      .../.metadata/.plugins/org.eclipse.e4.workbench/deltas.xml after you quit.  This will lose your workbench layout, but 
                      I wonder if there's something screwy in the layout
17:10 < rcjsuen> grimeton: In your tabs taht don't get restored properly, what do those editors say?
17:11 < grimeton> rcjsuen: nothing, just blank
17:11 < rcjsuen> That sounds diff from the bug Brian was seeing then.
17:11 < briandealwis> that's true
17:11 < briandealwis> good question
17:12 < briandealwis> grimeton: what type of files are you editing?
17:12 < grimeton> briandealwis: i had to rename my workspace a few weeks ago because eclipse crashed with that settings (but it was closed 
                  with that workspace without any errors)
17:12 < grimeton> briandealwis: php stuff
17:12 < grimeton> briandealwis: mounted via afp from any linux vm running inside virtual box
17:12 < grimeton> s/any/an
17:13 < grimeton> i will quit eclipse and then move the deltas.xml away and then restart it?
17:14 < briandealwis> Actually, if you wouldn't mind sending it to us, that would be useful.  Could you open a ~bug on Eclipse > Platform > 
                      UI and attach it there?
17:14 < Arbalest> Eclipse Bugzilla - Open new bugs and/or enhancement requests https://bugs.eclipse.org/bugs/enter_bug.cgi / Search for 
                  existing bugs and/or enhancement requests https://bugs.eclipse.org/bugs/query.cgi
17:14 < briandealwis> What PHP package are you using?
17:14 < grimeton> briandealwis: I'll try :)
17:14 < grimeton> briandealwis: ehm "the" php package?
17:15 < grimeton> this is how it looks: http://img196.imageshack.us/img196/6972/bildschirmfoto20110914u.png
17:15 < briandealwis> I don't do PHP, and I've seen PDT and Aptana thrown around
17:16 < grimeton> briandealwis: any hints on how to figure out the php "framework" i use?
17:16 < grimeton> i just installed it as an option via the "Install new software..." button
17:17 < rcjsuen> Eclipse > About > Installation Details
17:17 < rcjsuen> and see if you can find org.eclipse.pdt
17:18 < grimeton> it's pdt
17:18 < grimeton> but it's org.eclipse.php.core
17:19 < rcjsuen> so you open some php files, exit, restart, the first one is blank
17:19 < grimeton> yes
17:19 < grimeton> but it's inside a project
17:19 < rcjsuen> ok
17:19 < grimeton> not just a bunch of files
17:21 < rcjsuen> I'll start installing PDT and see if I can induce the same behaviour, although I'm on Windows.
17:23 < grimeton> is deltas.xml part of my workspace or part of the eclipse app package?
17:24 < briandealwis> grimeton: it's inside your workspace directory
17:25 < grimeton> briandealwis: is it carrying any sensitive information like passwords and stuff that i should take care of ?
17:25 < rcjsuen> grimeton: No.
17:25 < grimeton> ok
17:31 < briandealwis> rcjsuen: I'm getting a nasty looking exception trace on quit
17:31 < rcjsuen> proceed
17:32 < briandealwis> it's huge - I'm still scrolling to find the top :)  I'm copying it into a pastebin
17:32 < rcjsuen> grimeton: Please open a bug report.
17:33 < rcjsuen> grimeton: I see the same problem and will start investigating.
17:33 < rcjsuen> grimeton: https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Platform&component=UI&version=4.1


=========>8=====SNAP========================================

Thanks for the support!

KR,

Grimeton

Reproducible: Always

Steps to Reproduce:
1. Quit eclipse
2. Start eclipse
3. see first tab blank
Comment 1 Oliver Loch CLA 2011-09-14 13:35:42 EDT
Created attachment 203348 [details]
Deltas.xml

deltas.xml requested by Brian
Comment 2 Oliver Loch CLA 2011-09-14 13:36:26 EDT
Created attachment 203349 [details]
Screenshot showing the blank tab
Comment 3 Brian de Alwis CLA 2011-09-14 13:40:58 EDT
Created attachment 203351 [details]
Huge stacktrace from attempting to import a PHP project

Both Remy and I were able to reproduce this.  My instance produced a volumnous set of stack traces.
Comment 4 Brian de Alwis CLA 2011-09-14 13:52:12 EDT
Created attachment 203352 [details]
Stack trace from startup, with the blank editors

Sorry, previous attachment (203351) is the stack trace from importing and then quitting the Ecilpse instance.  This attachment is the stack trace from restarting Eclipse.
Comment 5 Remy Suen CLA 2011-09-14 13:53:07 EDT
(In reply to comment #3)
> Both Remy and I were able to reproduce this.  My instance produced a volumnous
> set of stack traces.

In my case I only got the error once. The root of the problem with the first PHP editor not restoring is this stack trace.

Caused by: java.lang.NullPointerException
    at
org.eclipse.jface.action.StatusLineManager$1.isCanceled(StatusLineManager.java:180)
    at
org.eclipse.php.internal.ui.editor.ASTProvider.getAST(ASTProvider.java:441)
    at
org.eclipse.php.ui.editor.SharedASTProvider.getAST(SharedASTProvider.java:143)
    at
org.eclipse.php.internal.ui.editor.PHPStructuredEditor.installOverrideIndicator(PHPStructuredEditor.java:3091)
    at
org.eclipse.php.internal.ui.editor.PHPStructuredEditor.doSetInput(PHPStructuredEditor.java:2350)
    at
org.eclipse.ui.texteditor.AbstractTextEditor$19.run(AbstractTextEditor.java:3200)
    at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:1566)
    at
org.eclipse.ui.texteditor.AbstractTextEditor.internalInit(AbstractTextEditor.java:3218)
    at
org.eclipse.ui.texteditor.AbstractTextEditor.init(AbstractTextEditor.java:3245)
    at
org.eclipse.wst.sse.ui.StructuredTextEditor.init(StructuredTextEditor.java:2595)
    at
org.eclipse.php.internal.ui.editor.PHPStructuredEditor.init(PHPStructuredEditor.java:1199)
    at
org.eclipse.ui.internal.EditorReference.initialize(EditorReference.java:323)
    at
org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:229)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at
org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
    ... 112 more
Comment 6 Remy Suen CLA 2011-09-15 13:00:26 EDT
We shouldn't use the status line as a progress manager if it hasn't even been created.

*** This bug has been marked as a duplicate of bug 334093 ***
Comment 7 Remy Suen CLA 2011-09-27 09:34:28 EDT
I've opened bug 359059 for the undefined context problem.
Comment 8 Missing name CLA 2012-02-08 07:30:34 EST
Just to confirm that this specific problem (blank or empty file tab at (re)start), was solved for me, after updating from 4.1.0 (201109....???) to 4.2.0 (I20120127-1145).
Thanks to the workforce responsible!! ;-)