[vbox-dev] IEvent not triggering on some events ... ?

Klaus Espenlaub klaus.espenlaub at oracle.com
Wed Mar 30 14:51:20 GMT 2011


On 30.03.2011 15:07, Joseph Smith wrote:
> Hi Klaus,
>
> Thank you for the follow-up and the details. Sorry for my delayed reply.
>
> I believe you have helped me identify the root cause of why I am not
> receiving some events (registering with the Console event).
>
>  From your comments then, it seems if I want to track events for running
> VMs, I should enable console event tracking for each running VM.

Correct.

> Question: Do I need to specifically call the
> IConsole::IEventSource::unregisterListener for VMs that, though were
> previously running, are no longer running?

No. Because the IEventSource object managing those events disappears 
together with the VM.

Klaus

>
>
> Thanks,
> Joe
>
>
> ------------------------------------------------------------------------
> *From:* Klaus Espenlaub <klaus.espenlaub at oracle.com>
> *To:* Nikolay Igotti <nikolay.igotti at oracle.com>
> *Cc:* Joseph Smith <joseph1962smith at yahoo.com>; vbox-dev at virtualbox.org
> *Sent:* Fri, March 25, 2011 9:11:20 AM
> *Subject:* Re: [vbox-dev] IEvent not triggering on some events ... ?
>
> Hi Joe,
>
> see comments inline
>
> On 24.03.2011 20:23, Nikolay Igotti wrote:
>  > Hi Joseph,
>  >
>  > I think you just hit an issue (aka bug) in VirtualBox - certain events
>  > not triggered when they should or could be triggered.
>  > The only solution is to implement those.
>  >
>  > Klaus, what do you think about when shall events firing happen, do you
>  > have bit of time to look on that?
>  >
>  > Thanks,
>  > Nikolay
>  >
>  >
>  >
>  > 24.03.2011 17:45, Joseph Smith пишет:
>  >>
>  >> Hi,
>  >>
>  >> Was wondering if anyone has had an opportunity to give this some
>  >> thought and maybe have some suggestions or ideas to offer.
>  >>
>  >>
>  >> Thanks,
>  >> Joe
>  >>
>  >> ------------------------------------------------------------------------
>  >> *From:* Joseph Smith <joseph1962smith at yahoo.com
> <mailto:joseph1962smith at yahoo.com>>
>  >> *To:* vbox-dev at virtualbox.org <mailto:vbox-dev at virtualbox.org>
>  >> *Sent:* Sat, March 19, 2011 11:11:12 PM
>  >> *Subject:* [vbox-dev] IEvent not triggering on some events ... ?
>  >>
>  >>
>  >> VBox Ver: 4.0.0 and 4.0.4
>  >> Hosts: Win XP, openSuSE 11.2, Mac OS 10.6
>  >> Guests: various
>  >>
>  >> I am using the VirtualBox webservice PHP APIs (via
>  >> vboxServiceWrappers.php). With the release of 4.0.x, I shifted my
>  >> solution approach from a heavy polling approach to the light-weight
>  >> IEvent approach.
>  >>
>  >> It appears there are some key events that are not being triggered. For
>  >> example, I do not receive the IMediumChanged and IMediumRegistered
>  >> events among some lesser important events that I don't quite need just
>  >> yet (e.g: IRuntimeErrorEvent).
>
> IMediumRegistered (an IVirtualBox event) indeed is never triggered. Will
> look into getting this fixed for 4.0.6. No promises.
>
> IMediumChanged (an IConsole event) is triggered, but only when a VM is
> running. You need to register with the Console object of the running VM,
> not with the local Console object which is associated with every session...
>
> I can see no problem with IRuntimeErrorEvent (also an IConsole event)
> either, it should be fired for every runtime error encountered by a
> running VM. Sure you're using the right Console object?
>
>  >> I do consistently receive the OnMachineRegistered,
>  >> OnMachineDataChanged, OnMachineStateChanged, OnGuestPropertyChanged,
>  >> OnEventSourceChanged, OnSessionStateChagned events and a few others.
>  >>
>  >> When I register the listner (EventSource::RegisterListener), I listen
>  >> for 'Any' events as described in the documentation and after handling
>  >> each event, I call EventSource::EventProcessed.
>  >>
>  >> Does ver 4.0.x fire IMedium events ? Any suggestions of what I might
>  >> be able to look for to determine what I might be doing incorrectly?
>
> Half of them yes, half of them no.
>
>  >> Oh ... my application runs for weeks at a time without being restarted
>  >> and polls about every 3 seconds for events. There are never any events
>  >> that are not processed. Of the events I listed above, I continue to
>  >> receive those events when actions trigger them ... just not getting
>  >> many of the others listed in the enumerated VBoxEvent Type.
>
> Again sounds like a description of the symptoms of not registering with
> the Console events correctly. They do not show up for the VirtualBox
> event source.
>
> Klaus
>
>  >>
>  >> Any suggestions are welcome.
>  >>
>  >>
>  >> Thanks,
>  >> Joe
>  >>
>  >>
>  >>
>  >> _______________________________________________
>  >> vbox-dev mailing list
>  >> vbox-dev at virtualbox.org <mailto:vbox-dev at virtualbox.org>
>> > http://vbox.innotek.de/mailman/listinfo/vbox-dev
>  >
>





More information about the vbox-dev mailing list