[Qt-interest] SegFaults I cannot interpret
Andrea Franceschini
therealmorpheu5 at gmail.com
Wed Feb 25 11:06:51 CET 2009
2009/2/24 Thiago Macieira <thiago.macieira at trolltech.com>:
> When you're out of other options, you can always resort to reducing your
> code until you can no longer reproduce the problem.
Actually I did that and both cases happened:
1. I got apparently rid of the problem without reducing that much the code
2. I still got the problem after a heavy strip down.
Let me point out that the simple non-existence of this problem is
quite hard to track because if it does exist, it may not show up at a
given time and if it doesn't exist, you'll never be sure.
> You'll also have a much smaller codebase which you can send to mailing
> lists and ask for help.
For any toy example I tried to construct, I never had the problem
again so I was simply forced to send all the source I knew was faulty.
> So, my guesses are:
> 1) Doodle::Painter::paint is accessing a QList object before it is
> initialised or after it was deleted
This is the reason for which I put mutexes around the regions that
accessed those objects, and it didn't change anything.
Is there any chance I can detect such a case from the code and behave
accordingly?
> 2) you've got a memory overrun somewhere and you're writing garbage to
> QList::d
Isn't this a thing that valgrind is supposed to tell me?
--
Andrea
More information about the Qt-interest-old
mailing list