Migrate from GitHub to SourceForge with this tool. Check out all of SourceForge's recent improvements.
Close

#182 JRE 8 breaks command and search entry

Major
closed-fixed
None
3
2014-12-19
2014-09-01
elle_r
No

Updated to JDK 8 (1.8.0_20-b2) from JDK 7 and now the command and search popup doesn't do anything on pressing enter. Namely no commands or searches are run and the popup stays open until escape is pressed.

Tested jVi 1.5.2 on NetBeans 8 Patch 2 and jVi 1.5.1 on NetBeans 7.4. Both exhibit this behavior on OS X 10.9.4.

Commands and search are pretty critical to day to day so I hope we can get this fixed soon. Let me know if there are any logs you would like to help resolve this issue.

Thanks for the awesome plugin.

Discussion

  • Ernie Rael

    Ernie Rael - 2014-09-01

    You can try toggling Menu>Tools>Options>jViConfig>Platform>UseModalFrame; this requires a restart.

    Did you check the log for any exceptions or other anomolies? Characters displayed OK? Does backspace work and close the popup when text field empty?

    Probably a MAC/OSX issue, over the years there have been occasional problems with command/search especially on the MAC.

     
    • elle_r

      elle_r - 2014-09-02

      I tried using the modal frame option and restarting NetBeans to test, but I didn't see any difference in behavior.

      Backspacing away all the text with the popup open does close the popup though. Characters also look about right and the searching for text does highlight text as well, but since the user can't press enter, the search has to be discarded with an ESC.

      I don't see anything logged in the jVi output pane. In messages.log after turning up some jVi debug options:

      Highlight Factory:
      SEARCH_RESULTS_JVI-1-3 getHighlights: 3623,3671
      SEARCH_RESULTS_JVI-1-3 seq:
      VISUAL_SELECT_JVI-1-4 getHighlights: 3623,3671
      VISUAL_SELECT_JVI-1-4 seq:
      AUTO_QUERY_TYPES: EditAlternate: 'w' "w"(0)
      AUTO_QUERY_TYPES: CommandName 'w'
      CommandAction: 'w'
      SEARCH_RESULTS_JVI-1-3 getHighlights: 1811,4739
      SEARCH_RESULTS_JVI-1-3 seq:

      The log above is from pressing ":w". After escaping a bunch of SEARCH_RESULTS... lines appeared.

      Let me know if there are any additional steps I can take. Thanks.

       
  • Ernie Rael

    Ernie Rael - 2014-09-03

    The code that handles the special actions is in CommandLine.java (in com.raelity.jvi.swing). The methods setKeymap(), which uses getBindings() and getActions(), adds a keymap to the textComponent in the combo box. With this, VK_ENTER is bound and when enter is pressed should invoke fireCommandLineActionPerformed(e01) which bounces through a listener to finishUpEntry() which calls fireEvent().

    The first thing to determine for your problem is whether or not fireEvent() gets invoked.

    Can you debug jVi and determine this? A breakpoint at fireEvent should do the trick. There are brief instructions in README files at the top level of the checked out code.

     
  • Ernie Rael

    Ernie Rael - 2014-09-03
    • summary: JRE 8 breaks command and search entry --> JRE 8 on OSX breaks command and search entry
     
  • Ernie Rael

    Ernie Rael - 2014-09-03

    I forgot to mention. There's a standalone debug jVi (not embedded in NetBeans). Since the CommandLine code is part of core jVi, you should be able to reproduce and debug the problem with this plain old java app. This is much simpler and faster than debugging NB under NB.

     
  • Rob Ratcliff

    Rob Ratcliff - 2014-09-04

    FYI: I saw this on Windows 8.1 after I upgraded to Java 1.8.0_20 as well. If I switched to Java 7 the problem went away.

     
  • Ernie Rael

    Ernie Rael - 2014-09-04
    • summary: JRE 8 on OSX breaks command and search entry --> JRE 8 breaks command and search entry
     
  • Ernie Rael

    Ernie Rael - 2014-09-04

    Crap. And thanks. I'm downloading the latest 1.8, running windows 7. I'll give it a try.

    (I hadn't heard of any 1.8 issues, but that was then...)

     
  • johnride

    johnride - 2014-09-05

    I can confirm that on Linux. With jdk8-openjdk package on archlinux I can't exit the prompt other than pressing escape.

     
  • Ernie Rael

    Ernie Rael - 2014-09-06

    To make a long story short (very long...)
    In jdk 8, JComboBox::actionPerformed has a few lines added at the top

    ComboBoxEditor editor = getEditor();
    if ((editor != null) && (e != null) && (editor == e.getSource())) {

    editor is a ComboBoxEditor and e.getSource() is a JTextField; because of this, in my action listener, the following is never true

    if("comboBoxEdited".equals(e.getActionCommand()))

    I have a filed a bug report against the jdk (I'm not holding my breath).

    I've got a workaround that seems to work. The sad part is that if they fix the bug, my workaround might fail. If the new lines of code are deleted, then there'd be no problem. But I can imagine some fixes where ...

     
  • Ernie Rael

    Ernie Rael - 2014-09-06
    • status: open --> open-fixed
     
  • Ernie Rael

    Ernie Rael - 2014-09-06

    nbvi-1.5.3 available.

     
  • elle_r

    elle_r - 2014-09-07

    Verfied on OS X 10.9.4 with JDK 1.8.0_20-b26 on NetBeans 8.0 (Build 201403101706) [Patch 2].

    Thanks for the fix and the fast turnaround.

     
  • Rob Ratcliff

    Rob Ratcliff - 2014-09-08

    Works great now! Thanks for your hard work and allowing me the pleasure of coding using my favorite editor!

     
  • Ernie Rael

    Ernie Rael - 2014-12-19
    • Status: open-fixed --> closed-fixed
     

Log in to post a comment.