I'm fairly new to GUI programming in general and Qt. I've been working on a project that is going well, but I've begun to get a program crash on program exit that I don't know how to debug:

The error is generated when I close the main window of the program:
*** glibc detected *** <project name>: double free or corruption (fasttop): 0x00000000024ab2a0 ***

I've seen in the forums that this is probably due to trying to free memory to a pointer that is already freed, but it happens on program exit, so I don't know where to look.

I'm using Qt4 on an Ubuntu 9.04 installation. In the project, I have several dialogs, a main window (which I haven't developed too much), and I'm also using a custom widget.

I suspect the custom widget. I have tried to remove portions of the code to isolate the problem, and I've discovered the following:

There is a dialog that I created using Qt Designer which includes two of the custom widgets. I am not even instantiating this dialog in the program, but I get the crash. However, if I remove the .cpp .h and .ui file from the project, the program works without the crash.

I would especially appreciate suggestions on how to debug the problem. I have no idea how to read the Backtrace dump that results from the crash, or how to proceed.