Results 1 to 4 of 4

Thread: glibc - double free or corruption error on system() call in Linux

  1. #1
    Join Date
    Jul 2008
    Posts
    9
    Qt products
    Qt4
    Platforms
    Windows

    Wink glibc - double free or corruption error on system() call in Linux

    I've searched through the boards, but have found nothing to help with this problem. I'm writing a program in c++ using Qt in linux, and when a box is checked I want it to run a bash script. I'm using the system("[script]") syntax. Even when I do something as basic as system("echo hello"); the program crashes with "*** glibc detected *** ./[program name] : double free or corruption (fasttop): [mem addr]" followed by a memory dump.

    I've tried calling it from my main thread and from my QThread class, and no luck. I've cleaned and recompiled, nothing. Why won't my linux system() call work at all?

    Thanks in advance.

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: glibc - double free or corruption error on system() call in Linux

    Hi, have you seen QProcess for calling other command line executables?

  3. #3
    Join Date
    Jul 2008
    Posts
    9
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: glibc - double free or corruption error on system() call in Linux

    Ah, thank you, no I had not

    I'll try it and ask if it doesn't work...

    Thanks!

  4. #4
    Join Date
    Jul 2008
    Posts
    9
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: glibc - double free or corruption error on system() call in Linux

    Awesome solution, thanks. Works like a charm.

Tags for this Thread

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.