Results 1 to 5 of 5

Thread: Uncleare things with memore free()

  1. #1
    Join Date
    Jul 2016
    Posts
    41
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Uncleare things with memore free()

    Hello, everyone!

    I had an app working good on Win, then I translated it to Ubuntu. It also works okay, but when I close it, I got this message from Qt Creator below:

    Qt Code:
    1. *** Error in `/home/ivan/build-visual_boltz-Desktop_Qt_5_8_0_GCC_64bit-Release/visual_boltz': free(): invalid pointer: 0x0000000002155490 ***
    2. ======= Backtrace: =========
    3. /lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7fd210d027e5]
    4. /lib/x86_64-linux-gnu/libc.so.6(+0x7fe0a)[0x7fd210d0ae0a]
    5. /lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7fd210d0e98c]
    6. /home/ivan/Qt/5.8/gcc_64/lib/libQt5Core.so.5(+0x93569)[0x7fd21167f569]
    7. /home/ivan/Qt/5.8/gcc_64/lib/libQt5Core.so.5(+0x93629)[0x7fd21167f629]
    8. /lib/x86_64-linux-gnu/libc.so.6(+0x39ff8)[0x7fd210cc4ff8]
    9. /lib/x86_64-linux-gnu/libc.so.6(+0x3a045)[0x7fd210cc5045]
    10. /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf7)[0x7fd210cab837]
    11. /home/ivan/build-visual_boltz-Desktop_Qt_5_8_0_GCC_64bit-Release/visual_boltz[0x405db9]
    12. ======= Memory map: ========
    13. 00400000-0040f000 r-xp 00000000 fc:00 16517220 /home/ivan/build-visual_boltz-Desktop_Qt_5_8_0_GCC_64bit-Release/visual_boltz
    14. 0060f000-00610000 r--p 0000f000 fc:00 16517220 /home/ivan/build-visual_boltz-Desktop_Qt_5_8_0_GCC_64bit-Release/visual_boltz
    15. 00610000-00611000 rw-p 00010000 fc:00 16517220 /home/ivan/build-visual_boltz-Desktop_Qt_5_8_0_GCC_64bit-Release/visual_boltz
    16.  
    17. 7fd21311d000-7fd213130000 rw-p 00000000 00:00 0
    18. 7fd213130000-7fd213131000 r--s 00000000 fc:00 9441977 /var/cache/fontconfig/b9d506c9ac06c20b433354fa67a72993-le64.cache-6
    19. 7fd213131000-7fd213132000 r--s 00000000 fc:00 9446948 /var/cache/fontconfig/551ecf3b0e8b0bca0f25c0944f561853-le64.cache-6
    20. 7fd213132000-7fd213133000 r--s 00000000 fc:00 9446947 /var/cache/fontconfig/30829fa25452a46451e813d634d7f916-le64.cache-6
    21. 7fd213133000-7fd21313e000 r--s 00000000 fc:00 9446945 /var/cache/fontconfig/83bf95040141907cd45bb53cf7c1c148-le64.cache-6
    22. 7fd21313e000-7fd213184000 r--p 00000000 fc:00 5505617 /usr/share/glib-2.0/schemas/gschemas.compiled
    23. 7fd213184000-7fd2131b3000 r--p 00000000 fc:00 5767550 /usr/share/locale-langpack/ru/LC_MESSAGES/libc.mo
    24. 7fd2131b3000-7fd213233000 r-xp 00000000 fc:00 17302022 /lib/x86_64-linux-gnu/libsystemd.so.0.14.0
    25. 7fd213233000-7fd213236000 r--p 0007f000 fc:00 17302022 /lib/x86_64-linux-gnu/libsystemd.so.0.14.0
    26. 7fd213236000-7fd213237000 rw-p 00082000 fc:00 17302022 /lib/x86_64-linux-gnu/libsystemd.so.0.14.0
    27. 7fd213237000-7fd21324a000 rw-p 00000000 00:00 0
    28. 7fd21324a000-7fd21324b000 r--s 00000000 fc:00 9441973 /var/cache/fontconfig/0c9eb80ebd1c36541ebe2852d3bb0c49-le64.cache-6
    29. 7fd21324b000-7fd21324e000 r--s 00000000 fc:00 9446946 /var/cache/fontconfig/75114ca45c98e8a441da0ff356701271-le64.cache-6
    30. 7fd21324e000-7fd213251000 r--s 00000000 fc:00 9438364 /var/cache/fontconfig/e13b20fdb08344e0e664864cc2ede53d-le64.cache-6
    31. 7fd213251000-7fd213255000 r--s 00000000 fc:00 9438328 /var/cache/fontconfig/7ef2298fde41cc6eeb7af42e48b7d293-le64.cache-6
    32. 7fd213255000-7fd213259000 r--p 00000000 fc:00 15754100 /home/ivan/.config/dconf/user
    33. 7fd213259000-7fd21325a000 r--s 00000000 00:2b 31 /run/user/1000/dconf/user
    34. 7fd21325a000-7fd213261000 r--s 00000000 fc:00 3935722 /usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache
    35. 7fd213261000-7fd213264000 rw-p 00000000 00:00 0
    36. 7fd213264000-7fd213265000 r--p 00025000 fc:00 17305957 /lib/x86_64-linux-gnu/ld-2.23.so
    37. 7fd213265000-7fd213266000 rw-p 00026000 fc:00 17305957 /lib/x86_64-linux-gnu/ld-2.23.so
    38. 7fd213266000-7fd213267000 rw-p 00000000 00:00 0
    39. 7ffc14b35000-7ffc14b56000 rw-p 00000000 00:00 0 [stack]
    40. 7ffc14bdf000-7ffc14be1000 r--p 00000000 00:00 0 [vvar]
    41. 7ffc14be1000-7ffc14be3000 r-xp 00000000 00:00 0 [vdso]
    42. ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
    To copy to clipboard, switch view to plain text mode 

    What is the reason of that, how to handle it and can it cause new errors?

    Thanks!

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Uncleare things with memore free()

    Run a debug version of the application in a debugger.
    The debugger will stop on the offending line.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Jul 2016
    Posts
    41
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Uncleare things with memore free()

    Thank you for your reply.

    But I cannot run a debugger because it works fine. no crush!
    When I close myself Qt Creator gives these lines

  4. #4
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Uncleare things with memore free()

    This is a crash while shutting down your application.
    Run it in a debugger, and close it the same way you do when you run it without a debugger.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  5. #5
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,316
    Thanks
    314
    Thanked 870 Times in 857 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Uncleare things with memore free()

    This is a crash while shutting down your application.
    This might be due to trying to delete an object instance that has already been deleted. If this is the same program with the QSplineSeries, setting the series on the chart causes the chart to take ownership of it. When the chart instance goes out of scope, it will delete the series. So if you are also deleting it, then that would probably cause the crash.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. QExtSerialPort does weired things!
    By xtlc in forum Qt Programming
    Replies: 8
    Last Post: 9th August 2013, 09:33
  2. Things to inlcude in an LGPL distribution
    By The physicist in forum Installation and Deployment
    Replies: 23
    Last Post: 10th January 2011, 15:25
  3. What to free or not to free, that is the question
    By bruccutler in forum Qt Programming
    Replies: 1
    Last Post: 25th July 2007, 05:04
  4. Replies: 4
    Last Post: 10th March 2007, 04:28
  5. Replies: 2
    Last Post: 14th February 2006, 15:28

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.