MATLAB: Do I receive a segmentation violation when using TEXTSCAN with MATLAB 7.0.1 (R14SP1)

crashMATLABsegfaultsegv

When I call TEXTSCAN in the following manner:
textscan([]);
I receive the following segmentation violation:
------------------------------------------------------------------------
Segmentation violation detected at Thu Dec 16 10:38:49 2004
------------------------------------------------------------------------
Stack Trace:
[0] libmwbuiltins.dll:void __cdecl fiTextScan(int,struct mxArray_tag * * const,int,struct mxArray_tag const * * const)(0, 0x00cde6ac, 1, 0x00cde70c) + 33 bytes
[1] m_dispatcher.dll:public: virtual void __thiscall Mfh_builtin<struct mxArray_tag>::dispatch_mf(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 0x00cde6ac, 1, 0x00cde70c) + 55 bytes
[2] m_dispatcher.dll:public: virtual void __thiscall Mfh_MATLAB_fn::dispatch_fh(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 0x00cde6ac, 1, 0x00cde70c) + 200 bytes
[3] m_interpreter.dll:int __cdecl mdDispatch(int,char const *,int,struct mxArray_tag * *,int,struct mxArray_tag * *,class Mfh_MATLAB_fn * *)(61, 0x20c6f754 "textscan", 0, 0x00cde6ac) + 88 bytes
<SNIP>

Best Answer

This bug has been fixed in Release 14 Service Pack 3 (R14SP3). For previous product releases, read below for any possible workarounds:
We have verified that there is a bug in TEXTSCAN that affects the way it handles an input of an empty matrix. To work around this issue, call textscan with a non-empty input.