[KDE-India] Problem with QHttp

Till Adam adam at kde.org
Mon May 22 08:39:04 CEST 2006


On Monday 22 May 2006 08:05, Aditya Mooley wrote:
> On 5/21/06, Till Adam <adam at kde.org> wrote:
> > Got it, I think. You'll need to add a:
> >
> >   if ( requestId != httpGetId ) return;
> >
> > at the top of:
> >
> > void kdeTest::httpRequestFinished(int requestId, bool error)
> >
> > setHost() schedules a request, and get() schedules the next one.
> > The handler is called first for the setHost request, deletes the
> > file pointer, which the following attempt to satisfy the get()
> > request access. Boom.
> >
> > Valgrind is a great tool for debugging these kinds of things, btw.
> > It showed immediately where the illegal memory access was, and
> > where that memory was deleted from.
>
> Great!! That solved it .
> Must really spend more time trying to read how to use Valgrind and
> more importantly how to make sense out of backtrace. Any pointers for
> the later?

Practise helps. That's why bugfixing things in KDE is such a worthwhile 
thing to do. ;) Just pick a crash bug in any part of KDE you like from 
bugzilla and try to fix it. If you get stuck and have trouble 
interpreting the backtrace, post it here, or show it to someone who 
knows that code on IRC. Most people will be happy to help you make 
sense of it, if you are coming across as someone who's trying to help 
and learn. And there's nothing like that feeling of knowing that in 
3.5.3 doing "this and then this and then that" crashes kate, but in 
3.5.4 it won't, and that's because you fixed it.

Writing new code is easy, being able to analyze and fix tricky stuff 
separates the grownups from the grashoppers, in my opinion. ;)

Till
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-india/attachments/20060522/6a28766b/attachment.pgp 


More information about the KDE-india mailing list