bugGNU Octave - Bugs: bug #43610, When I paste commands into the GUI...

 
 

bug #43610: When I paste commands into the GUI command window, Octave crashes completely and closes.

Submitted by:  None
Submitted on:  Fri 14 Nov 2014 01:59:47 PM UTC  
 
Category: GUISeverity: 3 - Normal
Priority: 5 - NormalItem Group: Segfault, Bus Error, etc.
Status: DuplicateAssigned to: None
Originator Name: Joe LeeOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.8.2
Operating System: Microsoft Windows

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 30 Jan 2015 04:04:18 PM UTC, comment #4:

I am closing this bug as a duplicate of bug #39000. Kai has been able to reproduce the OP's crash, and it seems to be due to an error in an LAPACK routine. Octave is supposed to be inserting its own error handler so LAPACK routines do not cause the program to exit, and that is what bug #39000 is about as well.

Mike Miller <mtmiller>
Project Administrator
Thu 20 Nov 2014 02:21:25 PM UTC, comment #3:

Hello,

no problem with the truncated first message and thank you for your verbose error report. I was able to track the problem. It all boils down to

This also crashes my Windows Octave 3.8.2 GUI, but on the development version under Linux there is only this error message without a crash. If you run this statement in Windows Octave 3.8.2 in the CLI you will see this error message as well. To sum up this problem seems to be fixed in the next release.

For now I provided a fix around this issue in your function smap.m in line 42-47 (see attached files). I don't think the script you wrote is totally bug free anyway. But at least you can continue without a hard crash.

Can you tell me that this work around works for you. And does some maintainer know if this issue has already been addressed before to close this bug?

HTH, Kai

(file #32487, file #32488)

Kai Torben Ohlhus <siko1056>
Project Member
Wed 19 Nov 2014 08:42:33 AM UTC, comment #2:

I have no idea why the rest of my post was truncated. Here it is again:

"##S mapping
pkg load statistics

cd C:\Octave\Octave-3.8.2

load 'logistic.dat' #load up and pre-process a timeseries of data from the
logisic map to use as an example
#as it is chaotic.
data=flipud(logistic); #flip so that most recent at top, so not going
backwards.

#load 'tinkerbell.dat';
#data=flipud(tinkerbell);

#may need to then one minus the data if doing
#one step projection, or Tp minus if doing Tp steps.
#define m and d, theta and Tp (last 3 will be in function when done)
#d=2;
#Tp=1
#theta=2
#latest = 90
#earliest = 150

function [Yhat, closeness, weights, FAR] =
smap(data,earliest,latest,d,Tp,theta)

x=data(latest:earliest,:);
m=length(x);
#always rescale so Xt(0) = 1 //try not doing this
#x = x.+(1-(x(m,:)));

#embed the time series:
m = length(x);
embedded= ones((m-d),1); #presize a matrix
for i= 1:d;
col= x([i:(m-(d-(i-1)))],1);
embedded= [embedded, col];
endfor
# this embedded has the original column of 1's, so chop them off:
# Actually, don't! embedded= embedded(:,2:(d+1));

#embedded is now a matrix of d+1 columns and n-d-1 rows.
[n,dim]= size(embedded);# get size of the embedded time series matrix

#calculate distances between all points to get distbar
#can do this using pdist (statistics package) so need to load statistics if
not already done

distbar =mean(pdist(embedded))

#now need the distance between latest simplex and others:
#Assumes most recent at the top

Xt = embedded(1,:);
#Need Yi:
Yi = embedded(2:Tp:n-Tp,:);
#And Xi:
Xi = embedded(Tp+2:Tp:n,:);
#FAR is vector of distances between latest known point and every other point
in library
#i.e Work out (||Xi-Xt||)
far = Xi.-Xt;
FAR = sqrt(sum(far.^2,2));

#calculate weights These are not normalized, so divide by sum weights
weights = exp(-theta.*FAR./distbar);
weights = weights./(sum(weights));
#calculate Yhat: yhat = A inverse B Xt
#where A = weight(||xi-Xt||)Xi and B = weight(||Xi-Xt||)Yi
#Xi is each point in the library, Xt is the predictee (point) and Yi is where
#Xi ended up at.

#Yhat = mean(weights.*Yi);
#Yhat = Yhat(1,1)

B = weights.*Yi;
A = weights.*Xi;
Yhat = (A\B).*Xt;
Yhat = sum(Yhat);
Yhat = Yhat(1,2)

#now get the actual true value for the point from the data:
tru = data(1:(latest-1),:);
#always rescale so Xt(0) = 1 //try not doing this
# tru = tru.+(1-(x(m,:)));

#Difference from actual point Yt:
Yt = tru(length(tru));
closeness = sqrt((Yhat.-Yt)^2);

endfunction

"
I then pasted in the following code, which does have an error in it (it
doesn't make sense for i to start at 0), and this led to the whole thing
crashing. (It doesn't crash if changed to be i=1:10).

"
clvector=1
for i=0:10
[yt,cl] = smap(data,150,90,i,1,4);
clvector = [clvector;cl];
endfor
clvector = clvector(2:(length(clvector)))
axis = 0:(length(clvector)-1)
plot (axis, clvector, 'x')
"

There you go, that's it. Logistic.dat is the data file used in the code, it's just a time series.

Anonymous
Tue 18 Nov 2014 11:45:24 AM UTC, comment #1:

You have to provide much more information to get a clue what problem you are facing. What commands did you enter? Which function did you paste? How is your attached file logistic.dat related to the problem?

Kai Torben Ohlhus <siko1056>
Project Member
Fri 14 Nov 2014 01:59:47 PM UTC, original submission:

This is a new problem, and doesn't happen every time. It seems to be when there is an error in the code I paste in:

I started by pasting in my little function (this didn't cause a crash):

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #32487:  smap.m added by siko1056 (2KiB - text/plain)
file #32488:  mycode.m added by siko1056 (777B - text/plain)
file #32433:  logistic.dat added by None (215KiB - application/octet-stream - Here's the data to use if you wish)

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by siko1056 (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 30 Jan 2015 04:04:18 PM UTCmtmillerStatusConfirmed=>Duplicate
      Open/ClosedOpen=>Closed
      Dependencies-=>Depends on bugs #39000
    Thu 20 Nov 2014 02:21:25 PM UTCsiko1056Attached File-=>Added smap.m, #32487
      Attached File-=>Added mycode.m, #32488
      StatusNeed Info=>Confirmed
    Tue 18 Nov 2014 03:48:16 PM UTCsiko1056StatusNone=>Need Info
    Fri 14 Nov 2014 01:59:47 PM UTCNoneAttached File-=>Added logistic.dat, #32433

    Back to the top


    Powered by Savane 3.1-cleanup1