ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
This is weird. So, I started getting an error message from a qt application I wanted to add a new feature to. The error is: *** glibc detected *** ./myprogram: double free or corruption (!prev): 0x08df0148 ***
A quick hit on google revealed what I thought would normally be the cause, a bad free(). Now, I had upgraded my harddrive to an ssd recently and the code was just copied over from the old hdd, so I thought maybe there was something wrong with my build environment. After a bit of searching, I couldn't find anything. I think I used the same parameters to recompile it and my environmental variables seem to be good.I finally just plugged in the old drive and ran the unmodified, untouched program off of that one. Same error. Now I didn't remember getting that error the last time, so I rebooted into the old drive and ran it. No errors. And then I ran my newly-compiled, fresh-off-the-ssd version and it worked perfectly. Very weird.
If anyone knows what might be causing this, any help would be appreciated. Also, both are running Fedora 13 with 686 PAE kernels and the program in question is a C++ qt app which appears to be generating these errors from a call to QSqlQuery::exec().
That error means your program called free twice on the same pointer, which might not always happen since Qt applications take different courses depending on how you interact with them. There are three things that will help:
Try to track all of your new or malloc pointers in the source code to see if they might be freed twice in some cases
Compile with debug symbols and run your program with gdb until you get this error, then run a stack backtrace
Run your program with valgrind to look for allocation-related problems at runtime (you might do this in conjunction with gdb)