Re: [Banshee-List] Inconsistent bug when accessing DapDevice attribute



Richard,

Suppose you can show me the code you're using?  Drop me a tarball (off
the list, of course).  Or post a snip to pastebin.  Also drop a full
stacktrace (in --debug mode so we get line numbers, please :)

If you're talking about (string) DapDevice.ID...there's only a few code
paths that could lead to it being null, so it should be easy to track
down :)

Cheers,
Patrick


On Thu, 2007-07-05 at 22:25 -0400, Richard Bailey wrote:
> I did some more testing on this.
> I did a for loop for 10 counts trying to access the ID attribute of
> the DapDevice object, if an exception occurred I Sleep one second and
> try again. Again, I was not able to read that ID attribute even after
> 10 seconds. 
> 
> What is really strange is that if the Dap is plugged in before banshee
> is run, then the exact same block of code, that reads dap.Name on one
> line, then dap.ID on another works fine. So it has to be something
> with the initializing of the DapDevice itself. 
> 
> - Richard
> 
> On 7/4/07, Richard Bailey <rmjb mail com> wrote:
>         Hello,
>         
>         I'm running into a strange bug when working on my plugin
>         I've attached a listener to SourceManager.SourceAdded and when
>         it's called I test if the source passed in the EventArgs is a
>         DapSource and work with it from there. 
>         
>         My strange behaviour is that I get a NullReferenceException
>         when I access the ID property of the DapDevice object when I
>         plugin my dap while banshee is running
>         but if I have my device already plugged in and THEN launch
>         banshee, everything works fine 
>         
>         Is there a process that populates the DapDevice objects with
>         information "gradually" that maybe I'm pre-stepping?
>         
>         I always successfully access the Name property of the
>         DapDevice object though. 
>         
>         - Richard
>         
>         -- 
>         Reporter: What is your opinion on the obesity problem?
>         King: I prefer it to the famine problem
>         - Wizard of ID
> 
> 
> _______________________________________________
> Banshee-list mailing list
> Banshee-list gnome org
> http://mail.gnome.org/mailman/listinfo/banshee-list
-- 
Patrick "Trick" van Staveren
http://trick.vanstaveren.us/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]