Skip to content

Commit 93d4e76

Browse files
committed
Merge pull request RobotLocomotion#80 from patmarion/add-drake-visualizer-binary
Add drake visualizer binary
2 parents a3302a8 + 9e2cfbc commit 93d4e76

File tree

4 files changed

+16
-19
lines changed

4 files changed

+16
-19
lines changed

distro/superbuild/cmake/externals.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ endif()
150150
# PythonQt
151151
ExternalProject_Add(PythonQt
152152
GIT_REPOSITORY https://github.com/commontk/PythonQt.git
153-
GIT_TAG cbf890f
153+
GIT_TAG 00e6c6b2
154154
CMAKE_CACHE_ARGS
155155
${default_cmake_args}
156156
${qt_args}

src/app/consoleApp.cpp

+4-8
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,10 @@ int main(int argc, char **argv)
1010
PythonQt::self()->addVariable(PythonQt::self()->importModule("sys"), "executable", QCoreApplication::applicationFilePath());
1111
int result = Py_Main(argc, argv);
1212

13-
#ifdef Q_OS_MAC
14-
// On MacOSX, there is a crash during PythonQt's finalization cleanup
15-
// while destructing class metadata objects.
16-
#else
17-
// crashes on Ubuntu 14.04 with Qt version 4.8.6
18-
// this is a bug in PythonQt's finalize I think, to be investigated
19-
//delete pythonManager;
20-
#endif
13+
// delete pythonManager;
14+
// Allow a leak to avoid a segfault in the PythonQt cleanup destructor.
15+
// The segfault is fixed in upstream PythonQt, but we can't upgrade to
16+
// that version yet because of a compile issue on Ubuntu 12 + Qt 4.8.
2117

2218
return result;
2319
}

src/app/drakeVisualizerApp.cpp

+7-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,14 @@
55
int main(int argc, char **argv)
66
{
77
QApplication app(argc, argv);
8-
ddPythonManager pythonManager;
8+
ddPythonManager* pythonManager = new ddPythonManager;
99
PythonQt::self()->addVariable(PythonQt::self()->importModule("sys"), "executable", QCoreApplication::applicationFilePath());
10-
pythonManager.executeString("import ddapp.drakevisualizer; ddapp.drakevisualizer.main(globals())");
10+
pythonManager->executeString("import ddapp.drakevisualizer; ddapp.drakevisualizer.main(globals())");
11+
12+
// delete pythonManager;
13+
// Allow a leak to avoid a segfault in the PythonQt cleanup destructor.
14+
// The segfault is fixed in upstream PythonQt, but we can't upgrade to
15+
// that version yet because of a compile issue on Ubuntu 12 + Qt 4.8.
1116

1217
return 0;
1318
}

src/app/main.cpp

+4-8
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,10 @@ int main(int argc, char **argv)
2626

2727
delete window;
2828

29-
#ifdef Q_OS_MAC
30-
// On MacOSX, there is a crash during PythonQt's finalization cleanup
31-
// while destructing class metadata objects.
32-
#else
33-
// crashes on Ubuntu 14.04 with Qt version 4.8.6
34-
// this is a bug in PythonQt's finalize I think, to be investigated
35-
//delete pythonManager;
36-
#endif
29+
// delete pythonManager;
30+
// Allow a leak to avoid a segfault in the PythonQt cleanup destructor.
31+
// The segfault is fixed in upstream PythonQt, but we can't upgrade to
32+
// that version yet because of a compile issue on Ubuntu 12 + Qt 4.8.
3733

3834
return result;
3935
}

0 commit comments

Comments
 (0)