Bug 164002 - Kst crashes after accessing the flagVector array of the VectorView Class
Summary: Kst crashes after accessing the flagVector array of the VectorView Class
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: scripting (show other bugs)
Version: 1.x
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-13 23:14 UTC by Yiwen Mao
Modified: 2008-06-14 01:27 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yiwen Mao 2008-06-13 23:14:25 UTC
Version:           1.7.0 (using KDE 4.0.1)
Installed from:    Unspecified
Compiler:          Fedora 6 
OS:                Linux

Kst will crash when try to access the array of the flagVector for a VectorView

//construct two vectors to create a VectorView
kst> x=new Vector();
Vector
kst> x.resize(10);
undefined
kst> for(var i=0;i<10;i++){x[i]=i+1}
10
kst> y=x;
Vector
kst> v=new VectorView(x,y)
VectorView

//construct a new Vector as a flag vector
kst> f=new Vector()
Vector
kst> f.resize(10)
undefined
kst> f.zero()
undefined
kst> f[2]=1
1
kst> f[5]=1
1
kst> f.array
0,0,1,0,0,1,0,0,0,0

//assign f as the flagVector for v
kst> v.flagVector=f;
Vector

//try to access the values of the flagVector
 v.flagVector.array 

//Kst crashes
Comment 1 Andrew Walker 2008-06-14 01:27:42 UTC
SVN commit 820358 by arwalker:

BUG:164002 the flag vector for a VectorView object is an input vector and not an output vector. Change code accordingly

 M  +1 -1      bind_vectorview.cpp  


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