Re: Problem with instantiating thru bonobo_activation_query.
- From: "Nickolay V. Shmyrev" <nshmyrev yandex ru>
- To: gnome-components-list gnome org
- Cc:
- Subject: Re: Problem with instantiating thru bonobo_activation_query.
- Date: Fri, 1 Apr 2005 15:35:41 +0400 (MSD)
>This error has come back in my app, and I am wondering (beating my
>head against wall ;)) what to do for it. Seeking suggestions/advice on how
>to fix this for good. test-speech works well in similar case.
>
>When I get the error:
>The logged in user holding the X window (whose bonobo-activation-server is
>already running) does not face any problem
>in running my app. But another user, when he starts the application, he gets
>following error, and my app does not start
Situation is a bit unclear for me, do you mean that when you start your
application without X, you get an error, or that if one user is running applications, second can't start it?
Please also note that plain X session doesn't start b-a-s, it it done by gnome
seesion. Is there difference of startup of application from plain X session and
from gnome session?
>gnome-speech(bonobo server I want to activate) :-
>---file bonobo-activation-activate.c: line 260
>(bonobo_activation_query): assertion `ac != NULL' failed---
>Would anybody be having the idea why this happens?
>
>Relevant Code
>#define OBJ_ID
>CORBA_Environment ev;
>int num_arg =0;
>
>/*initialise bonobo*/
>CORBA_exception_init (&ev);
>if (!bonobo_is_initialized())
>if (!bonobo_init (NULL, NULL))
>{
I think you'd want to pass argc argv to bonobo_init. Also there is no
need to chech for bonobo_is_initialized.
>fprintf (stderr, "Could not setup Bonobo environment for speech
>synthesis.\n");
>IsAvailable = false;
>return false;
>}
>if (BONOBO_EX (&ev)) {
>fprintf (stderr, "Could not setup Bonobo environment for speech
>synthesis. Related Exception %s\n", bonobo_exception_get_text (&ev));
>IsAvailable = false;
>return false;
>}
>
>if (!bonobo_activation_is_initialized())
>bonobo_activation_init (num_arg, CORBA_OBJECT_NIL);
if you've already done bonobo initialization there is no need to initialize
bonobo_activation. Please try to make your code more simple. Look at test-speech, there is only one call to bonobo_init. But you need to
make a call of bonobo_activate, I think. I don't know why it's missing
in test-speech, but it should present, probably, it's a bug. Take a look at bonobo sources in samples/echo, where small example of bonobo usage is located.
>if (BONOBO_EX (&ev)) {
>fprintf (stderr, "Could not setup Bonobo activation for speech
>synthesis. Related Exception %s\n", bonobo_exception_get_text (&ev));
>IsAvailable = false;
>return false;
>}
>
>/*[FAILS HERE] Query for speech servers */
>servers = bonobo_activation_query (OBJ_ID,NULL, &ev);
>if (BONOBO_EX (&ev) || servers == CORBA_OBJECT_NIL) {
>fprintf (stderr, "Fetching Speech servers information failed.
>Related Exception %s.\n", bonobo_exception_get_text (&ev));
>return false;
>}
>
>
>CORBA_exception_free (&ev);
>
>
>
>What I did to get this information on running it in terminal.
>
>
>export BONOBO2_DEBUG=all
>export BONOBO_ACTIVATION_DEBUG=1
>export BONOBO_ACTIVATION_DEBUG_OUTPUT=1
>
>When running my application
>
>
>
>
>** (acroread:7012): CRITICAL **: file bonobo-activation-activate.c:
>line 260 (bonobo_activation_query): assertion `ac != NULL' failed
>Fetching Speech servers information failed. Related Exception Error
>checking error; no exception.
>Failed Fetching Speech servers information.
>
>** (process:7038): WARNING **: Update registry (nil)
>
>** (process:7038): WARNING **: Compare old_mtime on
>'/usr/lib/bonobo/servers' with 0 ==? 1110381203
>
>** (process:7038): WARNING **: Re-load 1 0
>iid OAFIID:BrokenNoType:20000808 has a NULL type
>invalid character '#' in iid
>'OAFIID:This#!!%$iid%^$%_|~!OAFIID_ContainsBadChars'
>
>** (process:7038): WARNING **: Server register.
>'OAFIID:Bonobo_CosNaming_NamingContext' : 0x8079320
>
Looks like you are doing something wrong. Try more closely follow the examples, I think everything should work.
>
>When running test-speech [which also calls bonobo_activation_query]
>There is absolutely no error/warning message. I have made code of
>test-speech similar to my code and also have made all compilation, linking
>options similar but still this fails. Any ideas, when ac!= NULL assertion
>strikes ? Basically, I am wondering where to look?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]