i18n/app.fil
author Andrey Skvortsov <andrej.skvortzov@gmail.com>
Tue, 26 Jun 2018 17:34:15 +0300
changeset 2229 3c94bac4526e
parent 2186 2ec02f0f9fa9
child 2426 aef7f2ca4e69
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

[-------------------------------------------------------------------------------------------------------------------]
../canfestival/canfestival.py
../canfestival/SlaveEditor.py
../canfestival/config_utils.py
../canfestival/NetworkEditor.py
../BeremizIDE.py
../dialogs/LDElementDialog.py
../dialogs/ForceVariableDialog.py
../dialogs/SearchInProjectDialog.py
../dialogs/SFCStepDialog.py
../dialogs/SFCStepNameDialog.py
../dialogs/FindInPouDialog.py
../dialogs/SFCDivergenceDialog.py
../dialogs/SFCTransitionDialog.py
../dialogs/DurationEditorDialog.py
../dialogs/PouTransitionDialog.py
../dialogs/FBDVariableDialog.py
../dialogs/BlockPreviewDialog.py
../dialogs/AboutDialog.py
../dialogs/ProjectDialog.py
../dialogs/LDPowerRailDialog.py
../dialogs/ArrayTypeDialog.py
../dialogs/PouNameDialog.py
../dialogs/BrowseLocationsDialog.py
../dialogs/FBDBlockDialog.py
../dialogs/ConnectionDialog.py
../dialogs/BrowseValuesLibraryDialog.py
../dialogs/ActionBlockDialog.py
../dialogs/PouActionDialog.py
../dialogs/DiscoveryDialog.py
../dialogs/PouDialog.py
../graphics/RubberBand.py
../graphics/FBD_Objects.py
../graphics/DebugDataConsumer.py
../graphics/ToolTipProducer.py
../graphics/LD_Objects.py
../graphics/SFC_Objects.py
../graphics/GraphicCommons.py
../connectors/PYRO/__init__.py
../connectors/PYRO/dialog.py
../connectors/__init__.py
../connectors/WAMP/__init__.py
../connectors/WAMP/dialog.py
../targets/Generic/XSD
../targets/XSD_toolchain_makefile
../targets/Xenomai/__init__.py
../targets/Xenomai/XSD
../targets/XSD_toolchain_gcc
../targets/__init__.py
../targets/toolchain_gcc.py
../targets/toolchain_makefile.py
../targets/Linux/XSD
../targets/Win32/XSD
../PLCControler.py
../PLCOpenEditor.py
../py_ext/PythonEditor.py
../py_ext/PythonFileCTNMixin.py
../wxglade_hmi/wxglade_hmi.py
../modbus/modbus.py
../runtime/NevowServer.py
../runtime/WampClient.py
../runtime/PLCObject.py
../runtime/ServicePublisher.py
../ConfigTreeNode.py
../editors/ConfTreeNodeEditor.py
../editors/ResourceEditor.py
../editors/Viewer.py
../editors/LDViewer.py
../editors/DataTypeEditor.py
../editors/IECCodeViewer.py
../editors/TextViewer.py
../editors/ProjectNodeEditor.py
../editors/EditorPanel.py
../editors/DebugViewer.py
../editors/SFCViewer.py
../editors/FileManagementPanel.py
../editors/CodeFileEditor.py
../ProjectController.py
../controls/LocationCellEditor.py
../controls/SearchResultPanel.py
../controls/PouInstanceVariablesPanel.py
../controls/CustomTable.py
../controls/EnhancedStatusBar.py
../controls/LibraryPanel.py
../controls/UriLocationEditor.py
../controls/CustomToolTip.py
../controls/LogViewer.py
../controls/FolderTree.py
../controls/ProjectPropertiesPanel.py
../controls/DebugVariablePanel/DebugVariablePanel.py
../controls/DebugVariablePanel/DebugVariableViewer.py
../controls/DebugVariablePanel/DebugVariableTextViewer.py
../controls/DebugVariablePanel/DebugVariableGraphicViewer.py
../controls/DebugVariablePanel/GraphButton.py
../controls/DebugVariablePanel/DebugVariableItem.py
../controls/TextCtrlAutoComplete.py
../controls/DurationCellEditor.py
../controls/CustomStyledTextCtrl.py
../controls/VariablePanel.py
../controls/CustomGrid.py
../controls/CustomIntCtrl.py
../controls/CustomTree.py
../controls/CustomEditableListBox.py
../CodeFileTreeNode.py
../docutil/dochtml.py
../c_ext/CFileEditor.py
../xmlclass/xsdschema.py
../xmlclass/xmlclass.py
../Beremiz.py
../version.py
../POULibrary.py
../util/MiniTextControler.py
../util/ExceptionHandler.py
../util/misc.py
../util/ProcessLogger.py
../features.py
../svgui/svgui.py
../svgui/svgui_server.py
../svgui/svguilib.py
../plcopen/InstancesPathCollector.py
../plcopen/types_enums.py
../plcopen/InstanceTagnameCollector.py
../plcopen/BlockInstanceCollector.py
../plcopen/iec_std.csv
../plcopen/structures.py
../plcopen/XSLTModelQuery.py
../plcopen/POUVariablesCollector.py
../plcopen/VariableInfoCollector.py
../plcopen/plcopen.py
../plcopen/definitions.py
../IDEFrame.py
../PLCGenerator.py
../Beremiz_service.py
../plcopen/Additional_Function_Blocks.xml
../plcopen/Standard_Function_Blocks.xml