Issue 128272

Summary: Assertion Error: (atkwrapper) Not able to get Window Hierarchy
Product: General Reporter: Peter <petko>
Component: codeAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Normal    
Priority: P5 (lowest)    
Version: 4.2.0-dev   
Target Milestone: ---   
Hardware: All   
OS: Linux 64-bit   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

Description Peter 2020-01-20 15:57:59 UTC
When building OpenOffice with debug Options, ASSERTION Errors become active.If tested with sub windows, the ASSERTION error is not going away. So something in the hierarchy probe is not right. Maybe it has to do with my build options. Will post in a following post.

Build environment:
Ubuntu 16.04

On every Window I get following Messages:

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() );
Comment 1 Peter 2020-02-05 18:58:54 UTC
Okay Lets dokument what I found out so far.

 OSL_ASSERT does throw the Message.

xParent.is() returns false and checks if xParent is a valid Object.

What uno::Reference< accessibility::XAccessible > is is a bit unclear to me.
uno:reference is a loose Reference and enables an Object to be correctly addressed in its environment with the environment describing the language we are in.

However I could not find or understand what accessibility::XAccessible is.

The function .is() is a function declared in the reference in ref.h

Now if we follow the funktion (-> ooo_window_wrapper_real_initialize) calls up we will find that we are receiving an GTK Info Opbejct 8a gpointer that points to . an GTK info class.

To be honest I am not sure if the construct is that nice.
I would have preferred an Interface Object that does not wrap the GUI Library instead it provides a policy interface to the GUI. I see the hunch that in the end It does that but as far as I follow it is kind of inside out way. 
Probably my c++ skills still lacks. I am investigating how this stuff works.