Hi,<div><br></div><div>no testing done, but I think the problem is that the resizing always happens. However right before there is a code-path which can lead to the model being set to 0. If there's no model, there's also no header and hence the mapping of logical to visual index will probably  yield an invalid value. So I guess the right fix is to move the code into the if-branch.</div>
<div><br></div><div>Andreas<br><br><div class="gmail_quote">On Mon, Jul 16, 2012 at 4:12 PM, Andras Mantia <span dir="ltr"><<a href="mailto:amantia@kde.org" target="_blank">amantia@kde.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Aleix,<br>
<br>
On Monday, July 09, 2012 04:25:03 AM Aleix Pol wrote:<br>
> Git commit af7c5aecd6f43c9d023168077b3b6401dc6a43af by Aleix Pol.<br>
> Committed on 04/07/2012 at 00:05.<br>
> Pushed by apol into branch 'master'.<br>
><br>
> Improve the frame stack column sizes<br>
><br>
> Use a minimum size (contents) for the depth column in the frame stack<br>
<br>
This commit makes my KDevelop crash everytime I start the debugger (or attach<br>
to a process).<br>
It asserts in QHeaderView:<br>
[...]<br>
#8  0x00007fe26c167d63 in qt_message_output (msgType=QtFatalMsg, buf=0x481bbd8<br>
"ASSERT: \"visual != -1\" in file itemviews/qheaderview.cpp, line 1175") at<br>
global/qglobal.cpp:2260<br>
#9  0x00007fe26c167ed6 in qt_message(QtMsgType, const char *, typedef<br>
__va_list_tag __va_list_tag *) (msgType=QtFatalMsg, msg=0x7fe26c32a228<br>
"ASSERT: \"%s\" in file %s, line %d", ap=0x7fff4f8fb168) at<br>
global/qglobal.cpp:2306<br>
#10 0x00007fe26c168666 in qFatal (msg=0x7fe26c32a228 "ASSERT: \"%s\" in file<br>
%s, line %d") at global/qglobal.cpp:2489<br>
#11 0x00007fe26c167928 in qt_assert (assertion=0x7fe26b9d83a0 "visual != -1",<br>
file=0x7fe26b9d8378 "itemviews/qheaderview.cpp", line=1175) at<br>
global/qglobal.cpp:2007<br>
#12 0x00007fe26b79804e in QHeaderView::setResizeMode (this=0x26cee30,<br>
logicalIndex=0, mode=QHeaderView::ResizeToContents) at<br>
itemviews/qheaderview.cpp:1175<br>
#13 0x00007fe26e1261b0 in KDevelop::FramestackWidget::currentThreadChanged<br>
(this=0x26c7e70, thread=-1) at /encrypted/home/andris/development/sources/kde-<br>
trunk/kdevplatform/debugger/framestack/framestackwidget.cpp:177<br>
<br>
<br>
See <a href="http://paste.kde.org/518228/" target="_blank">http://paste.kde.org/518228/</a>.<br>
<br>
Andras<br>
<br>
><br>
> M  +1    -0    debugger/framestack/framestackwidget.cpp<br>
><br>
> <a href="http://commits.kde.org/kdevplatform/af7c5aecd6f43c9d023168077b3b6401dc6a43af" target="_blank">http://commits.kde.org/kdevplatform/af7c5aecd6f43c9d023168077b3b6401dc6a43af</a><br>
><br>
> diff --git a/debugger/framestack/framestackwidget.cpp<br>
> b/debugger/framestack/framestackwidget.cpp index 4b1025c..b3765da 100644<br>
> --- a/debugger/framestack/framestackwidget.cpp<br>
> +++ b/debugger/framestack/framestackwidget.cpp<br>
> @@ -174,6 +174,7 @@ void<br>
> KDevelop::FramestackWidget::currentThreadChanged(int thread)<br>
> m_threads->selectionModel()->clear();<br>
>          m_frames->setModel(0);<br>
>      }<br>
> +    m_frames->header()->setResizeMode(0, QHeaderView::ResizeToContents);<br>
>  }<br>
><br>
>  void KDevelop::FramestackWidget::currentFrameChanged(int frame)<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
KDevelop-devel mailing list<br>
<a href="mailto:KDevelop-devel@kdevelop.org">KDevelop-devel@kdevelop.org</a><br>
<a href="https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel" target="_blank">https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel</a><br>
</font></span></blockquote></div><br></div>