JuliaIO / MAT.jl

Julia module for reading MATLAB files
MIT License
278 stars 71 forks source link

Bounds error when reading a v5 mat file with function handle. #53

Closed yuyichao closed 4 years ago

yuyichao commented 8 years ago

I got the following error when reading the Scan this file.

ERROR: BoundsError: attempt to access 15-element Array{Type{T},1}:                
 Union{}                                                                          
 Union{}                                                                          
 Union{}                                                                          
 Union{}                                                                          
 Union{}                                                                          
 Float64                                                                          
 Float32                                                                          
 Int8                                                                             
 UInt8                                                                            
 Int16                                                                            
 UInt16                                                                           
 Int32                                                                            
 UInt32                                                                           
 Int64                                                                            
 UInt64                                                                           
  at index [16]                                                                   
 in read_matrix(::Base.AbstractIOBuffer{Array{UInt8,1}}, ::Bool) at /usr/share/julia/site/v0.5/MAT/src/MAT_v5.jl:328                                                
 in read_struct(::Base.AbstractIOBuffer{Array{UInt8,1}}, ::Bool, ::Array{Int32,1}, ::Bool) at /usr/share/julia/site/v0.5/MAT/src/MAT_v5.jl:181                      
 in read_matrix(::Base.AbstractIOBuffer{Array{UInt8,1}}, ::Bool) at /usr/share/julia/site/v0.5/MAT/src/MAT_v5.jl:322                                                
 in read_matrix(::IOStream, ::Bool) at /usr/share/julia/site/v0.5/MAT/src/MAT_v5.jl:297
 in read(::MAT.MAT_v5.Matlabv5File, ::ASCIIString) at /usr/share/julia/site/v0.5/MAT/src/MAT_v5.jl:420
 in eval(::Module, ::Any) at ./boot.jl:267

The file was created by MATLAB R2014b on windows 7.

yuyichao commented 7 years ago

And it seems that the issue is a function handle stored in the struct.

musm commented 4 years ago

stale