Logger2 icon indicating copy to clipboard operation
Logger2 copied to clipboard

Error in ./Logger2: realloc(): invalid pointer

Open Ihsees opened this issue 9 years ago • 4 comments

I can make the Logger2 project on Ubuntu 14.04

But when I try to run it through ./Logger2 I get:

*** Error in./Logger2': realloc(): invalid pointer: 0x00007f769dc3f840 *** Aborted (core dumped)`

I get the same error (with the same pointer adress) when trying to run Logger1 with the fix from https://github.com/mp3guy/Logger1/issues/1#issuecomment-163459765

This happens both when my kinectv1 is plugged in and when it's not.

Do you have any idea of what's going on?

I only have 3.5 GB of space on my drive. Could that have anything to do with it?

Ihsees avatar Mar 13 '16 17:03 Ihsees

I don't know, try building with debug symbols, disable optimisation and get a stack trace from gdb

mp3guy avatar Mar 13 '16 17:03 mp3guy

Thanks for the quick response!

I'm new to ubuntu and was quite happy about the way makefiles worked. I have spent the last few hours trying to figure out gcc to build with debug symbols.

However, this may take some more time. I will come back to this in the coming week or two.

Ihsees avatar Mar 13 '16 22:03 Ihsees

gdb gave me this:

(gdb) run
Starting program: /home/myuser/Logger2/build/Logger2 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
*** Error in `/home/myuser/Logger2/build/Logger2': realloc(): invalid pointer: 0x00007ffff6177840 ***

Program received signal SIGABRT, Aborted.
0x00007ffff4836cc9 in __GI_raise (sig=sig@entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56  ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x00007ffff4836cc9 in __GI_raise (sig=sig@entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007ffff483a0d8 in __GI_abort () at abort.c:89
#2  0x00007ffff4873394 in __libc_message (do_abort=do_abort@entry=1, 
    fmt=fmt@entry=0x7ffff4981b28 "*** Error in `%s': %s: 0x%s ***\n")
    at ../sysdeps/posix/libc_fatal.c:175
#3  0x00007ffff487e0f7 in malloc_printerr (action=<optimized out>, 
    str=0x7ffff497dd5d "realloc(): invalid pointer", ptr=<optimized out>)
    at malloc.c:4996
#4  0x00007ffff4883192 in __GI___libc_realloc (
    oldmem=0x7ffff6177840 <QListData::shared_null>, bytes=32) at malloc.c:2986
#5  0x00007ffff181ae3e in QListData::realloc(int) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007ffff181aefa in QListData::append(int) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007ffff1907d8c in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007ffff1903e29 in qRegisterResourceData(int, unsigned char const*, unsigned char const*, unsigned char const*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00007ffff17a6eb3 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#10 0x00007ffff7dea13a in call_init (l=<optimized out>, argc=argc@entry=1, 
    argv=argv@entry=0x7fffffffdeb8, env=env@entry=0x7fffffffdec8) at dl-init.c:78
#11 0x00007ffff7dea223 in call_init (env=<optimized out>, argv=<optimized out>, 
    argc=<optimized out>, l=<optimized out>) at dl-init.c:36
#12 _dl_init (main_map=0x7ffff7ffe1c8, argc=1, argv=0x7fffffffdeb8, env=0x7fffffffdec8)
    at dl-init.c:126
#13 0x00007ffff7ddb30a in _dl_start_user () from /lib64/ld-linux-x86-64.so.2
#14 0x0000000000000001 in ?? ()
#15 0x00007fffffffe261 in ?? ()
#16 0x0000000000000000 in ?? ()

Had to rebuild OpenCV without Qt, since it would always link to Qt5.

The GUI is loading now.

Ihsees avatar Mar 14 '16 19:03 Ihsees

Oh, yes there's definitely issues with OpenCV and Qt5. I would get everything built with Qt4 only.

mp3guy avatar Mar 14 '16 20:03 mp3guy