New bug fixes

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

New bug fixes

Michael Bechard
Added bug fixes that fixed the plugin loader reading
only part of a class' bytes from the jar file before
the call to defineClass.

There's another bug fix, though I may be off the mark
on this one. I found that my plugin wouldn't load
(after the call to loadPlugins) with the forName
function, like it had lost the reference to the class
loader. I made it use the PluginClassLoader's
loadClass function when forName failed. The real
problem, though, is why forName wouldn't work. Steven,
did you ever run into this?

Michael Bechard

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Bluemusic-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bluemusic-devel
Reply | Threaded
Open this post in threaded view
|

Re: New bug fixes

Steven Yi
Hi Michael,

It's weird but I guess you missed that I had already exposed the class
loader with getPluginLoader in BlueSystem (you added getClassLoader).
I like it named as getClassLoader though, so I can remove the other
method and have the code I did use getClassLoader instead.

I had fallen into the same thing where Class.forName does not use the
custom ClassLoader, which took me a while to understand how that
works.  As far as I know, when you load a Class object, you can use
that Class object to make new instances as that Class object has a
reference to the classLoader that loaded it.  If you use
Class.forName(), this will only have a reference to the system
ClassLoader, so the custom one will not be used.  I had ran into the
Class.forName issue when I was working with the plugin soundObject,
but didn't ever get around for Instruments and NoteProcessors.

Thanks a lot for looking into this.  I'll try to get some time in
tonight to take a look at the plugin loading for Instrument's.  I've
also got jury duty selection today which might mean getting picked,
and James Hearon and I are working pretty hard on the new Csound
Journal (which I have to finish up an article for!), so for the next
few days I'll probably be communicating a little slower than I
normally do.

Thanks again!
steven




As for the Byte reading, I'm not sure how it was broken, but thanks
for the fix!  I think I might change that ClassByteArrayOutputStream
into a utility class that doesn't inherit from ByteArrayOutputStream
as it seems it will be more inline with all the other utility classes
that way.  I think there are some other classes that do their own byte
reading in and it might be better labelled differently than
ClassBtyeArrayOutputStream if it will be used by other classes, and
would express its intent with a different name.



On 9/12/05, Michael Bechard <[hidden email]> wrote:

> Added bug fixes that fixed the plugin loader reading
> only part of a class' bytes from the jar file before
> the call to defineClass.
>
> There's another bug fix, though I may be off the mark
> on this one. I found that my plugin wouldn't load
> (after the call to loadPlugins) with the forName
> function, like it had lost the reference to the class
> loader. I made it use the PluginClassLoader's
> loadClass function when forName failed. The real
> problem, though, is why forName wouldn't work. Steven,
> did you ever run into this?
>
> Michael Bechard
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
>
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
> Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> _______________________________________________
> Bluemusic-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/bluemusic-devel
>


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Bluemusic-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bluemusic-devel
Reply | Threaded
Open this post in threaded view
|

Re: New bug fixes

Michael Bechard
No problem.  Sorry I missed that accessor; wierd how
that stuff can slip through the radar.  Let me know if
you want me to fix it...

Michael Bechard

--- Steven Yi <[hidden email]> wrote:

> Hi Michael,
>
> It's weird but I guess you missed that I had already
> exposed the class
> loader with getPluginLoader in BlueSystem (you added
> getClassLoader).
> I like it named as getClassLoader though, so I can
> remove the other
> method and have the code I did use getClassLoader
> instead.
>
> I had fallen into the same thing where Class.forName
> does not use the
> custom ClassLoader, which took me a while to
> understand how that
> works.  As far as I know, when you load a Class
> object, you can use
> that Class object to make new instances as that
> Class object has a
> reference to the classLoader that loaded it.  If you
> use
> Class.forName(), this will only have a reference to
> the system
> ClassLoader, so the custom one will not be used.  I
> had ran into the
> Class.forName issue when I was working with the
> plugin soundObject,
> but didn't ever get around for Instruments and
> NoteProcessors.
>
> Thanks a lot for looking into this.  I'll try to get
> some time in
> tonight to take a look at the plugin loading for
> Instrument's.  I've
> also got jury duty selection today which might mean
> getting picked,
> and James Hearon and I are working pretty hard on
> the new Csound
> Journal (which I have to finish up an article for!),
> so for the next
> few days I'll probably be communicating a little
> slower than I
> normally do.
>
> Thanks again!
> steven
>
>
>
>
> As for the Byte reading, I'm not sure how it was
> broken, but thanks
> for the fix!  I think I might change that
> ClassByteArrayOutputStream
> into a utility class that doesn't inherit from
> ByteArrayOutputStream
> as it seems it will be more inline with all the
> other utility classes
> that way.  I think there are some other classes that
> do their own byte
> reading in and it might be better labelled
> differently than
> ClassBtyeArrayOutputStream if it will be used by
> other classes, and
> would express its intent with a different name.
>
>
>
> On 9/12/05, Michael Bechard <[hidden email]>
> wrote:
> > Added bug fixes that fixed the plugin loader
> reading
> > only part of a class' bytes from the jar file
> before
> > the call to defineClass.
> >
> > There's another bug fix, though I may be off the
> mark
> > on this one. I found that my plugin wouldn't load
> > (after the call to loadPlugins) with the forName
> > function, like it had lost the reference to the
> class
> > loader. I made it use the PluginClassLoader's
> > loadClass function when forName failed. The real
> > problem, though, is why forName wouldn't work.
> Steven,
> > did you ever run into this?
> >
> > Michael Bechard
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
> >
> >
> >
>
-------------------------------------------------------

> > SF.Net email is Sponsored by the Better Software
> Conference & EXPO
> > September 19-22, 2005 * San Francisco, CA *
> Development Lifecycle Practices
> > Agile & Plan-Driven Development * Managing
> Projects & Teams * Testing & QA
> > Security * Process Improvement & Measurement *
> http://www.sqe.com/bsce5sf
> > _______________________________________________
> > Bluemusic-devel mailing list
> > [hidden email]
> >
>
https://lists.sourceforge.net/lists/listinfo/bluemusic-devel
> >
>
>
>
-------------------------------------------------------

> SF.Net email is Sponsored by the Better Software
> Conference & EXPO
> September 19-22, 2005 * San Francisco, CA *
> Development Lifecycle Practices
> Agile & Plan-Driven Development * Managing Projects
> & Teams * Testing & QA
> Security * Process Improvement & Measurement *
> http://www.sqe.com/bsce5sf
> _______________________________________________
> Bluemusic-devel mailing list
> [hidden email]
>
https://lists.sourceforge.net/lists/listinfo/bluemusic-devel
>


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Bluemusic-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bluemusic-devel
Reply | Threaded
Open this post in threaded view
|

Re: New bug fixes

Steven Yi
No worries, I removed the old method and fixed up the little bit of
code that used it to use the new name.  I also changed some code to
not use Class.forName but just use the PluginClassLoader directly as
PluginClassLoader calls Class.forName if it can't find it within it's
own cache of loaded Classes.  I left in the ClassByteArrayOutputStream
for now as it seems fine, though I was thinking an IOUtils class with
a method:

byte[] toByteArray(InputStream in)

might express the intention of the code a bit better than using an
outputStream with and inputstream.  It's not a big deal though and
works fine so will leave it as is for now.

Thanks for the fixes!  BTW: How are you finding the NoteProcessor
building process?  And I'm curious what your noteProcessors are too!
=)

steven


On 9/12/05, Michael Bechard <[hidden email]> wrote:

> No problem.  Sorry I missed that accessor; wierd how
> that stuff can slip through the radar.  Let me know if
> you want me to fix it...
>
> Michael Bechard
>
> --- Steven Yi <[hidden email]> wrote:
>
> > Hi Michael,
> >
> > It's weird but I guess you missed that I had already
> > exposed the class
> > loader with getPluginLoader in BlueSystem (you added
> > getClassLoader).
> > I like it named as getClassLoader though, so I can
> > remove the other
> > method and have the code I did use getClassLoader
> > instead.
> >
> > I had fallen into the same thing where Class.forName
> > does not use the
> > custom ClassLoader, which took me a while to
> > understand how that
> > works.  As far as I know, when you load a Class
> > object, you can use
> > that Class object to make new instances as that
> > Class object has a
> > reference to the classLoader that loaded it.  If you
> > use
> > Class.forName(), this will only have a reference to
> > the system
> > ClassLoader, so the custom one will not be used.  I
> > had ran into the
> > Class.forName issue when I was working with the
> > plugin soundObject,
> > but didn't ever get around for Instruments and
> > NoteProcessors.
> >
> > Thanks a lot for looking into this.  I'll try to get
> > some time in
> > tonight to take a look at the plugin loading for
> > Instrument's.  I've
> > also got jury duty selection today which might mean
> > getting picked,
> > and James Hearon and I are working pretty hard on
> > the new Csound
> > Journal (which I have to finish up an article for!),
> > so for the next
> > few days I'll probably be communicating a little
> > slower than I
> > normally do.
> >
> > Thanks again!
> > steven
> >
> >
> >
> >
> > As for the Byte reading, I'm not sure how it was
> > broken, but thanks
> > for the fix!  I think I might change that
> > ClassByteArrayOutputStream
> > into a utility class that doesn't inherit from
> > ByteArrayOutputStream
> > as it seems it will be more inline with all the
> > other utility classes
> > that way.  I think there are some other classes that
> > do their own byte
> > reading in and it might be better labelled
> > differently than
> > ClassBtyeArrayOutputStream if it will be used by
> > other classes, and
> > would express its intent with a different name.
> >
> >
> >
> > On 9/12/05, Michael Bechard <[hidden email]>
> > wrote:
> > > Added bug fixes that fixed the plugin loader
> > reading
> > > only part of a class' bytes from the jar file
> > before
> > > the call to defineClass.
> > >
> > > There's another bug fix, though I may be off the
> > mark
> > > on this one. I found that my plugin wouldn't load
> > > (after the call to loadPlugins) with the forName
> > > function, like it had lost the reference to the
> > class
> > > loader. I made it use the PluginClassLoader's
> > > loadClass function when forName failed. The real
> > > problem, though, is why forName wouldn't work.
> > Steven,
> > > did you ever run into this?
> > >
> > > Michael Bechard
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Tired of spam?  Yahoo! Mail has the best spam
> > protection around
> > > http://mail.yahoo.com
> > >
> > >
> > >
> >
> -------------------------------------------------------
> > > SF.Net email is Sponsored by the Better Software
> > Conference & EXPO
> > > September 19-22, 2005 * San Francisco, CA *
> > Development Lifecycle Practices
> > > Agile & Plan-Driven Development * Managing
> > Projects & Teams * Testing & QA
> > > Security * Process Improvement & Measurement *
> > http://www.sqe.com/bsce5sf
> > > _______________________________________________
> > > Bluemusic-devel mailing list
> > > [hidden email]
> > >
> >
> https://lists.sourceforge.net/lists/listinfo/bluemusic-devel
> > >
> >
> >
> >
> -------------------------------------------------------
> > SF.Net email is Sponsored by the Better Software
> > Conference & EXPO
> > September 19-22, 2005 * San Francisco, CA *
> > Development Lifecycle Practices
> > Agile & Plan-Driven Development * Managing Projects
> > & Teams * Testing & QA
> > Security * Process Improvement & Measurement *
> > http://www.sqe.com/bsce5sf
> > _______________________________________________
> > Bluemusic-devel mailing list
> > [hidden email]
> >
> https://lists.sourceforge.net/lists/listinfo/bluemusic-devel
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
>
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
> Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> _______________________________________________
> Bluemusic-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/bluemusic-devel
>


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Bluemusic-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bluemusic-devel
Reply | Threaded
Open this post in threaded view
|

Re: New bug fixes

Michael Bechard
I was working with the NoteProcessor class and had
gotten it to the point where it loaded my class and
could instantiate it, nothing more. So I was
pleasantly surprised when I put the processor in a
chain and saw my two properties show up; that's pretty
slick how it checks for get and set methods, and it
caught me by surprise. So I really like how you put it
together.

My note processor isn't much. Are you familiar with
the convolve reverbs that István Varga put together,
along with the associated IR data, etc? I like using
those, but hate having to figure out the offset of the
delay time, so that's what my processor does; I enter
an IR number and the current tempo, and it changes the
note start time appropriately. Makes it much easier to
use those reverbs in blue.

Michael Bechard

--- Steven Yi <[hidden email]> wrote:

> No worries, I removed the old method and fixed up
> the little bit of
> code that used it to use the new name.  I also
> changed some code to
> not use Class.forName but just use the
> PluginClassLoader directly as
> PluginClassLoader calls Class.forName if it can't
> find it within it's
> own cache of loaded Classes.  I left in the
> ClassByteArrayOutputStream
> for now as it seems fine, though I was thinking an
> IOUtils class with
> a method:
>
> byte[] toByteArray(InputStream in)
>
> might express the intention of the code a bit better
> than using an
> outputStream with and inputstream.  It's not a big
> deal though and
> works fine so will leave it as is for now.
>
> Thanks for the fixes!  BTW: How are you finding the
> NoteProcessor
> building process?  And I'm curious what your
> noteProcessors are too!
> =)
>
> steven
>
>
> On 9/12/05, Michael Bechard <[hidden email]>
> wrote:
> > No problem.  Sorry I missed that accessor; wierd
> how
> > that stuff can slip through the radar.  Let me
> know if
> > you want me to fix it...
> >
> > Michael Bechard
> >
> > --- Steven Yi <[hidden email]> wrote:
> >
> > > Hi Michael,
> > >
> > > It's weird but I guess you missed that I had
> already
> > > exposed the class
> > > loader with getPluginLoader in BlueSystem (you
> added
> > > getClassLoader).
> > > I like it named as getClassLoader though, so I
> can
> > > remove the other
> > > method and have the code I did use
> getClassLoader
> > > instead.
> > >
> > > I had fallen into the same thing where
> Class.forName
> > > does not use the
> > > custom ClassLoader, which took me a while to
> > > understand how that
> > > works.  As far as I know, when you load a Class
> > > object, you can use
> > > that Class object to make new instances as that
> > > Class object has a
> > > reference to the classLoader that loaded it.  If
> you
> > > use
> > > Class.forName(), this will only have a reference
> to
> > > the system
> > > ClassLoader, so the custom one will not be used.
>  I
> > > had ran into the
> > > Class.forName issue when I was working with the
> > > plugin soundObject,
> > > but didn't ever get around for Instruments and
> > > NoteProcessors.
> > >
> > > Thanks a lot for looking into this.  I'll try to
> get
> > > some time in
> > > tonight to take a look at the plugin loading for
> > > Instrument's.  I've
> > > also got jury duty selection today which might
> mean
> > > getting picked,
> > > and James Hearon and I are working pretty hard
> on
> > > the new Csound
> > > Journal (which I have to finish up an article
> for!),
> > > so for the next
> > > few days I'll probably be communicating a little
> > > slower than I
> > > normally do.
> > >
> > > Thanks again!
> > > steven
> > >
> > >
> > >
> > >
> > > As for the Byte reading, I'm not sure how it was
> > > broken, but thanks
> > > for the fix!  I think I might change that
> > > ClassByteArrayOutputStream
> > > into a utility class that doesn't inherit from
> > > ByteArrayOutputStream
> > > as it seems it will be more inline with all the
> > > other utility classes
> > > that way.  I think there are some other classes
> that
> > > do their own byte
> > > reading in and it might be better labelled
> > > differently than
> > > ClassBtyeArrayOutputStream if it will be used by
> > > other classes, and
> > > would express its intent with a different name.
> > >
> > >
> > >
> > > On 9/12/05, Michael Bechard
> <[hidden email]>
> > > wrote:
> > > > Added bug fixes that fixed the plugin loader
> > > reading
> > > > only part of a class' bytes from the jar file
> > > before
> > > > the call to defineClass.
> > > >
> > > > There's another bug fix, though I may be off
> the
> > > mark
> > > > on this one. I found that my plugin wouldn't
> load
> > > > (after the call to loadPlugins) with the
> forName
> > > > function, like it had lost the reference to
> the
> > > class
> > > > loader. I made it use the PluginClassLoader's
> > > > loadClass function when forName failed. The
> real
> > > > problem, though, is why forName wouldn't work.
> > > Steven,
> > > > did you ever run into this?
> > > >
> > > > Michael Bechard
> > > >
> > > >
> __________________________________________________
> > > > Do You Yahoo!?
> > > > Tired of spam?  Yahoo! Mail has the best spam
> > > protection around
> > > > http://mail.yahoo.com
> > > >
> > > >
> > > >
> > >
> >
>
-------------------------------------------------------

> > > > SF.Net email is Sponsored by the Better
> Software
> > > Conference & EXPO
> > > > September 19-22, 2005 * San Francisco, CA *
> > > Development Lifecycle Practices
> > > > Agile & Plan-Driven Development * Managing
> > > Projects & Teams * Testing & QA
> > > > Security * Process Improvement & Measurement *
> > > http://www.sqe.com/bsce5sf
> > > >
> _______________________________________________
> > > > Bluemusic-devel mailing list
> > > > [hidden email]
> > > >
> > >
> >
>
https://lists.sourceforge.net/lists/listinfo/bluemusic-devel
> > > >
> > >
> > >
> > >
> >
>
-------------------------------------------------------

> > > SF.Net email is Sponsored by the Better Software
> > > Conference & EXPO
> > > September 19-22, 2005 * San Francisco, CA *
> > > Development Lifecycle Practices
> > > Agile & Plan-Driven Development * Managing
> Projects
> > > & Teams * Testing & QA
> > > Security * Process Improvement & Measurement *
> > > http://www.sqe.com/bsce5sf
> > > _______________________________________________
> > > Bluemusic-devel mailing list
> > > [hidden email]
> > >
> >
>
https://lists.sourceforge.net/lists/listinfo/bluemusic-devel
>
=== message truncated ===


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Bluemusic-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/bluemusic-devel