tests/wiimote/wxglade_hmi@wxglade_hmi/hmi.wxg
author Andrey Skvortsov <andrej.skvortzov@gmail.com>
Tue, 26 Jun 2018 17:34:15 +0300
changeset 2229 3c94bac4526e
parent 1157 72d14a74c643
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

[-------------------------------------------------------------------------------------------------------------------]
1157
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
     1
<?xml version="1.0"?>
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
     2
<!-- generated by wxGlade 0.6.4 on Thu May 16 13:24:16 2013 -->
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
     3
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
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">
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
     5
    <object class="Class_wxglade_hmi" name="wxglade_hmi" base="EditFrame">
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
     6
        <style>wxDEFAULT_FRAME_STYLE</style>
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
     7
        <title>frame_1</title>
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
     8
        <object class="wxStaticBoxSizer" name="sizer_1" base="EditStaticBoxSizer">
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
     9
            <orient>wxVERTICAL</orient>
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
    10
            <label>Wiimote Test</label>
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
    11
            <object class="sizeritem">
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
    12
                <flag>wxEXPAND</flag>
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
    13
                <border>0</border>
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
    14
                <option>0</option>
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
    15
                <object class="wxButton" name="button_1" base="EditButton">
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
    16
                    <label>Connect Wiimote</label>
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
    17
                    <events>
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
    18
                        <handler event="EVT_BUTTON">OnConnectButton</handler>
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
    19
                    </events>
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
    20
                </object>
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
    21
            </object>
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
    22
            <object class="sizeritem">
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
    23
                <flag>wxEXPAND</flag>
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
    24
                <border>0</border>
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
    25
                <option>0</option>
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
    26
                <object class="wxButton" name="button_2" base="EditButton">
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
    27
                    <label>Disconnect Wiimote</label>
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
    28
                    <events>
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
    29
                        <handler event="EVT_BUTTON">OnDisconnectButton</handler>
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
    30
                    </events>
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
    31
                </object>
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
    32
            </object>
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
    33
            <object class="sizeritem">
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
    34
                <flag>wxEXPAND</flag>
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
    35
                <border>0</border>
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
    36
                <option>0</option>
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
    37
                <object class="wxStaticText" name="label_1" base="EditStaticText">
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
    38
                    <attribute>1</attribute>
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
    39
                    <label>Status :</label>
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
    40
                </object>
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
    41
            </object>
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
    42
            <object class="sizeritem">
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
    43
                <flag>wxEXPAND</flag>
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
    44
                <border>0</border>
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
    45
                <option>0</option>
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
    46
                <object class="wxStaticText" name="label_2" base="EditStaticText">
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
    47
                    <attribute>1</attribute>
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
    48
                    <label>no status</label>
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
    49
                </object>
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
    50
            </object>
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
    51
        </object>
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
    52
    </object>
72d14a74c643 Added wiimote input example using python-cwiid and python PLC global variable access
Edouard Tisserant
parents:
diff changeset
    53
</application>