Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Argos segfault when running with wxPython 4.1.0 #200

Open
criusx opened this issue Aug 28, 2020 · 1 comment
Open

Argos segfault when running with wxPython 4.1.0 #200

criusx opened this issue Aug 28, 2020 · 1 comment
Labels
component: pipeViewer Issue is related to the Helios Pipeline Viewer

Comments

@criusx
Copy link
Contributor

criusx commented Aug 28, 2020

Running under Ubuntu 20.04, though not strictly necessary, pip3 install wxPython==4.1.0, run the CoreExample, then argos.py and you will see a segfault when trying to call DrawItem(). This happens at core.pyx:550 when tryint to update the annotation. Workaround is to revert to a lower wxPython (e.g. pip3 install wxPython==4.0.7). Hope this saves somebody trouble since 4.1.0 is the latest and default version now. Nothing in the 4.1.0 release notes seems to indicate this would happen. Ideally argos can work with all versions of wxPython Phoenix(>v4) and will exit with an error message if an unsupported version is loaded. This isn't urgent, but someone else familiar with the code may be able to fix it easily.

#0 0x0000000000000003 in () #1 0x00007ffff6009bd5 in wxGCDCImpl::DoDrawBitmap(wxBitmap const&, int, int, bool) () at /usr/local/lib/python3.8/dist-packages/wx/libwx_gtk3u_core-3.1.so.4 #2 0x00007fffef5c7d5f in wxDC::DrawText(wxString const&, int, int) (this=0x2271490, y=20, x=421, text=...) at /usr/include/wx-3.0/wx/dc.h:1218 #3 __pyx_pf_4core_8Renderer_20drawInfoRectangle (__pyx_v_short_format=<optimized out>, __pyx_v_schedule_settings=<optimized out>, __pyx_v_clip_x=<optimized out>, __pyx_v_auto_color=<optimized out>, __pyx_v_content_type=<optimized out>, __pyx_v_missing_needed_loc=<optimized out>, __pyx_v_annotation=<optimized out>, __pyx_v_re ct=<optimized out>, __pyx_v_canvas=<optimized out>, __pyx_v_dc=<optimized out>, __pyx_v_element=<optimized out>, __pyx_v_tick=<optimized out>, __pyx_v_self=0x7fffeec27c70) at /home/osboxes/map/helios/pipeViewer/pipe_view/core/src/core.cpp:8219 #4 __pyx_pw_4core_8Renderer_21drawInfoRectangle(PyObject*, PyObject*, PyObject*) (__pyx_v_self=0x7fffeec27c70, __pyx_args=<optimized out>, __pyx_kwds=<optimized out>) at /home/osboxes/map/helios/pipeViewer/pipe_view/core/src/core.cpp:6604

@criusx criusx added the component: pipeViewer Issue is related to the Helios Pipeline Viewer label Aug 28, 2020
@bdutro
Copy link
Contributor

bdutro commented Oct 5, 2020

I've reproduced this on my system, and at least for me the problem was that core.so was linking against wxWidgets 3.0.5 (my system-installed version), but wxPython 4.1.0 was linking against its own bundled build of wxWidgets 3.1.4. Forcing core.so to link against wxWidgets 3.1.4 fixed the problem.

Unfortunately, the pip installation of wxPython doesn't include the wx-config utility, so getting this to build cleanly requires doing the following:

  1. Manually build and install wxPython somewhere:
pip download -d . wxpython
tar xf wxPython-4.1.0.tar.gz
cd wxPython-4.1.0.tar.gz
pip install .
  1. Build map with GTK3 and wxPython 4.1.0 fixes:
cd map
git checkout gtk3-fixes
mkdir release
cd release
cmake -DCMAKE_BUILD_TYPE=Release ..
WX_CONFIG=path/to/wxPython-4.1.0/build/wxbld/gtk3/wx-config make

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: pipeViewer Issue is related to the Helios Pipeline Viewer
Projects
None yet
Development

No branches or pull requests

2 participants