[openbeos] Re: input_server filter issue
- From: Jérôme Duval <korli@xxxxxxxx>
- To: openbeos@xxxxxxxxxxxxx
- Date: Wed, 17 Mar 2004 11:54:06 +0100
Hi Michael,
I have a idea which can happen to be your problem. Let me explain :
Your BMessageFilter is installed in your SSISFilter::SSISFilter() with
AddFilter().
But SSISFilter *fltr is still NULL, not inited, when timeUpFunc may be called.
One thing you can try :
SSISFilter *fltr = NULL;
if (fltr)
fltr->CheckTime();
i also have a doubt about having be_app and be_app_messenger available in a
loaded addon, but why not.
Hope it helps,
Jerome
Selon Michael Phipps <mphipps1@xxxxxxxxxxxxxxxx>:
> I have been working on an input server filter for ScreenSaver. The general
> gist of it is that we add a BMessageRunner to the input_server. It's job is
> to post a message to the Input Server every N seconds (where N is what you
> set in the screen saver preferences app). A BMessageFilter catches that
> message and calls a function checking to see if keys were hit and, if not, to
>
> invoke screensaver.
>
> Now, I am sure that I have done something dumb... But my problem is that when
>
> I create a BMessageFilter and call be_app->AddFilter(filter);
> At that point, the Input Server crashes. So, obviously, I can't do a whole
> lot of debugging.
>
> I can verify that be_app seems to be valid (and it should be). I can't think
>
> of any reason that this should fail.
>
> Here is the relevant code:
>
> SSISFilter::SSISFilter() : enabled(false) {
> pref.LoadSettings();
> blank=pref.GetBlankCorner();
> keep=pref.GetNeverBlankCorner();
> timeMsg=new BMessage(timeUp);
> runner=new BMessageRunner(be_app_messenger, timeMsg, pref.BlankTime()
> *1000000,-1);
> filter=new BMessageFilter(timeUp,timeUpFunc);
> be_app->AddFilter(filter);
> }
>
> I am open to thoughts and ideas...
>
>
- Follow-Ups:
- [openbeos] Re: input_server filter issue
- From: Michael Phipps
- References:
- [openbeos] input_server filter issue
- From: Michael Phipps
Other related posts:
- » [openbeos] input_server filter issue
- » [openbeos] Re: input_server filter issue
- » [openbeos] Re: input_server filter issue
- » [openbeos] Re: input_server filter issue
- » [openbeos] Re: input_server filter issue
- » [openbeos] Re: input_server filter issue
- [openbeos] Re: input_server filter issue
- From: Michael Phipps
- [openbeos] input_server filter issue
- From: Michael Phipps