Menu

#532 Null Pointer Exception when saving with Audio Buffer with url not set

Technical
closed
SoundPro (2)
5
2015-10-08
2015-09-06
No

I created Audio Buffer IAB2 in a script without assigning a url. When I attempted to save my Layout Editor Panels I got a NullPointerException with no indication of why. I deleted IAB2 in the Audio Table and was able to save after that.

Related

Bugs: #532

Discussion

  • Matthew Harris

    Matthew Harris - 2015-09-09
    • assigned_to: Matthew Harris
     
  • Matthew Harris

    Matthew Harris - 2015-09-15

    Any chance of a copy of the script to help replicate the issue please?

    Best regards,

    Matt H

     
  • Matthew Harris

    Matthew Harris - 2015-09-15

    Also, if your JMRI machine is internet connected, could you also perform 'Help > Upload debugging info' once the error has been seen.

    Thanks.

    Best regards,

    Matt H

     
  • Matthew Harris

    Matthew Harris - 2015-09-16

    I cannot exactly recreate the issue as stated - saving with a 'blank' audio buffer works. However, re-loading that file with the 'blank' audio buffer does trigger a NullPointerException.

    Please confirm the exact sequence to recreate the issue.

    Many thanks.

    Best regards,

    Matt H

     
    • Randy Burnet

      Randy Burnet - 2015-09-17

      Matt H:
      Just sent an upload, not sure if it went through as my scripts went nuts in the background.
      Bottom line:
      execute in the Panels/Script Entry window:
      buffer = audio.provideAudio('IAB1')

      where IAB1 (or whatever number is new) didn't exist at all before in the Audio Buffer table, it will now show up with an 'Empty Buffer'
      then try to save the Layout Panel file that now has this Audio Buffer table in it, and it will throw the exception and refuse to save.
      Randy

       On Wednesday, September 16, 2015 3:51 AM, Matthew Harris <matthewharris@users.sf.net> wrote:
      

      I cannot exactly recreate the issue as stated - saving with a 'blank' audio buffer works. However, re-loading that file with the 'blank' audio buffer does trigger a NullPointerException.Please confirm the exact sequence to recreate the issue.Many thanks.Best regards,Matt H [bugs:#532] Null Pointer Exception when saving with Audio Buffer with url not setStatus: open
      Group: Technical
      Labels: SoundPro
      Created: Sun Sep 06, 2015 01:11 PM UTC by Randy Burnet
      Last Updated: Tue Sep 15, 2015 12:05 PM UTC
      Owner: Matthew HarrisI created Audio Buffer IAB2 in a script without assigning a url. When I attempted to save my Layout Editor Panels I got a NullPointerException with no indication of why. I deleted IAB2 in the Audio Table and was able to save after that.Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/jmri/bugs/532/To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       

      Related

      Bugs: #532

  • Matthew Harris

    Matthew Harris - 2015-09-17

    Thanks Randy, got the debugging info.

    It seems as though there is a subtle difference when creating AudioBuffer objects in the GUI versus via a script and I am able to replicate the issue in my development environment.

    I'll work on a fix.

    Best regards,

    Matt H

     
  • Matthew Harris

    Matthew Harris - 2015-09-17

    OK, fix has been applied and should be in next JMRI release

     
  • Matthew Harris

    Matthew Harris - 2015-09-17
    • status: open --> pending
     
  • Matthew Harris

    Matthew Harris - 2015-10-08
    • status: pending --> closed
     
  • Matthew Harris

    Matthew Harris - 2015-10-08

    Included in 4.1.2