[Beremiz-devel] Running Beremiz/PLCopen Editor on Mac OS

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Beremiz-devel] Running Beremiz/PLCopen Editor on Mac OS

Beremiz-Devel mailing list

Dear developers,

I am currently trying to run PLCopen Editor from Beremiz on Mac OS Sierra. I am aware of the discussion on this list that has been going on a few weeks ago.

I am able to start the editor by doing the following:

1. Install MacPorts

2. Install python27, py27-pip and py27-wxpython-3.0 via MacPorts

3. Install pyro, nevow, numpy, matplotlib (version 1.4.3) and lxml via Python PIP

It is essential to use matplotlib 1.4.3 since there seems to be some kind of issue with wxpython and/or matplotlib versions after 1.4.3 that leads to an error "unknown encoding" on Mac OS.

Now having set up all of the above, I am able to start PLCopen by running "python2 PLCOpenEditor.py" from the terminal. I can also open the example program HelloWorld (https://docs.google.com/uc?export=download&confirm=no_antivirus&id=0BwyThwktWLAla1pFWVl2ZjgxdTQ) from www.openplcproject.com via the open dialog.

However, when double clicking on the "My_program" entry in the project tree on the left side the editor will crash with the following segmentation fault:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libwx_osx_cocoau_core-3.0.dylib 0x000000010cec3c54 wxGraphicsPath::GetBox(double*, double*, double*, double*) const + 8
1 libwx_osx_cocoau_core-3.0.dylib 0x000000010cec389d wxGraphicsPath::GetBox() const + 43
2 libwx_osx_cocoau_core-3.0.dylib 0x000000010ce8ff69 wxGCDCImpl::DoDrawEllipticArc(int, int, int, int, double, double) + 889
3 _gdi_.so 0x000000010d905339 _wrap_DC_DrawEllipticArc(_object*, _object*, _object*) + 873
4 org.python.python 0x000000010c179d43 PyEval_EvalFrameEx + 32947
5 org.python.python 0x000000010c171947 PyEval_EvalCodeEx + 2119
6 org.python.python 0x000000010c17dd46 fast_function + 118
7 org.python.python 0x000000010c178e87 PyEval_EvalFrameEx + 29175
8 org.python.python 0x000000010c17de22 fast_function + 338
9 org.python.python 0x000000010c178e87 PyEval_EvalFrameEx + 29175
10 org.python.python 0x000000010c171947 PyEval_EvalCodeEx + 2119
11 org.python.python 0x000000010c17dd46 fast_function + 118
12 org.python.python 0x000000010c178e87 PyEval_EvalFrameEx + 29175
13 org.python.python 0x000000010c171947 PyEval_EvalCodeEx + 2119
14 org.python.python 0x000000010c0f55bb function_call + 363
15 org.python.python 0x000000010c0ce203 PyObject_Call + 99
16 org.python.python 0x000000010c0dc3a6 instancemethod_call + 182
17 org.python.python 0x000000010c0ce203 PyObject_Call + 99
18 org.python.python 0x000000010c17d7c5 PyEval_CallObjectWithKeywords + 165
19 _core_.so 0x000000010c8605a8 wxPyCallback::EventThunker(wxEvent&) + 504
20 libwx_baseu-3.0.dylib 0x000000010d3d5207 wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) + 93
21 libwx_baseu-3.0.dylib 0x000000010d3d653f wxEvtHandler::SearchDynamicEventTable(wxEvent&) + 89
22 libwx_baseu-3.0.dylib 0x000000010d3d6490 wxEvtHandler::TryHereOnly(wxEvent&) + 40
23 libwx_baseu-3.0.dylib 0x000000010d3d63d4 wxEvtHandler::ProcessEventLocally(wxEvent&) + 40
24 libwx_baseu-3.0.dylib 0x000000010d3d6367 wxEvtHandler::ProcessEvent(wxEvent&) + 185
25 libwx_osx_cocoau_core-3.0.dylib 0x000000010cf8c17e wxScrollHelperEvtHandler::ProcessEvent(wxEvent&) + 34
26 libwx_baseu-3.0.dylib 0x000000010d3d65ab wxEvtHandler::SafelyProcessEvent(wxEvent&) + 15
27 libwx_osx_cocoau_core-3.0.dylib 0x000000010cdc5926 wxWindow::MacDoRedraw(long) + 762
28 libwx_osx_cocoau_core-3.0.dylib 0x000000010ce65e0a wxWidgetCocoaImpl::drawRect(void*, NSView*, void*) + 778
29 libwx_osx_cocoau_core-3.0.dylib 0x000000010ce6485a wxOSX_drawRect(NSView*, objc_selector*, CGRect) + 86
30 com.apple.AppKit 0x00007fff872aff99 -[NSView _drawRect:clip:] + 2276
31 com.apple.AppKit 0x00007fff872aea93 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 4870
32 com.apple.AppKit 0x00007fff872ae6d1 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 3908
33 com.apple.AppKit 0x00007fff872ae6d1 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 3908
34 com.apple.AppKit 0x00007fff872ae6d1 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 3908
35 com.apple.AppKit 0x00007fff872ae6d1 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 3908
36 com.apple.AppKit 0x00007fff872ad2af -[NSThemeFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 334
37 com.apple.AppKit 0x00007fff872ab6d8 -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] + 2452
38 com.apple.AppKit 0x00007fff872a6fca -[NSView displayIfNeeded] + 1748
39 com.apple.AppKit 0x00007fff872a68db -[NSWindow displayIfNeeded] + 230
40 com.apple.AppKit 0x00007fff87a06cb4 ___NSWindowGetDisplayCycleObserver_block_invoke.6228 + 277
41 com.apple.AppKit 0x00007fff872a63b9 __37+[NSDisplayCycle currentDisplayCycle]_block_invoke + 454
42 com.apple.QuartzCore 0x00007fff8f189da6 CA::Transaction::run_commit_handlers(CATransactionPhase) + 46
43 com.apple.QuartzCore 0x00007fff8f2938d8 CA::Context::commit_transaction(CA::Transaction*) + 160
44 com.apple.QuartzCore 0x00007fff8f188881 CA::Transaction::commit() + 475
45 com.apple.AppKit 0x00007fff875898b1 __37+[NSDisplayCycle currentDisplayCycle]_block_invoke.31 + 323
46 com.apple.CoreFoundation 0x00007fff8967cd37 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
47 com.apple.CoreFoundation 0x00007fff8967cca7 __CFRunLoopDoObservers + 391
48 com.apple.CoreFoundation 0x00007fff8965d6d9 __CFRunLoopRun + 873
49 com.apple.CoreFoundation 0x00007fff8965d114 CFRunLoopRunSpecific + 420
50 com.apple.HIToolbox 0x00007fff88bbeebc RunCurrentEventLoopInMode + 240
51 com.apple.HIToolbox 0x00007fff88bbebf9 ReceiveNextEventCommon + 184
52 com.apple.HIToolbox 0x00007fff88bbeb26 _BlockUntilNextEventMatchingListInModeWithFilter + 71
53 com.apple.AppKit 0x00007fff87157a54 _DPSNextEvent + 1120
54 com.apple.AppKit 0x00007fff878d37ee -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2796
55 com.apple.AppKit 0x00007fff8714c3db -[NSApplication run] + 926
56 libwx_osx_cocoau_core-3.0.dylib 0x000000010ce4d1ec wxGUIEventLoop::OSXDoRun() + 158
57 libwx_baseu-3.0.dylib 0x000000010d3ae3af wxCFEventLoop::DoRun() + 39
58 libwx_baseu-3.0.dylib 0x000000010d311efd wxEventLoopBase::Run() + 165
59 libwx_baseu-3.0.dylib 0x000000010d2e3cfa wxAppConsoleBase::MainLoop() + 102
60 _core_.so 0x000000010c85b954 wxPyApp::MainLoop() + 84
61 _core_.so 0x000000010c8bd212 _wrap_PyApp_MainLoop(_object*, _object*) + 82
62 org.python.python 0x000000010c179d43 PyEval_EvalFrameEx + 32947
63 org.python.python 0x000000010c171947 PyEval_EvalCodeEx + 2119
64 org.python.python 0x000000010c0f55bb function_call + 363
65 org.python.python 0x000000010c0ce203 PyObject_Call + 99
66 org.python.python 0x000000010c0dc3a6 instancemethod_call + 182
67 org.python.python 0x000000010c0ce203 PyObject_Call + 99
68 org.python.python 0x000000010c17919d PyEval_EvalFrameEx + 29965
69 org.python.python 0x000000010c17de22 fast_function + 338
70 org.python.python 0x000000010c178e87 PyEval_EvalFrameEx + 29175
71 org.python.python 0x000000010c171947 PyEval_EvalCodeEx + 2119
72 org.python.python 0x000000010c1710f6 PyEval_EvalCode + 54
73 org.python.python 0x000000010c1a0824 PyRun_FileExFlags + 164
74 org.python.python 0x000000010c1a035e PyRun_SimpleFileExFlags + 702
75 org.python.python 0x000000010c1b6b1d Py_Main + 2925
76 libdyld.dylib 0x00007fff9edd7235 start + 1

The segfault seems to be triggered by dc.DrawEllipticArc() in the Draw() method of LD_Objects.py. I already started to investigate the issue but haven't been able to find a cause yet. This issue only occurs on Mac OS, on Linux it is running fine (haven't tried Windows).

Maybe you have an idea what is causing this?

Thanks in advance
Hendrik


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Beremiz-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beremiz-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Beremiz-devel] Running Beremiz/PLCopen Editor on Mac OS

Beremiz-Devel mailing list
Hi Hendrik,

On 17-06-28 14:17, [hidden email] wrote:

> Dear developers,
>
> I am currently trying to run PLCopen Editor from Beremiz on Mac OS
> Sierra. I am aware of the discussion on this list that has been going on
> a few weeks ago.
>
> I am able to start the editor by doing the following:
>
> 1. Install MacPorts
>
> 2. Install python27, py27-pip and py27-wxpython-3.0 via MacPorts
>
> 3. Install pyro, nevow, numpy, matplotlib (version 1.4.3) and lxml via
> Python PIP
>
> It is essential to use matplotlib 1.4.3 since there seems to be some
> kind of issue with wxpython and/or matplotlib versions after 1.4.3 that
> leads to an error "unknown encoding" on Mac OS.
>
Thanks. We put this information eventually on the site. By the way
there is wiki for Beremiz.
Feel free to add you investigations there.

https://bitbucket.org/skvorl/beremiz/wiki/Home


> Now having set up all of the above, I am able to start PLCopen by
> running "python2 PLCOpenEditor.py" from the terminal. I can also open
> the example program HelloWorld
> (https://docs.google.com/uc?export=download&confirm=no_antivirus&id=0BwyThwktWLAla1pFWVl2ZjgxdTQ)
> from www.openplcproject.com via the open dialog.
>
> However, when double clicking on the "My_program" entry in the project
> tree on the left side the editor will crash with the following
> segmentation fault:
>
> Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
> 0 libwx_osx_cocoau_core-3.0.dylib 0x000000010cec3c54
> wxGraphicsPath::GetBox(double*, double*, double*, double*) const + 8
> 1 libwx_osx_cocoau_core-3.0.dylib 0x000000010cec389d
> wxGraphicsPath::GetBox() const + 43
> 2 libwx_osx_cocoau_core-3.0.dylib 0x000000010ce8ff69
> wxGCDCImpl::DoDrawEllipticArc(int, int, int, int, double, double) + 889
> 3 _gdi_.so 0x000000010d905339 _wrap_DC_DrawEllipticArc(_object*,
> _object*, _object*) + 873
...

> 73 org.python.python 0x000000010c1a0824 PyRun_FileExFlags + 164
> 74 org.python.python 0x000000010c1a035e PyRun_SimpleFileExFlags + 702
> 75 org.python.python 0x000000010c1b6b1d Py_Main + 2925
> 76 libdyld.dylib 0x00007fff9edd7235 start + 1
>
> The segfault seems to be triggered by dc.DrawEllipticArc() in the Draw()
> method of LD_Objects.py. I already started to investigate the issue but
> haven't been able to find a cause yet. This issue only occurs on Mac OS,
> on Linux it is running fine (haven't tried Windows).
>
> Maybe you have an idea what is causing this?
We don't have Mac OS and couldn't reproduce the problem neither on GNU/Linux nor on Windows.
I've looked at the code dc.DrawEllipticArc in Draw method and don't
see anything that could cause a problem.

But if you eventually fix the problem for you and the change will not
cause regressions on Windows and GNU/Linux, feel free to submit a
patch.
Happy hacking. ;-)


--
Best regards,
Andrey Skvortsov

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Beremiz-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beremiz-devel

signature.asc (849 bytes) Download Attachment
Loading...