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

#178 macro execution of empty register gives exception, eg: @r

Major
closed-fixed
nobody
None
3
2014-12-19
2013-08-12
No

I wanted to create a macro which inserts three tabs and put this:
qt>>>>>>q

Then I typed this in other line of file: @t. And a java.lang.NullPointerException exception has occurred.

Stack trace from logs:
SEVERE [com.raelity.jvi.core.Normal]
java.lang.NullPointerException
at com.raelity.jvi.core.Misc.do_execreg(Misc.java:1641)
at com.raelity.jvi.core.Normal.nv_at(Normal.java:4473)
at com.raelity.jvi.core.Normal.normal_cmd(Normal.java:570)
[catch] at com.raelity.jvi.core.Normal.processInputChar(Normal.java:172)
at com.raelity.jvi.core.GetChar.pumpChar(GetChar.java:360)
at com.raelity.jvi.core.GetChar.pumpAllChars(GetChar.java:323)
at com.raelity.jvi.core.GetChar.startPump(GetChar.java:263)
at com.raelity.jvi.core.GetChar.gotc(GetChar.java:135)
at com.raelity.jvi.core.Hook.gotc(Hook.java:88)
at com.raelity.jvi.manager.Scheduler.keyStroke(Scheduler.java:219)
at com.raelity.jvi.swing.SwingFactory$EnqueCharAction.actionPerformed(SwingFactory.java:618)
at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1661)
at javax.swing.JComponent.processKeyBinding(JComponent.java:2870)
at javax.swing.JComponent.processKeyBindings(JComponent.java:2917)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2833)
at java.awt.Component.processEvent(Component.java:6282)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4861)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1895)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:762)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1027)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:899)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:727)
at java.awt.Component.dispatchEventImpl(Component.java:4731)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:708)
at java.awt.EventQueue$4.run(EventQueue.java:706)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

Discussion

  • Evgeniy Veretennikov

    jVi 1.4.8, NB 7.3.1, Kubuntu 12.04

     
  • Ernie Rael

    Ernie Rael - 2013-08-12

    I can not reproduce this. It works for me. I doubt that OS matters. It may be related to some jVi option setting. Did the macro get recorded correctly? If you do "tp to see the contents of the named buffer "t", do you get what you expected?

    I just tried this on a test install with all the default jVi settings, it also works as expected.

    jVi 1.4.8

    Product Version: NetBeans IDE 7.3 (Build 201306052037)
    Updates: NetBeans IDE is updated to version NetBeans 7.3 Patch 2
    Java: 1.6.0_23; Java HotSpot(TM) Client VM 19.0-b09
    Runtime: Java(TM) SE Runtime Environment 1.6.0_23-b05
    System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)

     
  • Ernie Rael

    Ernie Rael - 2013-08-12

    If I do @p and register p is empty (never set) then I see the exception. I'll change the title.

     
  • Ernie Rael

    Ernie Rael - 2013-08-12
    • summary: A java.lang.NullPointerException exception has occurred. --> macro execution of empty register gives exception, eg: @r
    • Priority: 5 --> 3
     
  • Ernie Rael

    Ernie Rael - 2013-08-13
    • status: open --> open-fixed
     
  • Ernie Rael

    Ernie Rael - 2013-08-13

    Fixed in mercurial. Available next release.

     
  • Evgeniy Veretennikov

    Sorry, I missed your questions and didn't answer. May be problem was with bad recording of command, because I also can't reproduce this bug. But I reproduced it a week ago when reported bug. So, if I'll see this behaviour again I'll tell you.

    Anyway, thanks for fixing!

     
  • Ernie Rael

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

Log in to post a comment.