Summary: | Konqueror crashes if an input line has focus and the profile is changed to "File Management" | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | Frank Reininghaus <frank78ac> |
Component: | khtml | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | frank78ac, germain, mail, martin.sandsmark |
Priority: | NOR | ||
Version: | 4.1.2 | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Suggested patch
Alternative (probably better) patch |
Description
Frank Reininghaus
2008-10-24 22:58:32 UTC
Sorry, the OS is Linux not IRIX, of course ;-) Created attachment 28122 [details]
Suggested patch
This patch fixes it for me.
Created attachment 28125 [details]
Alternative (probably better) patch
It's probably sufficient to clear the focus in ~RenderFormElement(), not in ~RenderWidget(). I would guess that this crash occurs only with form elements, so it's not necessary to have every RenderWidget check on destruction if it's got the focus.
looks fine to me, thanks! I prefer your version (1) though (it keeps widget related cleanups all at the same place and tests for null m_widget) (In reply to comment #4) Actually, I thought of the null test just after I attached the second patch, this could easily be added to that patch as well ;-) Maybe it's really more elegant to have all the cleanup stuff in the same place. I just thought that it might be better not to add too much unneeded overhead to the destruction of every single widget. not a matter of elegance, just easier for the maintening mind... besides I see no obvious reason this would be guarantedly specific to form widgets -> better safe than sorry. as for the overhead, any widget has an overhead many magnitudes higher than such a method (so it is negligible) If nothing of the above convinces you, then just commit the version you prefer because I certainly do not care *all* that much :) (In reply to comment #6) I don't care all that much either, but you're right: making future maintenance easier is certainly a strong point for version 1 :-) > just commit the version you prefer I don't have an SVN account, so it would be nice if you could do that. Yay, fantastic work Frank. Thank you! @Germain: bug #171179 looks like a dup of this one :) SVN commit 885366 by ggarand: Apply patch by Frank Reininghaus <frank78ac googlemail com> : properly clear the focus on form widgets, to avoid crashing when changing the view profile. BUG: 173473 M +2 -0 render_replaced.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=885366 SVN commit 885374 by ggarand: automatically merged revision 885366: Apply patch by Frank Reininghaus <frank78ac googlemail com> : properly clear the focus on form widgets, to avoid crashing when changing the view profile. BUG: 173473 M +2 -0 render_replaced.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=885374 *** Bug 171179 has been marked as a duplicate of this bug. *** |