UIMA
  1. UIMA
  2. UIMA-2528

Open CAS Editor blocks eclipse start

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0TextMarker, 2.1.0ruta
    • Fix Version/s: 2.1.0ruta
    • Component/s: ruta
    • Labels:
      None

      Description

      I often observe that my Eclipse does not start, if the workspace was left with an open CAS Editor. This happens when I run an Eclipse application from a workspace with the CAS Editor and Ruta bundles. In order to get a working Eclipse, I have to deactivate the CAS Editor bundles, open the Eclipse, close the editors, close the Eclipse, and then activate the CAS Editor bundles again.

      1. jstack_ouput.txt
        22 kB
        Peter Klügl

        Activity

        Peter Klügl created issue -
        Hide
        Peter Klügl added a comment -

        jstack ouput

        Show
        Peter Klügl added a comment - jstack ouput
        Peter Klügl made changes -
        Field Original Value New Value
        Attachment jstack_ouput.txt [ 12561274 ]
        Hide
        Peter Klügl added a comment -

        The problem can also be fixed when I deactivate the ide plugin of the TextMarker Workbench.

        Show
        Peter Klügl added a comment - The problem can also be fixed when I deactivate the ide plugin of the TextMarker Workbench.
        Peter Klügl made changes -
        Affects Version/s 2.0.0TextMarker [ 12323872 ]
        Hide
        Joern Kottmann added a comment -

        In the stack trace the DLTK Indexing thread tries to call Display.syncExec which blocks until the UI thread can process it, but the UI thread is blocked by the DLTK Indexing thread. Looks like a dead lock to me. I am not sure why these two threads dead lock, but it probably depends on the timing. Maybe the presence of the Cas Editor just changes the timing a bit during startup?

        Show
        Joern Kottmann added a comment - In the stack trace the DLTK Indexing thread tries to call Display.syncExec which blocks until the UI thread can process it, but the UI thread is blocked by the DLTK Indexing thread. Looks like a dead lock to me. I am not sure why these two threads dead lock, but it probably depends on the timing. Maybe the presence of the Cas Editor just changes the timing a bit during startup?
        Hide
        Peter Klügl added a comment -

        Hmm, I fear I cannot influence DLTK to do something differently and I see yet nothing that the CAS Editor could do better. Maybe I get an idea with some further profiling. And there is also the possibility to ask the DLTK community for advice...

        A hotfix could be that the TextMarker tries to close all CAS Editors just before Eclipse is closed.

        Show
        Peter Klügl added a comment - Hmm, I fear I cannot influence DLTK to do something differently and I see yet nothing that the CAS Editor could do better. Maybe I get an idea with some further profiling. And there is also the possibility to ask the DLTK community for advice... A hotfix could be that the TextMarker tries to close all CAS Editors just before Eclipse is closed.
        Peter Klügl made changes -
        Fix Version/s 2.0.0TextMarker [ 12323872 ]
        Hide
        Peter Klügl added a comment -
        Show
        Peter Klügl added a comment - A link for the hotfix: http://wiki.eclipse.org/FAQ_Close_All_Editors_On_Shutdown
        Peter Klügl made changes -
        Fix Version/s 2.0.1TextMarker [ 12324120 ]
        Fix Version/s 2.0.0TextMarker [ 12323872 ]
        Peter Klügl made changes -
        Fix Version/s 2.0.2ruta [ 12324396 ]
        Fix Version/s 2.0.1ruta [ 12324120 ]
        Peter Klügl made changes -
        Description I often observe that my Eclipse does not start, if the workspace was left with an open CAS Editor. This happens when I run an Eclipse application from a workspace with the CAS Editor and TextMarker bundles. In order to get a working Eclipse, I have to deactivate the CAS Editor bundles, open the Eclipse, close the editors, close the Eclipse, and then activate the CAS Editor bundles again. I often observe that my Eclipse does not start, if the workspace was left with an open CAS Editor. This happens when I run an Eclipse application from a workspace with the CAS Editor and Ruta bundles. In order to get a working Eclipse, I have to deactivate the CAS Editor bundles, open the Eclipse, close the editors, close the Eclipse, and then activate the CAS Editor bundles again.
        Hide
        Marshall Schor added a comment -

        Since restarting Eclipse with the editors in the same state as they were is useful to users, I hope some other fix can be found. Has anyone asked about this in the DLTK community about this?

        Show
        Marshall Schor added a comment - Since restarting Eclipse with the editors in the same state as they were is useful to users, I hope some other fix can be found. Has anyone asked about this in the DLTK community about this?
        Hide
        Peter Klügl added a comment -

        Nope, I haven't yet, but I will ask them.

        Show
        Peter Klügl added a comment - Nope, I haven't yet, but I will ask them.
        Hide
        Peter Klügl added a comment -

        Summary of the conversation on dltk-dev with Alexey Panchenko:

        DLTK indexing thread should not execute UI code at all, that's the problem.

        Could you check that UI and non-UI code is properly separated?
        I can give a look at the sources if you provide the link.

        ...

        It looks like all the code is contained in the single plugin project.
        You'd better split the code into UI and non-UI projects, it's the most reliable way of solving this issue.

        ...

        Right. If modularized correctly, then it's physically not possible

        What happens in this particular case: indexer is in the dltk.core (non-UI) and is started earlier. It tries to read some preferences, which are supposed to be in the core part of your IDE. Unfortunately, there is only one module, which includes UI, so deadlock happens.

        There could be other similar cases.

        Show
        Peter Klügl added a comment - Summary of the conversation on dltk-dev with Alexey Panchenko: DLTK indexing thread should not execute UI code at all, that's the problem. Could you check that UI and non-UI code is properly separated? I can give a look at the sources if you provide the link. ... It looks like all the code is contained in the single plugin project. You'd better split the code into UI and non-UI projects, it's the most reliable way of solving this issue. ... Right. If modularized correctly, then it's physically not possible What happens in this particular case: indexer is in the dltk.core (non-UI) and is started earlier. It tries to read some preferences, which are supposed to be in the core part of your IDE. Unfortunately, there is only one module, which includes UI, so deadlock happens. There could be other similar cases.
        Hide
        Peter Klügl added a comment -

        When I contributed the old system to uima, there have been about six ide plugins. Are there any objections if I separate them again? I would start with ruta-ep-ide-core and ruta-ep-ide-ui.

        Show
        Peter Klügl added a comment - When I contributed the old system to uima, there have been about six ide plugins. Are there any objections if I separate them again? I would start with ruta-ep-ide-core and ruta-ep-ide-ui.
        Hide
        Marshall Schor added a comment -

        no objections from me...

        Show
        Marshall Schor added a comment - no objections from me...
        Peter Klügl made changes -
        Affects Version/s 2.0.2ruta [ 12324396 ]
        Affects Version/s 2.4.0SDK [ 12315996 ]
        Peter Klügl made changes -
        Component/s CasEditor [ 12312008 ]
        Hide
        Peter Klügl added a comment -

        Separation was performed in UIMA-3077. There is no deadlock anymore, but other functionality can cause problems when the CAS Editor is open (how can that cause so much differences in the startup???), e.g., if the (dummy) interpreter install is damaged, then the automatic reconfig may not work. I think that is so unlikely that it does not need a quick fix.

        Show
        Peter Klügl added a comment - Separation was performed in UIMA-3077 . There is no deadlock anymore, but other functionality can cause problems when the CAS Editor is open (how can that cause so much differences in the startup???), e.g., if the (dummy) interpreter install is damaged, then the automatic reconfig may not work. I think that is so unlikely that it does not need a quick fix.
        Hide
        Peter Klügl added a comment -

        fixed by UIMA-3077

        Show
        Peter Klügl added a comment - fixed by UIMA-3077
        Peter Klügl made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Peter Klügl [ pkluegl ]
        Resolution Fixed [ 1 ]
        Peter Klügl made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Peter Klügl
            Reporter:
            Peter Klügl
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development