Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

CIGI example host crashes

Jim
2012-05-11
2013-05-20
  • Jim
    Jim
    2012-05-11

    Hello

    I am having problems trying to run the examples in the CIGI Class Library on Scientific Linux 6.2 64bit and I would appreciate any assistance.

    I downloaded ccl_3_3_3.tar.gz and extracted it into /tmp. `./configure && make` had no errors so as root I installed it with `make install`. I then did a cd into /tmp/cigi/ccl/examples/CigiMiniHost and I had to resolve a few issues.

    First: `export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/:$PKG_CONFIG_PATH` in order for pkg-config to work. I don't know why it doesn't automatically pick it up.

    Second: Build TinyXML. I used tinyxml_2_6_2.zip and extracted it into /tmp/cigi/ccl/examples/tinyxml. Inside that directory I ran `make` and then `ar rc TinyXML.a tinyxmlerror.o tinystr.o tinyxml.o tinyxmlparse.o` to create the TinyXML.a file required by CigiMiniHost makefile.

    Back in the /tmp/cigi/ccl/examples/CigiMiniHost directory I can now run make without errors.
    _____________________________________________________

    $ make
    g++ -Wall -g -D__cplusplus `pkg-config --cflags cigicl` -I../tinyxml -c MiniHost.cpp
    MiniHost.cpp: In function ‘int main(int, char**)’:
    MiniHost.cpp:241: warning: unused variable ‘sentBytes’
    g++ -Wall -g -D__cplusplus `pkg-config --cflags cigicl` -I../tinyxml -c DefaultProc.cpp
    g++ -Wall -g -D__cplusplus `pkg-config --cflags cigicl` -I../tinyxml -c SOFP.cpp
    SOFP.cpp: In member function ‘virtual void SOFP::OnPacketReceived(CigiBasePacket*)’:
    SOFP.cpp:57: warning: unused variable ‘sof’
    g++ -Wall -g -D__cplusplus `pkg-config --cflags cigicl` -I../tinyxml -c AnimStop.cpp
    g++ -Wall -g -D__cplusplus `pkg-config --cflags cigicl` -I../tinyxml -c Network.cpp
    g++ \
        -o CigiMiniHost \
        MiniHost.o DefaultProc.o SOFP.o AnimStop.o Network.o \
        ../tinyxml/TinyXML.a -lm -lpthread \
        `pkg-config --libs cigicl`
    

    _____________________________________________________

    An `ls` shows CigiMiniHost. Great! Until I try to run it that is…
    _____________________________________________________

    $./CigiMiniHost 
    *** glibc detected *** ./CigiMiniHost: free(): invalid pointer: 0x000000000061b978 ***
    ======= Backtrace: =========
    /lib64/libc.so.6[0x3f14075296]
    /usr/lib64/libstdc++.so.6(_ZNSsD1Ev+0x39)[0x3f1d89d4c9]
    ./CigiMiniHost[0x403382]
    ./CigiMiniHost[0x402ef1]
    ./CigiMiniHost[0x402675]
    /lib64/libc.so.6(__libc_start_main+0xfd)[0x3f1401ecdd]
    ./CigiMiniHost[0x402599]
    ======= Memory map: ========
    00400000-00413000 r-xp 00000000 08:01 3050                               /tmp/cigi/ccl/examples/CigiMiniHost/CigiMiniHost
    00613000-00614000 rw-p 00013000 08:01 3050                               /tmp/cigi/ccl/examples/CigiMiniHost/CigiMiniHost
    00614000-0061c000 rw-p 00000000 00:00 0 
    02251000-02272000 rw-p 00000000 00:00 0                                  [heap]
    3f13800000-3f13820000 r-xp 00000000 08:01 794343                         /lib64/ld-2.12.so
    3f13a1f000-3f13a20000 r--p 0001f000 08:01 794343                         /lib64/ld-2.12.so
    3f13a20000-3f13a21000 rw-p 00020000 08:01 794343                         /lib64/ld-2.12.so
    3f13a21000-3f13a22000 rw-p 00000000 00:00 0 
    3f14000000-3f14186000 r-xp 00000000 08:01 794344                         /lib64/libc-2.12.so
    3f14186000-3f14386000 ---p 00186000 08:01 794344                         /lib64/libc-2.12.so
    3f14386000-3f1438a000 r--p 00186000 08:01 794344                         /lib64/libc-2.12.so
    3f1438a000-3f1438b000 rw-p 0018a000 08:01 794344                         /lib64/libc-2.12.so
    3f1438b000-3f14390000 rw-p 00000000 00:00 0 
    3f14400000-3f14417000 r-xp 00000000 08:01 794352                         /lib64/libpthread-2.12.so
    3f14417000-3f14616000 ---p 00017000 08:01 794352                         /lib64/libpthread-2.12.so
    3f14616000-3f14617000 r--p 00016000 08:01 794352                         /lib64/libpthread-2.12.so
    3f14617000-3f14618000 rw-p 00017000 08:01 794352                         /lib64/libpthread-2.12.so
    3f14618000-3f1461c000 rw-p 00000000 00:00 0 
    3f14800000-3f14883000 r-xp 00000000 08:01 794367                         /lib64/libm-2.12.so
    3f14883000-3f14a82000 ---p 00083000 08:01 794367                         /lib64/libm-2.12.so
    3f14a82000-3f14a83000 r--p 00082000 08:01 794367                         /lib64/libm-2.12.so
    3f14a83000-3f14a84000 rw-p 00083000 08:01 794367                         /lib64/libm-2.12.so
    3f19400000-3f19416000 r-xp 00000000 08:01 794372                         /lib64/libgcc_s-4.4.6-20110824.so.1
    3f19416000-3f19615000 ---p 00016000 08:01 794372                         /lib64/libgcc_s-4.4.6-20110824.so.1
    3f19615000-3f19616000 rw-p 00015000 08:01 794372                         /lib64/libgcc_s-4.4.6-20110824.so.1
    3f1d800000-3f1d8e8000 r-xp 00000000 08:01 159808                         /usr/lib64/libstdc++.so.6.0.13
    3f1d8e8000-3f1dae8000 ---p 000e8000 08:01 159808                         /usr/lib64/libstdc++.so.6.0.13
    3f1dae8000-3f1daef000 r--p 000e8000 08:01 159808                         /usr/lib64/libstdc++.so.6.0.13
    3f1daef000-3f1daf1000 rw-p 000ef000 08:01 159808                         /usr/lib64/libstdc++.so.6.0.13
    3f1daf1000-3f1db06000 rw-p 00000000 00:00 0 
    7f2073a9d000-7f2073aa2000 rw-p 00000000 00:00 0 
    7f2073aa2000-7f2073b48000 r-xp 00000000 08:01 1185175                    /usr/local/SubrScene.12X/lib/libcigicl.so.0.0.0
    7f2073b48000-7f2073d47000 ---p 000a6000 08:01 1185175                    /usr/local/SubrScene.12X/lib/libcigicl.so.0.0.0
    7f2073d47000-7f2073d4d000 rw-p 000a5000 08:01 1185175                    /usr/local/SubrScene.12X/lib/libcigicl.so.0.0.0
    7f2073d4d000-7f2073d4e000 rw-p 00000000 00:00 0 
    7f2073d61000-7f2073d63000 rw-p 00000000 00:00 0 
    7fff1eac2000-7fff1ead7000 rw-p 00000000 00:00 0                          [stack]
    7fff1ebff000-7fff1ec00000 r-xp 00000000 00:00 0                          [vdso]
    ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
    Aborted
    

    _____________________________________________________

    We have attempted to debug this with gdb - it seems to be crashing when the call to ReadConfig() returns in the main() program (in MiniHost.cpp).  Just before it crashes, the debugger has us inside tinyxml.h on a call to ~TiXmlDocument() (line 1409).  The exact same thing happens when we try to run DummyIG.  So far, we can't figure out what is wrong. I was hoping maybe someone here could help us out.

    Thanks!

     
  • Jim
    Jim
    2012-05-11

    Oops, I meant to post this to the CIGI topics.  Next question: how do I delete that post ^

     
  • Jim
    Jim
    2012-05-11

    I didn't mean to post this here, and don't think I can delete it.  Admins, feel free to delete it.