On Fri, Jul 04, 2008 at 11:19:43AM -0400, Jorge Arellano Cid wrote:
On Thu, Jul 03, 2008 at 04:09:19PM +0200, Johannes Hofmann wrote:
Hi,
now I have a reliable way to reproduce the problem. On DragonFly I use debug malloc options, but valgrind should also work. Even without any debug features I can crash dillo that way, but it takes longer.
* Choose a rather long page that does not fit on the screen with lot's of links. I use my bookmarks page.
* Start the search dialog and enter a very common string e.g. 2 chars and hold the Enter key down. Dillo now scrolls through the page over and over again.
* Now click the 1. mouse button and move the mouse like crazy over the scrolling page so arbitrary text gets selected and deselected.
That crashes dillo pretty soon for me.
Funny as it may look, I can't reproduce it here. Maybe it's not strange because we've already noticed DragonFly handles memory in a different way than GNU/Linux.
I could crash it like this under valgrind on a linux box.
Attached patch fixes the problem here. Please test and check for potential memory leaks. BTW, the patch fixes one leak in Iterator::scrollTo().
Committed both.
I gave it a review:
[OK] new DeepIterator [OK] DeepIterator *DeepIterator::createVariant(Iterator *it) [OK] object::Object *DeepIterator::clone () OK cloneDeepIterator() TableIterator() \ Not reviewed because thay don't inherit TextblockIterator() / from DeepIterator [OK][2] SelectionState::buttonPress()
Thanks for reviewing.
BTW, it's in things like this that I really dislike C++...
Yes, it can get tricky. On the other hand C++ in dillo is pretty harmless compared to other projects :-) Cheers, Johannes