Results 1 to 6 of 6
  1. #1
    freqrush is offline Member
    Join Date
    Jan 2009
    Location
    Belgium
    Posts
    20
    Rep Power
    0

    Default help debugging: exception in thread "AWT-EventQueue-0" java.lang.NullPointerException

    I get these errors in Netbeans when running JSynthLib:
    Does it mean there's something wrong with my java installation or is the problem with JSynthLib ?

    Some info about how to read/solve these errors is welcome too.

    Thanks in advance

    Java Code:
    init:
    deps-jar:
    Compiling 5 source files to /home/peter/NetBeansProjects/JSynthLib/build/classes
    Copying 10 files to /home/peter/NetBeansProjects/JSynthLib/build/classes
    compile:
    java.lang.ArrayIndexOutOfBoundsException: 3
            at core.MidiUtil.setSysexInputQueue(MidiUtil.java:367)
            at core.Device.setInPort(Device.java:326)
            at core.Device.setup(Device.java:117)
            at core.AppConfig.addDevice(AppConfig.java:351)
            at core.AppConfig.loadPrefs(AppConfig.java:49)
            at core.PatchEdit.<init>(PatchEdit.java:40)
            at JSynthLib.main(JSynthLib.java:33)
    Exception in thread "main" java.lang.NullPointerException
            at core.JSLDesktop$JSLFakeDesktop.getSelectedWindow(JSLDesktop.java:386)
            at core.JSLDesktop.getSelectedWindow(JSLDesktop.java:147)
            at core.PatchEdit.getInstance(PatchEdit.java:125)
            at core.ErrorMsg.reportError(ErrorMsg.java:59)
            at core.PatchEdit.<init>(PatchEdit.java:74)
            at JSynthLib.main(JSynthLib.java:33)
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
            at core.PatchEdit.showPrefsDialog(PatchEdit.java:114)
            at core.Actions$PrefsAction.actionPerformed(Actions.java:1340)
            at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2012)
            at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2335)
            at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:404)
            at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
            at javax.swing.AbstractButton.doClick(AbstractButton.java:374)
            at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1688)
            at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1732)
            at java.awt.Component.processMouseEvent(Component.java:6108)
            at javax.swing.JComponent.processMouseEvent(JComponent.java:3276)
            at java.awt.Component.processEvent(Component.java:5873)
            at java.awt.Container.processEvent(Container.java:2105)
            at java.awt.Component.dispatchEventImpl(Component.java:4469)
            at java.awt.Container.dispatchEventImpl(Container.java:2163)
            at java.awt.Component.dispatchEvent(Component.java:4295)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4461)
            at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4125)
            at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4055)
            at java.awt.Container.dispatchEventImpl(Container.java:2149)
            at java.awt.Window.dispatchEventImpl(Window.java:2478)
            at java.awt.Component.dispatchEvent(Component.java:4295)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:604)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)

  2. #2
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    8

    Default

    Either something wrong with JSynthLib (whatever that is) or you did not follow all the JSynthLib setup/usage instruction steps.

  3. #3
    freqrush is offline Member
    Join Date
    Jan 2009
    Location
    Belgium
    Posts
    20
    Rep Power
    0

    Default

    Thanks for the reply,
    JSynthLib is an open source project that wants to support editing hardware synthesizers from the computer.
    But I have to write a driver for it to support my synthesizer. That's why I need to learn Java.

    Is there any meaning in the order of the messages ?

    I see core.PatchEdit always comes up as one of the last 'at ...' problems, but with the last exception, it shows up first.

    Where do I have to look ? What do these error messages say ?

  4. #4
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    8

    Default

    If you don't understand the meanings of ArrayIndexOutOfBoundsException and NullPointerException then you probably need to start by reading Sun's Java tutorial.

  5. #5
    freqrush is offline Member
    Join Date
    Jan 2009
    Location
    Belgium
    Posts
    20
    Rep Power
    0

    Default

    Do you mean
    1. that every time a programmer reads such errors, he goes to the sun's java tutorial and reads the whole tutorial again ?

    2. Or does he go to each file that comes up after "at " and look for mistakes at the line number indicated between ()'s?

    3. Or does he first check the first file, try to find the mistake there, and if he found the mistake and fixed it, the other files don't have to be changed anymore because all the files depended on that one error to be fixed?

    I just have to read so much currently that I'm loosing my orientation, so, sorry for the lazy questions :p

  6. #6
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    8

    Default

    Quote Originally Posted by freqrush View Post
    Do you mean
    1. that every time a programmer reads such errors, he goes to the sun's java tutorial and reads the whole tutorial again ?
    No I did not say that. If you you don't understand what those exceptions are then chances are you have not read the Java tutorial. There is no point in trying to write programs in Java before reading the tutorial.
    Quote Originally Posted by freqrush View Post
    2. Or does he go to each file that comes up after "at " and look for mistakes at the line number indicated between ()'s?

    3. Or does he first check the first file, try to find the mistake there, and if he found the mistake and fixed it, the other files don't have to be changed anymore because all the files depended on that one error to be fixed?

    I just have to read so much currently that I'm loosing my orientation, so, sorry for the lazy questions :p
    If the lines come from your code you can look at those lines in your code and try to fix them. You said it's not your code so either something is wrong with JSynthLib (whatever that is) or you did not follow all the JSynthLib setup/usage instruction steps.

Similar Threads

  1. Replies: 6
    Last Post: 08-03-2009, 08:58 PM
  2. Replies: 4
    Last Post: 06-07-2009, 12:59 AM
  3. Replies: 10
    Last Post: 01-29-2009, 08:00 AM
  4. Replies: 12
    Last Post: 10-05-2008, 06:52 AM
  5. Replies: 3
    Last Post: 01-29-2008, 01:37 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •