golems / grip2

Qt and OpenSceneGraph user interface for grip
1 stars 1 forks source link

CMake compiling error and core dumped #35

Open ana-GT opened 10 years ago

ana-GT commented 10 years ago

I checked out grip2 and tried to install it on my workstation (Ubuntu 12.04, 64 bits).

INSTALLATION ISSUES :

ISSUE 1:

CMake was not able to find QGLWidget:

/usr/local/include/osgQt/GraphicsWindowQt:24:21: fatal error: QGLWidget: No such file or directory

PROPOSED FIX 1:

Line 35 of grip2/CMakeLists.txt: Add QtOpenGL as a required module:

find_package(Qt4 COMPONENTS QtCore QtGui Qt3Support QtXml QtOpenGL REQUIRED)

ISSUE 2:

Linking error (probably due to my 64-bit machine)

Linking CXX executable grip [ 95%] Building CXX object CMakeFiles/grip-core.dir/qtWidgets/src/TreeView.cpp.o /home/ana/Software/grip2/include/gripTime.h:86: error: undefined reference to 'clock_gettime'

PROPOSED FIX 2:

Add rt in the library linking on grip2/CMakeLists.txt, line 86

target_link_libraries(mainWindow ${project_libs} ${DART_LIBRARIES} rt )

EXECUTION ERROR

I was able then to compile and install. However, when I try to run grip, I get this ugly core dumped error:

`ObjectWrapperManager::addCompressor(): 'null' already exists. ObjectWrapperManager::addCompressor(): 'zlib' already exists.

Threading model: 4 -- CullThreadPerCameraDrawThreadPerContext grip: malloc.c:3801: _int_malloc: Assertion (unsigned long)(size) >= (unsigned long)(nb)' failed. Aborted (core dumped)


Any idea about how to fix it would be greatly appreciated.

mxgrey commented 10 years ago

With respect to the clock_gettime error, I think we should use QTime instead of our own home-brewed cross-platform solution. As long as we're using Qt packages, we may as well take full advantage of it.

The run-time issue looks like a memory leak problem. I guess someone is going to need to valgrind it. Is there something in particular you're doing which produces this error, or does it just pop up shortly after execution?

petevieira commented 10 years ago

I agree with the you about QTime, since it does get down to ms resolution.

I'll have plenty of time tomorrow to debug this.

-Pete

On Tue, Apr 29, 2014 at 11:21 AM, Michael Grey notifications@github.comwrote:

With respect to the clock_gettime error, I think we should use QTime instead of our own home-brewed cross-platform solution. As long as we're using Qt packages, we may as well take full advantage of it.

The run-time issue looks like a memory leak problem. I guess someone is going to need to valgrind it. Is there something in particular you're doing which produces this error, or does it just pop up shortly after execution?

— Reply to this email directly or view it on GitHubhttps://github.com/golems/grip2/issues/35#issuecomment-41690232 .

Peter Vieira Masters Student Electrical & Computer Engineering Center for Robotics & Intelligent Machines Georgia Institute of Technology Pete.Vieira@gmail.com "I'm gonna be a ramblin' wreck from Georgia Tech and a hell of an engineer"

petevieira commented 10 years ago

Hey Ana,

Do you think you could run it in GDB and send me the backtrace?

Thanks,

Pete

On Tue, Apr 29, 2014 at 12:50 PM, Peter Vieira pete.vieira@gmail.comwrote:

I agree with the you about QTime, since it does get down to ms resolution.

I'll have plenty of time tomorrow to debug this.

-Pete

On Tue, Apr 29, 2014 at 11:21 AM, Michael Grey notifications@github.comwrote:

With respect to the clock_gettime error, I think we should use QTime instead of our own home-brewed cross-platform solution. As long as we're using Qt packages, we may as well take full advantage of it.

The run-time issue looks like a memory leak problem. I guess someone is going to need to valgrind it. Is there something in particular you're doing which produces this error, or does it just pop up shortly after execution?

— Reply to this email directly or view it on GitHubhttps://github.com/golems/grip2/issues/35#issuecomment-41690232 .

Peter Vieira Masters Student Electrical & Computer Engineering Center for Robotics & Intelligent Machines Georgia Institute of Technology Pete.Vieira@gmail.com "I'm gonna be a ramblin' wreck from Georgia Tech and a hell of an engineer"

Peter Vieira Masters Student Electrical & Computer Engineering Center for Robotics & Intelligent Machines Georgia Institute of Technology Pete.Vieira@gmail.com "I'm gonna be a ramblin' wreck from Georgia Tech and a hell of an engineer"

petevieira commented 10 years ago

The execution error was due to the user installing openscenegraph from source, which was an incompatible version. I verified which versions of openscenegrah are compatible with grip2 and adjusted the CMakeLists.txt to check for compatibility.

The time issue was temporarily fixed by adding rt as a dependency for the target, but QTime should probably be used. The precision of QTime is only milliseconds as opposed to clock_gettime's nanosecond precision, but that should suffice.