tests/wxHMI/HMI@wxglade_hmi/hmi.wxg.bak
author Andrey Skvortsov <andrej.skvortzov@gmail.com>
Tue, 26 Jun 2018 17:34:15 +0300
changeset 2229 3c94bac4526e
parent 1461 954d1f42d42d
permissions -rw-r--r--
Fix 'DoGetTextExtent - invalid DC' error

most likely this error happens only on certain wx backends.
GTK3+ on GNU/Linux is apparently one of them.
The problem is described in wxWidgets issue tracker.
http://trac.wxwidgets.org/ticket/12486

[-------------------------------------------------------------------------------------------------------------------]
platform:
Linux-4.16.0-2-rt-amd64-x86_64-with-debian-buster-sid

python-version:
2.7.15

traceback:
File "/home/developer/WorkData/PLC/beremiz/beremiz/ProjectController.py", line 1605, in DispatchDebugValuesProc
self.CallWeakcallables("__tick__", "NewDataAvailable", debug_ticks)
File "/home/developer/WorkData/PLC/beremiz/beremiz/ProjectController.py", line 1585, in CallWeakcallables
function(*cargs)
File "/home/developer/WorkData/PLC/beremiz/beremiz/editors/Viewer.py", line 1217, in NewDataAvailable
refresh_rect.Union(element.GetRedrawRect())
File "/home/developer/WorkData/PLC/beremiz/beremiz/graphics/GraphicCommons.py", line 1609, in GetRedrawRect
self.ValueSize = self.Parent.GetMiniTextExtent(self.ComputedValue)
File "/home/developer/WorkData/PLC/beremiz/beremiz/editors/Viewer.py", line 932, in GetMiniTextExtent
return self.MiniTextDC.GetTextExtent(text)
File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk3/wx/_gdi.py", line 4127, in GetTextExtent
return _gdi_.DC_GetTextExtent(*args, **kwargs)
<class 'wx._core.PyAssertionError'>: C++ assertion "m_graphicContext" failed at ../src/common/dcgraph.cpp(1160) in DoGetTextExtent(): wxGCDC(cg)::DoGetTextExtent - invalid DC

wx-platform:
__WXGTK__

wx-version:
3.0.2.0

[-------------------------------------------------------------------------------------------------------------------]

traceback:
File "/home/developer/WorkData/PLC/beremiz/beremiz/controls/LogViewer.py", line 740, in OnMessageToolTipTimer
self.MessageToolTip.SetFont(self.Font)
File "/home/developer/WorkData/PLC/beremiz/beremiz/controls/CustomToolTip.py", line 75, in SetFont
self.RefreshTip()
File "/home/developer/WorkData/PLC/beremiz/beremiz/controls/CustomToolTip.py", line 158, in RefreshTip
self.SetClientSize(self.GetToolTipSize())
File "/home/developer/WorkData/PLC/beremiz/beremiz/controls/CustomToolTip.py", line 145, in GetToolTipSize
w, h = dc.GetTextExtent(line)
File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk3/wx/_gdi.py", line 4127, in GetTextExtent
return _gdi_.DC_GetTextExtent(*args, **kwargs)
<class 'wx._core.PyAssertionError'>: C++ assertion "m_graphicContext" failed at ../src/common/dcgraph.cpp(1160) in DoGetTextExtent(): wxGCDC(cg)::DoGetTextExtent - invalid DC

[-------------------------------------------------------------------------------------------------------------------]
1461
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
     1
<?xml version="1.0"?>
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
     2
<!-- generated by wxGlade HG on Wed Oct 02 23:48:24 2013 -->
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
     3
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
     4
<application path="" name="" class="" option="0" language="python" top_window="wxglade_hmi" encoding="UTF-8" use_gettext="0" overwrite="0" use_new_namespace="1" for_version="2.8" is_template="0" indent_amount="4" indent_symbol="space" source_extension=".cpp" header_extension=".h">
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
     5
    <object class="Class_wxglade_hmi" name="wxglade_hmi" base="EditFrame">
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
     6
        <style>wxCAPTION|wxCLOSE_BOX|wxMINIMIZE_BOX|wxMAXIMIZE|wxMAXIMIZE_BOX|wxSYSTEM_MENU|wxRESIZE_BORDER|wxCLIP_CHILDREN</style>
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
     7
        <title>frame_1</title>
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
     8
        <object class="wxFlexGridSizer" name="grid_sizer_1" base="EditFlexGridSizer">
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
     9
            <hgap>0</hgap>
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    10
            <growable_rows>0</growable_rows>
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    11
            <rows>1</rows>
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    12
            <growable_cols>0</growable_cols>
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    13
            <cols>2</cols>
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    14
            <vgap>0</vgap>
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    15
            <object class="sizeritem">
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    16
                <flag>wxEXPAND</flag>
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    17
                <border>0</border>
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    18
                <option>1</option>
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    19
                <object class="ThreeDee" name="window_1" base="CustomWidget">
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    20
                    <arguments>
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    21
                        <argument>$parent</argument>
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    22
                        <argument>$id</argument>
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    23
                    </arguments>
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    24
                    <size>400,400</size>
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    25
                </object>
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    26
            </object>
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    27
            <object class="sizeritem">
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    28
                <flag>wxEXPAND</flag>
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    29
                <border>0</border>
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    30
                <option>1</option>
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    31
                <object class="wxFlexGridSizer" name="sizer_1" base="EditFlexGridSizer">
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    32
                    <hgap>0</hgap>
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    33
                    <rows>2</rows>
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    34
                    <cols>1</cols>
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    35
                    <vgap>0</vgap>
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    36
                    <object class="sizeritem">
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    37
                        <flag>wxEXPAND</flag>
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    38
                        <border>0</border>
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    39
                        <option>1</option>
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    40
                        <object class="wxBoxSizer" name="sizer_2" base="EditBoxSizer">
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    41
                            <orient>wxVERTICAL</orient>
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    42
                            <object class="sizerslot" />
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    43
                            <object class="sizerslot" />
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    44
                            <object class="sizerslot" />
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    45
                            <object class="sizerslot" />
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    46
                        </object>
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    47
                    </object>
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    48
                    <object class="sizeritem">
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    49
                        <flag>wxEXPAND</flag>
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    50
                        <border>0</border>
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    51
                        <option>1</option>
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    52
                        <object class="wxGridSizer" name="sizer_3" base="EditGridSizer">
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    53
                            <hgap>0</hgap>
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    54
                            <rows>4</rows>
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    55
                            <cols>2</cols>
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    56
                            <vgap>0</vgap>
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    57
                            <object class="sizerslot" />
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    58
                            <object class="sizerslot" />
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    59
                            <object class="sizerslot" />
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    60
                            <object class="sizerslot" />
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    61
                            <object class="sizerslot" />
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    62
                            <object class="sizerslot" />
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    63
                            <object class="sizerslot" />
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    64
                            <object class="sizerslot" />
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    65
                        </object>
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    66
                    </object>
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    67
                </object>
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    68
            </object>
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    69
        </object>
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    70
    </object>
954d1f42d42d Added wxHMI test
Edouard Tisserant
parents:
diff changeset
    71
</application>