Bug 267196 - Crash when using the change data file
Summary: Crash when using the change data file
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 2.0.3
Platform: Compiled Sources Linux
: HI crash
Target Milestone: 2.0.3
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-26 19:04 UTC by Nicolas Brisset
Modified: 2011-02-26 22:04 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Brisset 2011-02-26 19:04:46 UTC
Version:           2.0.3
OS:                Linux

Using the change data file leads to a crash

Reproducible: Always

Steps to Reproduce:
- Load CStk vs INDEX from the TWIN1xxx.txt file in src/sample_data
- Call the change data file tool, select all vectors from TWIN1
- Select the duplicate option, including dependents
- Click OK or Apply => crash

Actual Results:  
It crashes

Expected Results:  
It duplicates the vectors and curves, as it used to not so long ago...

It seems to be an off-by-one index. dup_output_prims has only 12 items while output_prims has 13...

Here is the backtrace:

ASSERT failure in QList<T>::at: "index out of range", file /usr/include/QtCore/qlist.h, line 456

0	__kernel_vsyscall		0	0xffffe424	
1	raise	/lib/libc.so.6	0	0xb6c377ff	
2	abort	/lib/libc.so.6	0	0xb6c39140	
3	qt_message_output	qglobal.cpp	2282	0xb7b4ea1a	
4	qt_message	qglobal.cpp	2328	0xb7b4ec1f	
5	qFatal	qglobal.cpp	2511	0xb7b4ed38	
6	qt_assert_x	qglobal.cpp	2035	0xb7b4ed7d	
7	QList<Kst::SharedPtr<Kst::Primitive> >::at	qlist.h	456	0x81fc8fc	
8	Kst::ChangeFileDialog::apply	changefiledialog.cpp	326	0x81f8930	
9	Kst::ChangeFileDialog::OKClicked	changefiledialog.cpp	270	0x81f83a9	
10	Kst::ChangeFileDialog::qt_metacall	moc_changefiledialog.cxx	102	0x8282037	
11	QMetaObject::metacall	qmetaobject.cpp	237	0xb7c5ce5d	
12	QMetaObject::activate	qobject.cpp	3272	0xb7c6cffc	
13	QAbstractButton::clicked(bool)	/usr/lib/libQtGui.so.4	0	0xb789d60d	
14	??	/usr/lib/libQtGui.so.4	0	0xb759575d	
15	??	/usr/lib/libQtGui.so.4	0	0xb759704b	
16	QAbstractButton::mouseReleaseEvent(QMouseEvent*)	/usr/lib/libQtGui.so.4	0	0xb7597306	
17	QWidget::event(QEvent*)	/usr/lib/libQtGui.so.4	0	0xb71c96d0	
18	QAbstractButton::event(QEvent*)	/usr/lib/libQtGui.so.4	0	0xb7596310	
19	QPushButton::event(QEvent*)	/usr/lib/libQtGui.so.4	0	0xb76385e8	
20	QApplicationPrivate::notify_helper(QObject*, QEvent*)	/usr/lib/libQtGui.so.4	0	0xb716e414	
...	<plus>
Comment 1 Nicolas Brisset 2011-02-26 19:06:14 UTC
I think we have to fix this before 2.0.3 final. It shouldn’t be too hard...
Barth, can you have a look, I think you're the most familiar with that part of the codebase.
Comment 2 Netterfield 2011-02-26 22:04:19 UTC
SVN commit 1222872 by netterfield:

BUG: 267196
Fix crash case when units, etc of new file are not picked up in 'duplicate file'.

This exposes another bug: why aren't the units properly picked up?



 M  +3 -1      changefiledialog.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1222872