You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openoffice.apache.org by Peter Kovacs <pe...@posteo.de> on 2020/01/07 21:27:44 UTC

OpenOffice trunc Assertion Error

Hello all,

I have build OpenOffice from trunc with debug options. When started I 
get an Assertion Error.
Error: assertion failed!
 From File /home/legine/AOO/main/vcl/unx/gtk/a11y/atkwrapper.cxx at Line 
874
Abort ? (Yes=abort / No=ignore / Cancel=core dump)

Code in Question is:
/* gail_focus_tracker remembers the focused object at the first
              * parent in the hierarchy that is a Gtk+ widget, but at the 
time the
              * event gets processed (at idle), it may be too late to 
create the
              * hierarchy, so doing it now ..
              */
             uno::Reference< accessibility::XAccessible > xParent( 
xContext->getAccessibleParent() );

             /* The top-level objects should never be of this class */
             OSL_ASSERT( xParent.is() );


The Wrapper is not an object right? Only a collection of functions or do 
I read this wrong?

Thx for some help.

All the Best
Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org


Re: OpenOffice trunc Assertion Error

Posted by Jim Jagielski <ji...@jaguNET.com>.
+1

> On Jan 8, 2020, at 9:02 PM, Patricia Shanahan <pa...@acm.org> wrote:
> 
> On 1/8/2020 5:55 PM, Dave Fisher wrote:
>> Hi -
>> See inline
>> Sent from my iPhone
>>> On Jan 8, 2020, at 3:44 PM, Peter Kovacs <Pe...@apache.org> wrote:
>>> 
>>> Hello again,
>>> 
>>> hope I do not annoy anyone, with my questions.
>>> I have looked deeper in the issue using OpenGrok.
>>> 
>>> Now the Issue seems pretty clear.
>>> We have only the function signatures:
>>> 
>>> file: atkwrapper.hxx
>>> 85  AtkObject *            atk_object_wrapper_new(
>>> 86      const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rxAccessible,
>>> 87      AtkObject* parent = NULL );
>>> 
>>> And we have the call for the Function just above this one (file:atkwrapper.cxx):
>>> AtkObject *
>>> atk_object_wrapper_ref( const uno::Reference< accessibility::XAccessible > &rxAccessible, bool create )
>>> {
>>>    g_return_val_if_fail( rxAccessible.get() != NULL, NULL );
>>> 
>>>    AtkObject *obj = ooo_wrapper_registry_get(rxAccessible);
>>>    if( obj )
>>>    {
>>>        g_object_ref( obj );
>>>        return obj;
>>>    }
>>> 
>>>    if( create )
>>>        return atk_object_wrapper_new( rxAccessible );
>>> 
>>>    return NULL;
>>> }
>>> 
>>> So this is a bit confusing.
>>> 
>>> Anyone objects if I refactor the above code so we have only one return statement at the end of the function? I think it is annoying and you quickly miss the exitpoints of the function.
>> You are doing this to make a code quality tool quiet?
>> You will need to carefully understand how to add else clauses to the code. If the functions is long it will be tedious. Bad clauses will create very subtle bugs. I would want to build often ....
>> Such changes may also make these functions slightly slower.
>> If you do this then I think you’ll want someone to review the diff.
> 
> For some functions, single return is natural and clear. For others, the code is simpler, more readable, and clearer with multiple returns. I think this may be a case where I would prefer multiple returns, but I would be interested in seeing what it looks like if refactored, and open to the possibility that it might be clearer.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org <ma...@openoffice.apache.org>
> For additional commands, e-mail: dev-help@openoffice.apache.org <ma...@openoffice.apache.org>

Re: OpenOffice trunc Assertion Error

Posted by Patricia Shanahan <pa...@acm.org>.
On 1/8/2020 5:55 PM, Dave Fisher wrote:
> Hi -
> 
> See inline
> 
> Sent from my iPhone
> 
>> On Jan 8, 2020, at 3:44 PM, Peter Kovacs <Pe...@apache.org> wrote:
>>
>> Hello again,
>>
>> hope I do not annoy anyone, with my questions.
>> I have looked deeper in the issue using OpenGrok.
>>
>> Now the Issue seems pretty clear.
>> We have only the function signatures:
>>
>> file: atkwrapper.hxx
>> 85  AtkObject *            atk_object_wrapper_new(
>> 86      const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rxAccessible,
>> 87      AtkObject* parent = NULL );
>>
>> And we have the call for the Function just above this one (file:atkwrapper.cxx):
>> AtkObject *
>> atk_object_wrapper_ref( const uno::Reference< accessibility::XAccessible > &rxAccessible, bool create )
>> {
>>     g_return_val_if_fail( rxAccessible.get() != NULL, NULL );
>>
>>     AtkObject *obj = ooo_wrapper_registry_get(rxAccessible);
>>     if( obj )
>>     {
>>         g_object_ref( obj );
>>         return obj;
>>     }
>>
>>     if( create )
>>         return atk_object_wrapper_new( rxAccessible );
>>
>>     return NULL;
>> }
>>
>> So this is a bit confusing.
>>
>> Anyone objects if I refactor the above code so we have only one return statement at the end of the function? I think it is annoying and you quickly miss the exitpoints of the function.
> 
> You are doing this to make a code quality tool quiet?
> 
> You will need to carefully understand how to add else clauses to the code. If the functions is long it will be tedious. Bad clauses will create very subtle bugs. I would want to build often ....
> 
> Such changes may also make these functions slightly slower.
> 
> If you do this then I think you’ll want someone to review the diff.

For some functions, single return is natural and clear. For others, the 
code is simpler, more readable, and clearer with multiple returns. I 
think this may be a case where I would prefer multiple returns, but I 
would be interested in seeing what it looks like if refactored, and open 
to the possibility that it might be clearer.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org


Re: OpenOffice trunc Assertion Error

Posted by Peter Kovacs <pe...@apache.org>.
At least checking bz and documenting the findings should be done. 
And the refactoring I want to do. I already know how the code should look like. 


Am 9. Januar 2020 10:57:46 MEZ schrieb Patricia Shanahan <pa...@acm.org>:
>What happens if you ignore the assertion and carry on?
>
>I had to do that for several assertions when debugging some security 
>problems - the problems I was working were higher priority.
>
>On 1/9/2020 1:35 AM, Peter Kovacs wrote:
>> Hi,
>> 
>> To be clear the Assert is a different issue and needs more research.
>> The Assert claims a different object is to be used for top level
>objects. Since the issue pops up on top-level object, right at start, I
>assume something is not as it should be designed. The answers on the
>list suggest that the knowledge is not present. So I need to do digging
>first before I can say what to do. I think it may be worth open an
>issue and collect all informations there.
>> 
>> Thanks pat for the review support I appreciate it.
>> 
>> 
>> All the best
>> Peter
>> 
>> Am 9. Januar 2020 02:55:04 MEZ schrieb Dave Fisher
><wa...@comcast.net>:
>>> Hi -
>>>
>>> See inline
>>>
>>> Sent from my iPhone
>>>
>>>> On Jan 8, 2020, at 3:44 PM, Peter Kovacs <Pe...@apache.org> wrote:
>>>>
>>>> Hello again,
>>>>
>>>> hope I do not annoy anyone, with my questions.
>>>> I have looked deeper in the issue using OpenGrok.
>>>>
>>>> Now the Issue seems pretty clear.
>>>> We have only the function signatures:
>>>>
>>>> file: atkwrapper.hxx
>>>> 85  AtkObject *            atk_object_wrapper_new(
>>>> 86      const ::com::sun::star::uno::Reference<
>>> ::com::sun::star::accessibility::XAccessible >& rxAccessible,
>>>> 87      AtkObject* parent = NULL );
>>>>
>>>> And we have the call for the Function just above this one
>>> (file:atkwrapper.cxx):
>>>> AtkObject *
>>>> atk_object_wrapper_ref( const uno::Reference<
>>> accessibility::XAccessible > &rxAccessible, bool create )
>>>> {
>>>>     g_return_val_if_fail( rxAccessible.get() != NULL, NULL );
>>>>
>>>>     AtkObject *obj = ooo_wrapper_registry_get(rxAccessible);
>>>>     if( obj )
>>>>     {
>>>>         g_object_ref( obj );
>>>>         return obj;
>>>>     }
>>>>
>>>>     if( create )
>>>>         return atk_object_wrapper_new( rxAccessible );
>>>>
>>>>     return NULL;
>>>> }
>>>>
>>>> So this is a bit confusing.
>>>>
>>>> Anyone objects if I refactor the above code so we have only one
>>> return statement at the end of the function? I think it is annoying
>and
>>> you quickly miss the exitpoints of the function.
>>>
>>> You are doing this to make a code quality tool quiet?
>>>
>>> You will need to carefully understand how to add else clauses to the
>>> code. If the functions is long it will be tedious. Bad clauses will
>>> create very subtle bugs. I would want to build often ....
>>>
>>> Such changes may also make these functions slightly slower.
>>>
>>> If you do this then I think you’ll want someone to review the diff.
>>>
>>> Apologies if I’m being negative or discouraging.
>>>
>>> Best Regards,
>>> Dave
>>>
>>>>
>>>> All the Best
>>>> Peter
>>>>
>>>>> On 2020/01/07 21:27:44, Peter Kovacs <pe...@posteo.de>
>wrote:
>>>
>>>>> Hello all,
>>>>>
>>>>> I have build OpenOffice from trunc with debug options. When
>started
>>> I
>>>>> get an Assertion Error.
>>>>> Error: assertion failed!
>>>>>  From File /home/legine/AOO/main/vcl/unx/gtk/a11y/atkwrapper.cxx
>at
>>> Line
>>>>> 874
>>>>> Abort ? (Yes=abort / No=ignore / Cancel=core dump)
>>>>>
>>>>> Code in Question is:
>>>>> /* gail_focus_tracker remembers the focused object at the first
>>>>>               * parent in the hierarchy that is a Gtk+ widget, but
>at
>>> the
>>>>> time the
>>>>>               * event gets processed (at idle), it may be too late
>to
>>>
>>>>> create the
>>>>>               * hierarchy, so doing it now ..
>>>>>               */
>>>>>              uno::Reference< accessibility::XAccessible > xParent(
>>>>> xContext->getAccessibleParent() );
>>>>>
>>>>>              /* The top-level objects should never be of this
>class
>>> */
>>>>>              OSL_ASSERT( xParent.is() );
>>>>>
>>>>>
>>>>> The Wrapper is not an object right? Only a collection of functions
>>> or do
>>>>> I read this wrong?
>>>>>
>>>>> Thx for some help.
>>>>>
>>>>> All the Best
>>>>> Peter
>>>>>
>>>>>
>>>
>---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
>>>>> For additional commands, e-mail: dev-help@openoffice.apache.org
>>>>>
>>>>>
>>>>
>>>>
>---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
>>>> For additional commands, e-mail: dev-help@openoffice.apache.org
>>>>
>>>
>>>
>>>
>---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
>>> For additional commands, e-mail: dev-help@openoffice.apache.org
>> 
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
>For additional commands, e-mail: dev-help@openoffice.apache.org

Re: OpenOffice trunc Assertion Error

Posted by Patricia Shanahan <pa...@acm.org>.
What happens if you ignore the assertion and carry on?

I had to do that for several assertions when debugging some security 
problems - the problems I was working were higher priority.

On 1/9/2020 1:35 AM, Peter Kovacs wrote:
> Hi,
> 
> To be clear the Assert is a different issue and needs more research.
> The Assert claims a different object is to be used for top level objects. Since the issue pops up on top-level object, right at start, I assume something is not as it should be designed. The answers on the list suggest that the knowledge is not present. So I need to do digging first before I can say what to do. I think it may be worth open an issue and collect all informations there.
> 
> Thanks pat for the review support I appreciate it.
> 
> 
> All the best
> Peter
> 
> Am 9. Januar 2020 02:55:04 MEZ schrieb Dave Fisher <wa...@comcast.net>:
>> Hi -
>>
>> See inline
>>
>> Sent from my iPhone
>>
>>> On Jan 8, 2020, at 3:44 PM, Peter Kovacs <Pe...@apache.org> wrote:
>>>
>>> Hello again,
>>>
>>> hope I do not annoy anyone, with my questions.
>>> I have looked deeper in the issue using OpenGrok.
>>>
>>> Now the Issue seems pretty clear.
>>> We have only the function signatures:
>>>
>>> file: atkwrapper.hxx
>>> 85  AtkObject *            atk_object_wrapper_new(
>>> 86      const ::com::sun::star::uno::Reference<
>> ::com::sun::star::accessibility::XAccessible >& rxAccessible,
>>> 87      AtkObject* parent = NULL );
>>>
>>> And we have the call for the Function just above this one
>> (file:atkwrapper.cxx):
>>> AtkObject *
>>> atk_object_wrapper_ref( const uno::Reference<
>> accessibility::XAccessible > &rxAccessible, bool create )
>>> {
>>>     g_return_val_if_fail( rxAccessible.get() != NULL, NULL );
>>>
>>>     AtkObject *obj = ooo_wrapper_registry_get(rxAccessible);
>>>     if( obj )
>>>     {
>>>         g_object_ref( obj );
>>>         return obj;
>>>     }
>>>
>>>     if( create )
>>>         return atk_object_wrapper_new( rxAccessible );
>>>
>>>     return NULL;
>>> }
>>>
>>> So this is a bit confusing.
>>>
>>> Anyone objects if I refactor the above code so we have only one
>> return statement at the end of the function? I think it is annoying and
>> you quickly miss the exitpoints of the function.
>>
>> You are doing this to make a code quality tool quiet?
>>
>> You will need to carefully understand how to add else clauses to the
>> code. If the functions is long it will be tedious. Bad clauses will
>> create very subtle bugs. I would want to build often ....
>>
>> Such changes may also make these functions slightly slower.
>>
>> If you do this then I think you’ll want someone to review the diff.
>>
>> Apologies if I’m being negative or discouraging.
>>
>> Best Regards,
>> Dave
>>
>>>
>>> All the Best
>>> Peter
>>>
>>>> On 2020/01/07 21:27:44, Peter Kovacs <pe...@posteo.de> wrote:
>>
>>>> Hello all,
>>>>
>>>> I have build OpenOffice from trunc with debug options. When started
>> I
>>>> get an Assertion Error.
>>>> Error: assertion failed!
>>>>  From File /home/legine/AOO/main/vcl/unx/gtk/a11y/atkwrapper.cxx at
>> Line
>>>> 874
>>>> Abort ? (Yes=abort / No=ignore / Cancel=core dump)
>>>>
>>>> Code in Question is:
>>>> /* gail_focus_tracker remembers the focused object at the first
>>>>               * parent in the hierarchy that is a Gtk+ widget, but at
>> the
>>>> time the
>>>>               * event gets processed (at idle), it may be too late to
>>
>>>> create the
>>>>               * hierarchy, so doing it now ..
>>>>               */
>>>>              uno::Reference< accessibility::XAccessible > xParent(
>>>> xContext->getAccessibleParent() );
>>>>
>>>>              /* The top-level objects should never be of this class
>> */
>>>>              OSL_ASSERT( xParent.is() );
>>>>
>>>>
>>>> The Wrapper is not an object right? Only a collection of functions
>> or do
>>>> I read this wrong?
>>>>
>>>> Thx for some help.
>>>>
>>>> All the Best
>>>> Peter
>>>>
>>>>
>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
>>>> For additional commands, e-mail: dev-help@openoffice.apache.org
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
>>> For additional commands, e-mail: dev-help@openoffice.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
>> For additional commands, e-mail: dev-help@openoffice.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org


Re: OpenOffice trunc Assertion Error

Posted by Peter Kovacs <pe...@apache.org>.
Hi, 

To be clear the Assert is a different issue and needs more research.
The Assert claims a different object is to be used for top level objects. Since the issue pops up on top-level object, right at start, I assume something is not as it should be designed. The answers on the list suggest that the knowledge is not present. So I need to do digging first before I can say what to do. I think it may be worth open an issue and collect all informations there. 

Thanks pat for the review support I appreciate it.


All the best
Peter

Am 9. Januar 2020 02:55:04 MEZ schrieb Dave Fisher <wa...@comcast.net>:
>Hi -
>
>See inline
>
>Sent from my iPhone
>
>> On Jan 8, 2020, at 3:44 PM, Peter Kovacs <Pe...@apache.org> wrote:
>> 
>> Hello again,
>> 
>> hope I do not annoy anyone, with my questions.
>> I have looked deeper in the issue using OpenGrok.
>> 
>> Now the Issue seems pretty clear.
>> We have only the function signatures:
>> 
>> file: atkwrapper.hxx
>> 85  AtkObject *            atk_object_wrapper_new(
>> 86      const ::com::sun::star::uno::Reference<
>::com::sun::star::accessibility::XAccessible >& rxAccessible,
>> 87      AtkObject* parent = NULL );
>> 
>> And we have the call for the Function just above this one
>(file:atkwrapper.cxx):
>> AtkObject *
>> atk_object_wrapper_ref( const uno::Reference<
>accessibility::XAccessible > &rxAccessible, bool create )
>> {
>>    g_return_val_if_fail( rxAccessible.get() != NULL, NULL );
>> 
>>    AtkObject *obj = ooo_wrapper_registry_get(rxAccessible);
>>    if( obj )
>>    {
>>        g_object_ref( obj );
>>        return obj;
>>    }
>> 
>>    if( create )
>>        return atk_object_wrapper_new( rxAccessible );
>> 
>>    return NULL;
>> }
>> 
>> So this is a bit confusing.
>> 
>> Anyone objects if I refactor the above code so we have only one
>return statement at the end of the function? I think it is annoying and
>you quickly miss the exitpoints of the function.
>
>You are doing this to make a code quality tool quiet?
>
>You will need to carefully understand how to add else clauses to the
>code. If the functions is long it will be tedious. Bad clauses will
>create very subtle bugs. I would want to build often ....
>
>Such changes may also make these functions slightly slower.
>
>If you do this then I think you’ll want someone to review the diff.
>
>Apologies if I’m being negative or discouraging.
>
>Best Regards,
>Dave
>
>> 
>> All the Best
>> Peter
>> 
>>> On 2020/01/07 21:27:44, Peter Kovacs <pe...@posteo.de> wrote:
>
>>> Hello all,
>>> 
>>> I have build OpenOffice from trunc with debug options. When started
>I 
>>> get an Assertion Error.
>>> Error: assertion failed!
>>> From File /home/legine/AOO/main/vcl/unx/gtk/a11y/atkwrapper.cxx at
>Line 
>>> 874
>>> Abort ? (Yes=abort / No=ignore / Cancel=core dump)
>>> 
>>> Code in Question is:
>>> /* gail_focus_tracker remembers the focused object at the first
>>>              * parent in the hierarchy that is a Gtk+ widget, but at
>the 
>>> time the
>>>              * event gets processed (at idle), it may be too late to
>
>>> create the
>>>              * hierarchy, so doing it now ..
>>>              */
>>>             uno::Reference< accessibility::XAccessible > xParent( 
>>> xContext->getAccessibleParent() );
>>> 
>>>             /* The top-level objects should never be of this class
>*/
>>>             OSL_ASSERT( xParent.is() );
>>> 
>>> 
>>> The Wrapper is not an object right? Only a collection of functions
>or do 
>>> I read this wrong?
>>> 
>>> Thx for some help.
>>> 
>>> All the Best
>>> Peter
>>> 
>>>
>---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
>>> For additional commands, e-mail: dev-help@openoffice.apache.org
>>> 
>>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
>> For additional commands, e-mail: dev-help@openoffice.apache.org
>> 
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
>For additional commands, e-mail: dev-help@openoffice.apache.org

Re: OpenOffice trunc Assertion Error

Posted by Dave Fisher <wa...@comcast.net>.
Hi -

See inline

Sent from my iPhone

> On Jan 8, 2020, at 3:44 PM, Peter Kovacs <Pe...@apache.org> wrote:
> 
> Hello again,
> 
> hope I do not annoy anyone, with my questions.
> I have looked deeper in the issue using OpenGrok.
> 
> Now the Issue seems pretty clear.
> We have only the function signatures:
> 
> file: atkwrapper.hxx
> 85  AtkObject *            atk_object_wrapper_new(
> 86      const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rxAccessible,
> 87      AtkObject* parent = NULL );
> 
> And we have the call for the Function just above this one (file:atkwrapper.cxx):
> AtkObject *
> atk_object_wrapper_ref( const uno::Reference< accessibility::XAccessible > &rxAccessible, bool create )
> {
>    g_return_val_if_fail( rxAccessible.get() != NULL, NULL );
> 
>    AtkObject *obj = ooo_wrapper_registry_get(rxAccessible);
>    if( obj )
>    {
>        g_object_ref( obj );
>        return obj;
>    }
> 
>    if( create )
>        return atk_object_wrapper_new( rxAccessible );
> 
>    return NULL;
> }
> 
> So this is a bit confusing.
> 
> Anyone objects if I refactor the above code so we have only one return statement at the end of the function? I think it is annoying and you quickly miss the exitpoints of the function.

You are doing this to make a code quality tool quiet?

You will need to carefully understand how to add else clauses to the code. If the functions is long it will be tedious. Bad clauses will create very subtle bugs. I would want to build often ....

Such changes may also make these functions slightly slower.

If you do this then I think you’ll want someone to review the diff.

Apologies if I’m being negative or discouraging.

Best Regards,
Dave

> 
> All the Best
> Peter
> 
>> On 2020/01/07 21:27:44, Peter Kovacs <pe...@posteo.de> wrote: 
>> Hello all,
>> 
>> I have build OpenOffice from trunc with debug options. When started I 
>> get an Assertion Error.
>> Error: assertion failed!
>> From File /home/legine/AOO/main/vcl/unx/gtk/a11y/atkwrapper.cxx at Line 
>> 874
>> Abort ? (Yes=abort / No=ignore / Cancel=core dump)
>> 
>> Code in Question is:
>> /* gail_focus_tracker remembers the focused object at the first
>>              * parent in the hierarchy that is a Gtk+ widget, but at the 
>> time the
>>              * event gets processed (at idle), it may be too late to 
>> create the
>>              * hierarchy, so doing it now ..
>>              */
>>             uno::Reference< accessibility::XAccessible > xParent( 
>> xContext->getAccessibleParent() );
>> 
>>             /* The top-level objects should never be of this class */
>>             OSL_ASSERT( xParent.is() );
>> 
>> 
>> The Wrapper is not an object right? Only a collection of functions or do 
>> I read this wrong?
>> 
>> Thx for some help.
>> 
>> All the Best
>> Peter
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
>> For additional commands, e-mail: dev-help@openoffice.apache.org
>> 
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
> For additional commands, e-mail: dev-help@openoffice.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org


Re: OpenOffice trunc Assertion Error

Posted by Peter Kovacs <pe...@apache.org>.
Hello again,

hope I do not annoy anyone, with my questions.
I have looked deeper in the issue using OpenGrok.

Now the Issue seems pretty clear.
We have only the function signatures:

file: atkwrapper.hxx
85  AtkObject *            atk_object_wrapper_new(
86      const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rxAccessible,
87      AtkObject* parent = NULL );

And we have the call for the Function just above this one (file:atkwrapper.cxx):
AtkObject *
atk_object_wrapper_ref( const uno::Reference< accessibility::XAccessible > &rxAccessible, bool create )
{
    g_return_val_if_fail( rxAccessible.get() != NULL, NULL );

    AtkObject *obj = ooo_wrapper_registry_get(rxAccessible);
    if( obj )
    {
        g_object_ref( obj );
        return obj;
    }

    if( create )
        return atk_object_wrapper_new( rxAccessible );

    return NULL;
}

So this is a bit confusing.

Anyone objects if I refactor the above code so we have only one return statement at the end of the function? I think it is annoying and you quickly miss the exitpoints of the function.

All the Best
Peter

On 2020/01/07 21:27:44, Peter Kovacs <pe...@posteo.de> wrote: 
> Hello all,
> 
> I have build OpenOffice from trunc with debug options. When started I 
> get an Assertion Error.
> Error: assertion failed!
>  From File /home/legine/AOO/main/vcl/unx/gtk/a11y/atkwrapper.cxx at Line 
> 874
> Abort ? (Yes=abort / No=ignore / Cancel=core dump)
> 
> Code in Question is:
> /* gail_focus_tracker remembers the focused object at the first
>               * parent in the hierarchy that is a Gtk+ widget, but at the 
> time the
>               * event gets processed (at idle), it may be too late to 
> create the
>               * hierarchy, so doing it now ..
>               */
>              uno::Reference< accessibility::XAccessible > xParent( 
> xContext->getAccessibleParent() );
> 
>              /* The top-level objects should never be of this class */
>              OSL_ASSERT( xParent.is() );
> 
> 
> The Wrapper is not an object right? Only a collection of functions or do 
> I read this wrong?
> 
> Thx for some help.
> 
> All the Best
> Peter
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
> For additional commands, e-mail: dev-help@openoffice.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org