#5 NullPointerException when .syx file is not found


I got a NullPointerException as I tried to open the
RolandTD6 editor because the "newpatch.syx" file was
not found.

Steps to reproduce:

Rename the file "newpatch.syx" in "synthdrivers/RolandTD6".

Then open the RolandTD6 editor in JSynthLib and create
a new patch.

Actual result:

NullPointerException is thrown and no hint is given
that the file "newpatch.syx" is needed but not found.

Expected result:

A FileNotFoundException should be thrown instead of the
NullPointerException with a hint that the file is missing.


  • Joachim Backhaus

    • status: open --> closed
  • Joachim Backhaus

    Logged In: YES


  • Joachim Backhaus

    • status: closed --> closed-fixed
  • Hiroo Hayashi

    Hiroo Hayashi - 2005-02-01

    Logged In: YES

    First, thank you for your fix.

    If you think this is a 'visible to users' bug, pop-up error
    dialog instead of throwing exception. Or change the

    First I thought your fix was well-considered, but I've started
    thinking it may be better to use ErrorMsg.reportError(),
    because a user may want to replace default .syx file.

  • Hiroo Hayashi

    Hiroo Hayashi - 2005-02-01
    • status: closed-fixed --> open-fixed
  • Joachim Backhaus

    Logged In: YES

    Sorry Hiroo, but the exception is handled as a pop-up
    through the catch block:
    } catch (IOException e) {
    ErrorMsg.reportError("Error", "Unable to open " +
    fileName, e);
    return null;

    For the indentation issue: Please use a different editor
    than Eclipse to compare (use 4 blank spaces for a tab):
    My changed code looks good in: Eclipse, UltraEdit, PSPad, SciTE

    I forgot the file which was changed:

  • Joachim Backhaus

    • status: open-fixed --> closed-fixed

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks