#3288 OS X: opens files twice

normal bug
closed-duplicate
Evan Wright
6
2011-09-12
2009-07-09
Ken
No

When doubleclicking a file to open in Mac OS 10.4.11 Intel, 4.3pre17 opens the file twice in 2 windows superimposed. (4.3pre16 did not)

java.version=1.5.0_19
java.vm.version=1.5.0_19-138
java.runtime.version=1.5.0_19-b02-306

Discussion

  • Ken
    Ken
    2009-07-16

    • priority: 5 --> 6
     
  • Ken
    Ken
    2009-07-16

    More info: on Mac OS 10.4.11 Intel, 4.3pre17 responds to the OS file-open with 2, 4, 6, or 8 windows, all stacked perfectly on top of eachother, in some even combination of the target file and blanks. Can't take it any more, reverting to 4.3pre16 (if I can still find it).

     
  • Ken
    Ken
    2009-07-20

    Whatever 4.3pre17 broke on my Mac appears to be permanent. I tried reverting to a 4.3pre16 I found by hacking the URL to 4.3pre17, and after discovering I had to move ~/Library/jEdit back to ~/.jedit, double-clicking a file opened 40 (fourty) copies. I tried to clean-reinstall 4.3pre16, deleting ~/.jedt and ~/Library/Preferences/org.jedit*, but 4.3pre16 then exhibited the same new-to-4.3pre17 behavior of opening random even combinations of file copies and blanks. Out of ideas, giving up.

     
  • Can you attach a screenshot with the file opened multiple times? I don't understand what it means "stacked on top of each other".

     
  • Ken
    Ken
    2009-07-21

    A screenshot won't tell you anything. Imagine looking down on a stacked deck of cards -- all you can see is one card. But moving that card out of the way reveals another card underneath. And so on. In this case, an even number of cards (windows), each containing either the contents of the doublecliked file or nothing.

     
  • Ok, I get it. In order to know if it's a problem with jEdit itself, and not some plugin, I suggest you try to configure the double-click to run jEdit with "-noplugins" and see if you get the same behavior.
    When you exit jEdit, it saves the current layout (the windows that are open) in a file named perspective.xml, and then the next time it starts, it restores the layout from that file. It sounds to me as if two more windows seem to be added each time you double-click. For the n'th double-click, you get (n-1)*2 windows loaded from the perspective.xml, and 2 new windows from the double click itself.
    Can you check the number of <VIEW> elements in perspective.xml after you exit? (This file is located in the jEdit settings directory)

     
  • Ken
    Ken
    2009-07-21

    That was an interesting experiment. I did a fresh install of 4.3pre17. I run it directly to create a fresh jEdit directory and turn off the splash and tooltip windows. I open perspective.xml in another editor to show changes dynamically. Perspective has no entries. I doubleclick a file test.txt. No change, but I can tell from the darker shadow that there are multiple windows. I quit jEdit; perspective gets 2 test.txt entries. I doubleclick test.txt, see a darker shadow, and quit jEdit. Now there are 4 test.txt entries. I doubleclick test.txt, see an even darker shadow, and quit jEdit. Now there are 6 test.txt entries and 2 Untitled entries. I doubleclick test.txt, but instead of quitting jEdit, I close each of the now 16 test.txt and Untitled windows individually using each window's closebox. (Interesting -- jEdit has no close-window command...) When no windows are left, I quit jEdit. All perspective entries disappear.

    When perspective.xml is empty and I doubleclick test.txt, sometimes I get no windows, sometimes I get one window, and sometimes I get two windows, and sometimes one or both windows is blank (Untitled).

    Then I tried adding -noplugins to the arguments in Info.plist:

    <key>Arguments</key>
    <string>-background -noplugins</string>

    Now every time I doubleclick test.txt, I do get only one window (which is good) but it is always blank (which is not so much).

     
  • I can't get a full picture of what's going on with your description, but:

    - It seems like the problem is not in jEdit but rather some plugin (most probably the Mac OS X one, whose purpose is to make jEdit behave like Mac users are used to). The reason you get a single untitled buffer with "-noplugins" seems to be caused by incorrect command-line, perhaps the "-noplugins" comes at the end and masks out the filename argument. Can you somehow arrange for "-noplugins" to be the first argument to jEdit?

    - Can you attach perspective.xml to this item once you get multiple (4 or more) windows open? You wrote that you get 2 or more test.txt entries - did you refer to multiple <VIEW> elements, or entries at the top of the file, before the <VIEW> element?

     
  • Seph Soliman
    Seph Soliman
    2009-07-21

    Ken, I would suggest you check if you have both the MacOS and the MacOSX plugins installed. If they are both trying to handle file-open events, this would explain it.

    Regards
    Seph

     
  • Ken
    Ken
    2009-07-21

    Hi Seph, it does not show a MacOS plugin. It shows 3 plugins: Latest Version Check, Mac OS X Support, and QuickNotepad.

    Shlomy, I do not know how/where the command line is constructed. Attached will be perspective.xml after opening test.txt and quitting jEdit 3 times.

     
  • Ken
    Ken
    2009-07-21

    perspective.xml after doubleclicking test.txt and quitting jEdit 3 times

     
    Attachments
  • Ok, so each double-click causes 2 new views to open. One more thing I'd ask you to do is, get rid of perspective.xml, just double-click the file once, so you get two views. then, exit jEdit and attach the file "activity.log", which is also in the jEdit settings directory. I'm expecting to see two different invocations of jEdit to add two files.

     
  • Ken
    Ken
    2009-07-21

    Now I can see that If there are 0 entries in perspective.xml, jEdit will open 1 window; if there is 1 entry it will open 2, if there are 2 it will open 4, etc. This seems separate from the issue of sometimes opening blank. So now I will attach the activity log of 2 open-test.txt-quit cycles after clearing.

    I cannot seem to get a blank window when there is just 1; blanks seem only to occur when multiple windows are being opened. And then that gets them into perspective.xml, and then that gets them into the replication cycle.

     
  • Ken
    Ken
    2009-07-21

    after clearing and 2 cycles of doubleclicking test.txt and quitting

     
    Attachments
  • I can see in the activity log that the perspective is loaded twice in a short period of time. It seems to be done by the MacOSX plugin. Can you try to run without this plugin and see if you reproduce the problem?
    If it's a plugin problem, someone else will have to handle this, as I am not a mac user and not familiar with the mac plugin.

     
  • Ken
    Ken
    2009-07-21

    I removed the Mac OS X Support plugin. Now it does not create perspective.xml and does not open multiple windows, but the window it opens is always blank. Will attach new activity log.

     
  • Ken
    Ken
    2009-07-21

    doubleclicking test.txt and quitting twice (maybe more) with Mac OS X Plugin removed

     
    Attachments
  • Evan Wright
    Evan Wright
    2011-09-12

    This is a duplicate (actually vice versa) of Bug #3034220, which has been fixed in the trunk and in 4.4.x. Perhaps the fix should be merged to 4.3 as well?

     
  • Evan Wright
    Evan Wright
    2011-09-12

    • assigned_to: nobody --> evanpw
    • status: open --> closed-duplicate