assertion "nread == 1" failed: file "lex.l", line 1998

John W. Eaton jwe at bevo.che.wisc.edu
Tue May 6 12:33:39 CDT 2008


On 28-Apr-2008, Brad Bell wrote:

| Bug report for Octave 2.1.73 configured for i686-pc-cygwin
| 
| Description:
| -----------
| 
|    * The error message above is printed and then Octave aborts the following
|      script file:
|      =======================================================================
|      nTimes = 2;
|      nChans = 1;
|      center_frequency = 1;
|      x                = ones(nTimes, 2*nChans);
|      if center_frequency > 0
|          sig = zeros( nTimes, nChans );
|          for chan = 1:nChans
|  	        sig(:,chan) = complex( x(:,2*chan-1), x(:,2*chan) );
|          end
|      else
|          sig = x;
|      end
|      ========================================================================
| 
|      problem.  Suggestions or general comments are also welcome.
| 
| Repeat-By:
| ---------
| 
|    * Step 1: save the file above as junk.m.
|    * Step 2: run octave in same directory.
|    * Step 3: execute the command "junk".
| 
|    * Result: assertion "nread == 1" failed: file "lex.l", line 1998

I'm unable to reproduce the problem with Octave 2.1.73 or Octave 3.0.

Since there is something funny going on with the lexer, it would
probably be best to send the file as a binary attachment in case there
are some funny characters in your copy of the file that are not making
it through when you paste it into a mail message.  But in any case,
Octave 2.1.73 is obsolete.  I strongly encourage you to upgrade to the
latest stable release, 3.0.1.  If the problem persists after
upgrading, then please submit another report.

jwe


More information about the Bug-octave mailing list