Phoenix - agw.aui on Linux Mint17

Hi Robin,

When running the demo for agw.aui I get an exception on Mint17 "ScreenToClient failed on unrealized Window" with Python 3.4 and Phoenix 3.0.3.dev1687.

Werner

p.s. no email client setup on my Mint17, hope you get the traceback on any Linux.

Werner wrote:

Hi Robin,

When running the demo for agw.aui I get an exception on Mint17
"ScreenToClient failed on unrealized Window" with Python 3.4 and Phoenix
3.0.3.dev1687.

On X-windows systems "unrealized" means that the window hasn't been sent over to the X server yet, and so it only exists in the application at that time. When a window has not been realized yet anything you try to do to it that requires the X server will give you an error like this.

The things to watch out for in the code to help narrow down the source of the issue would be anything that might happen before the window or its top-level parent is shown. You can try moving things like that to a handler for the EVT_WINDOW_CREATE event, like what is done in the ShapedWindow sample in the demo. Just be sure to call that handler directly on the other platforms because on Windows at least that event is typically sent before the window constructor returns.

···

--
Robin Dunn
Software Craftsman

Hi Robin,

Werner wrote:

Hi Robin,

When running the demo for agw.aui I get an exception on Mint17
"ScreenToClient failed on unrealized Window" with Python 3.4 and Phoenix
3.0.3.dev1687.

On X-windows systems "unrealized" means that the window hasn't been sent over to the X server yet, and so it only exists in the application at that time. When a window has not been realized yet anything you try to do to it that requires the X server will give you an error like this.

The things to watch out for in the code to help narrow down the source of the issue would be anything that might happen before the window or its top-level parent is shown. You can try moving things like that to a handler for the EVT_WINDOW_CREATE event, like what is done in the ShapedWindow sample in the demo. Just be sure to call that handler directly on the other platforms because on Windows at least that event is typically sent before the window constructor returns.

Not getting very far with debugging this, stepping through the demo AUI.py I see the error on line 1254, which is the AddPane below.

         wnd10 = self.CreateTextCtrl("This pane will prompt the user before hiding.")
         self._mgr.AddPane(wnd10, aui.AuiPaneInfo().
                           Name("test10").Caption("Text Pane with Hide Prompt").
                           Bottom().MinimizeButton(True), target=self._mgr.GetPane("autonotebook"))

Attached is the backtrace I am seeing and if I read this correctly it is all in C++ code.

Can you give me some more pointers on how to debug this further.

BTW, running the unittest 'test_lib_agw_aui.py' I see the same error on line 20 of the test.

Thanks
Werner

auitrace.txt (3.38 KB)

···

On 3/14/2015 8:03, Robin Dunn wrote:

Hi Robin,

Managed to get it working, see PR # 10 on wxWidgets/Phoenix.

On GTK it is not perfect, as a partial screen shows and then it takes some time for the final layout to show. The delay is due to the freeze/thaw but if I don't do that then we get very heavy flicker which is even uglier.

Werner