MATLAB: Segmentation violation with video reader

crashMATLABsegv

When I run the following video reader code;
% Read one frame at a time.
for k = 1 : handles.xyloObj.NumberOfFrames
set(handles.text8,'Visible','on');
handles.mov(k).cdata = read(handles.xyloObj, k);
end
MATLAB crashes and gives the following error message :
------------------------------------------------------------------------
Segmentation violation detected at Fri Jan 28 14:20:34 2011
------------------------------------------------------------------------
Configuration:
MATLAB Version: 7.10.0.499 (R2010a)
MATLAB License: STUDENT
Operating System: Microsoft Windows 7
Window System: Version 6.1 (Build 7600)
Processor ID: x86 Family 6 Model 7 Stepping 10, GenuineIntel
Virtual Machine: Java 1.6.0_12-b04 with Sun Microsystems Inc. Java HotSpot(TM) Client VM mixed mode
Default Encoding: windows-1252
Fault Count: 1
Register State:
EAX = 00000001 EBX = 00000000
ECX = 00c27ec0 EDX = 2720ec3c
ESI = 26cd8a08 EDI = 00000000
EBP = 00c27ecc ESP = 00c27ea0
EIP = 054b4a26 FLG = 00010246
Stack Trace:
[0] directshowreader.dll:private: virtual void __thiscall directshowreader::DXFileReader::processVideoFrame(double,class IFrame &)(0x9ef5232d, 0x405d5dca "ÐÐÒÓÕÕÐÎÌËËËÌÍÏÏÎÈÂÂÇ̾¾¼»º·´µ±²..", 0, 0x00c27f24) + 150 bytes
[1] directshowreader.dll:protected: virtual bool __thiscall directshowreader::VideoFrameEvent::execute(void)(0x00c27f24, 0x7c7b30c0, 0, 0x26cd8930) + 26 bytes
[2] tamutil.dll:public: void __thiscall tamutil::EventQueue::processEvents(unsigned int)(1, 0, 0x26cd8930, 0) + 171 bytes
[3] directshowreader.dll:private: bool __thiscall directshowreader::DXFileReader::processCommandQueueAndWait(double,bool)(0, 0x40240000, 0, 0x26cd8a30) + 104 bytes
[4] directshowreader.dll:private: void __thiscall directshowreader::DXFileReader::runGraphUntilRequestComplete(void)(3525, 0x26eb4030, 0x26cd8a30, 8) + 102 bytes
[5] directshowreader.dll:private: virtual __int64 const __thiscall directshowreader::DXFileReader::getFrameData(__int64,__int64,unsigned char *)(3524, 0, 3524, 0) + 180 bytes
[6] mmreaderudd.dll:public: virtual struct mxArray_tag * __thiscall MMReader::read(__int64,__int64)(3525, 0, 3525, 0) + 176 bytes
[7] mmreaderudd.dll:public: virtual void __thiscall mmreaderudd::ReadMI::invokeMethod(class UDMethodSignature *,int *,void * *,int,void * *)(0x26de3aa0, 0x00c2818c, 0x00c28154, 2) + 183 bytes
[8] udd.dll:public: virtual void __thiscall UDMethodInfo::invokeMethodE(class UDMethodSignature *,int *,void * *,int,void * *,class UDErrorStatus *)(0x26de3aa0, 0x00c2818c, 0x00c28154, 2) + 67 bytes
[9] udd_mi.dll:bool __cdecl ouCallMethodWithErrorTrap(class UDMethodInfo *,struct mxArray_tag *,int,struct mxArray_tag * * const,int,struct mxArray_tag const * * const,class Exception * *)(0x26e10eb8, 0x1d4f9b80, 1, 0x00c282ec) + 724 bytes
[10] udd_mi.dll:bool __cdecl ouCallMethod(struct mxArray_tag *,struct mxArray_tag *,int,struct mxArray_tag * * const,int,struct mxArray_tag const * * const)(0, 0x1d4f9b80, 1, 0x00c282ec) + 182 bytes
[11] mcos.dll:public: virtual void __thiscall Mfh_opaque_dynamic::dispatch_mf(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(1, 0x00c282ec, 2, 0x00c2834c) + 148 bytes
[12] m_dispatcher.dll:public: virtual void __thiscall Mfh_MATLAB_fn::dispatch_fh(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(1, 0x00c282ec, 2, 0x00c2834c) + 399 bytes
[13] m_dispatcher.dll:public: void __thiscall Mfunction_handle::dispatch(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(1, 0x00c282ec, 2, 0x00c2834c) + 420 bytes
[14] m_interpreter.dll:int __cdecl inDispatchFromStack(int,char const *,int,int)(909, 0x270159f0 "read", 1, 2) + 626 bytes
[15] m_interpreter.dll:int __cdecl inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag volatile *,int *)(1, 382, 74, 0) + 1282 bytes
[16] m_interpreter.dll:int __cdecl protected_inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *,int *)(1, 382, 57, 0) + 39 bytes
[17] m_interpreter.dll:int __cdecl inInterPcodeSJ(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *,int *)(1, 382, 57, 0) + 251 bytes
[18] m_interpreter.dll:int __cdecl inExecuteMFunctionOrScript(class Mfh_mp *,bool)(0, 0xffffffff, 0x1faa01a8 "|1 z`\n", 1) + 876 bytes
[19] m_interpreter.dll:void __cdecl inRunMfile(int,struct mxArray_tag * *,int,struct mxArray_tag * *,class Mfh_mp *,struct inWorkSpace_tag *)(1, 0x26edaae8, 2, 0x26edb3f8) + 466 bytes
[20] m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(struct _mdUnknown_workspace *,int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 1, 0x26edaae8, 2) + 23 bytes
[21] m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(1, 0x26edaae8, 2, 0x26edb3f8) + 25 bytes
[22] m_dispatcher.dll:public: virtual void __thiscall Mfh_file::dispatch_fh(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(1, 0x26edaae8, 2, 0x26edb3f8) + 249 bytes
[23] m_dispatcher.dll:public: void __thiscall Mfunction_handle::dispatch(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(1, 0x26edaae8, 2, 0x26edb3f8) + 420 bytes
[24] mcos.dll:public: virtual void __thiscall mcos::MScopedMethodInfo::invoke(class mcos::COSClient const *,int &,class mcos::COSValue *,int,class mcos::COSValue const *)const (0x01111354, 0x26e8f154, 0x26e20ae0, 2) + 295 bytes
[25] mcos.dll:public: bool __thiscall OpaqueMethodCallMetaData::callMethodOrConstructor(struct mxArray_tag *,bool,int,struct mxArray_tag * * const,int,struct mxArray_tag const * * const,bool,class mcos::COSClient const *)(0x26e8f120, 0, 0, 1) + 932 bytes
[26] mcos.dll:public: bool __thiscall OpaqueMethodMetaData::callMethodOrConstructor(struct mxArray_tag *,bool,int,struct mxArray_tag * * const,int,struct mxArray_tag const * * const,bool,class mcos::COSClient const *)(0x26e8f0f8, 0, 1, 0x00c28dcc) + 96 bytes
[27] mcos.dll:bool __cdecl omCallMatlabDispatchMethod(struct mxArray_tag *,int,struct mxArray_tag * * const,int,struct mxArray_tag const * * const)(0x1d4fc0e8, 1, 0x00c28dcc, 2) + 361 bytes
[28] mcos.dll:public: virtual void __thiscall Mfh_opaque_dynamic_all_args::dispatch_mf(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(1, 0x00c28dcc, 2, 0x00c28e2c) + 143 bytes
[29] m_dispatcher.dll:public: virtual void __thiscall Mfh_MATLAB_fn::dispatch_fh(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(1, 0x00c28dcc, 2, 0x00c28e2c) + 399 bytes
[30] m_dispatcher.dll:public: void __thiscall Mfunction_handle::dispatch(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(1, 0x00c28dcc, 2, 0x00c28e2c) + 420 bytes
[31] m_interpreter.dll:int __cdecl inDispatchFromStack(int,char const *,int,int)(909, 0x1fa50638 "read", 1, 2) + 626 bytes
[32] m_interpreter.dll:int __cdecl inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag volatile *,int *)(1, 1277, 151, 0) + 1282 bytes
[33] m_interpreter.dll:int __cdecl protected_inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *,int *)(1, 1277, 118, 0) + 39 bytes
[34] m_interpreter.dll:int __cdecl inInterPcodeSJ(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *,int *)(1, 1277, 118, 0) + 251 bytes
[35] m_interpreter.dll:int __cdecl inExecuteMFunctionOrScript(class Mfh_mp *,bool)(48384, 0xffffffff, 0x1f98f2f0, 0) + 876 bytes
[36] m_interpreter.dll:void __cdecl inRunMfile(int,struct mxArray_tag * *,int,struct mxArray_tag * *,class Mfh_mp *,struct inWorkSpace_tag *)(0, 0x00c2973c, 3, 0x00c297a0) + 466 bytes
[37] m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(struct _mdUnknown_workspace *,int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 0, 0x00c2973c, 3) + 23 bytes
[38] m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 0x00c2973c, 3, 0x00c297a0) + 25 bytes
[39] m_dispatcher.dll:public: virtual void __thiscall Mfh_file::dispatch_fh(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 0x00c2973c, 3, 0x00c297a0) + 249 bytes
[40] m_dispatcher.dll:public: void __thiscall Mfunction_handle::dispatch(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 0x00c2973c, 3, 0x00c297a0) + 420 bytes
[41] m_dispatcher.dll:public: virtual void __thiscall mdHiddenFunctionBinding::dispatch_fh(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 0x00c2973c, 3, 0x00c297a0) + 36 bytes
[42] m_dispatcher.dll:void __cdecl callViamdMxarrayFunctionHandle(void *,int,struct mxArray_tag * * const,int,struct mxArray_tag * * const)(0x0845e690, 0, 0x00c2973c, 3) + 75 bytes
[43] libmx.dll:void __cdecl mxFevalFunctionHandle(int,struct mxArray_tag * * const,int,struct mxArray_tag * * const)(0, 0x00c2973c, 4, 0x00c2979c) + 38 bytes
[44] m_interpreter.dll:_inFullFevalFcn(0, 0x00c2973c, 4, 0x00c2979c) + 140 bytes
[45] m_dispatcher.dll:public: virtual void __thiscall Mfh_builtin::dispatch_mf(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 0x00c2973c, 4, 0x00c2979c) + 92 bytes
[46] m_dispatcher.dll:public: void __thiscall Mfunction_handle::dispatch(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 0x00c2973c, 4, 0x00c2979c) + 247 bytes
[47] m_interpreter.dll:int __cdecl inDispatchFromStack(int,char const *,int,int)(311, 0x1f40bba0 "feval", 0, 4) + 626 bytes
[48] m_interpreter.dll:int __cdecl inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag volatile *,int *)(1, 2903, 96, 0) + 1282 bytes
[49] m_interpreter.dll:int __cdecl protected_inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *,int *)(1, 2903, 38, 0) + 39 bytes
[50] m_interpreter.dll:int __cdecl inInterPcodeSJ(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *,int *)(1, 2903, 38, 0) + 251 bytes
[51] m_interpreter.dll:int __cdecl inExecuteMFunctionOrScript(class Mfh_mp *,bool)(0x73f84c00, 0xffffffff, 0x1f38d670 "|1 z3\r", 0) + 876 bytes
[52] m_interpreter.dll:void __cdecl inRunMfile(int,struct mxArray_tag * *,int,struct mxArray_tag * *,class Mfh_mp *,struct inWorkSpace_tag *)(0, 0x00c29f84, 5, 0x00c29fe4) + 466 bytes
[53] m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(struct _mdUnknown_workspace *,int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 0, 0x00c29f84, 5) + 23 bytes
[54] m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 0x00c29f84, 5, 0x00c29fe4) + 25 bytes
[55] m_dispatcher.dll:public: virtual void __thiscall Mfh_file::dispatch_fh(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 0x00c29f84, 5, 0x00c29fe4) + 249 bytes
[56] m_dispatcher.dll:public: void __thiscall Mfunction_handle::dispatch(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 0x00c29f84, 5, 0x00c29fe4) + 420 bytes
[57] m_interpreter.dll:int __cdecl inDispatchFromStack(int,char const *,int,int)(660, 0x1fa50504 "gui_mainfcn", 0, 5) + 626 bytes
[58] m_interpreter.dll:int __cdecl inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag volatile *,int *)(1, 251, 42, 0) + 1282 bytes
[59] m_interpreter.dll:int __cdecl protected_inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *,int *)(1, 251, 28, 0) + 39 bytes
[60] m_interpreter.dll:int __cdecl inInterPcodeSJ(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *,int *)(1, 251, 28, 0) + 251 bytes
[61] m_interpreter.dll:int __cdecl inExecuteMFunctionOrScript(class Mfh_mp *,bool)(0x74b48400, 0xffffffff, 0x1f363a60 "|1 zÙ1", 0) + 876 bytes
[62] m_interpreter.dll:void __cdecl inRunMfile(int,struct mxArray_tag * *,int,struct mxArray_tag * *,class Mfh_mp *,struct inWorkSpace_tag *)(0, 0x00c2a7cc, 4, 0x00c2a82c) + 466 bytes
[63] m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(struct _mdUnknown_workspace *,int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 0, 0x00c2a7cc, 4) + 23 bytes
[64] m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 0x00c2a7cc, 4, 0x00c2a82c) + 25 bytes
[65] m_dispatcher.dll:public: virtual void __thiscall Mfh_file::dispatch_fh(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 0x00c2a7cc, 4, 0x00c2a82c) + 249 bytes
[66] m_dispatcher.dll:public: void __thiscall Mfunction_handle::dispatch(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 0x00c2a7cc, 4, 0x00c2a82c) + 420 bytes
[67] m_interpreter.dll:int __cdecl inDispatchFromStack(int,char const *,int,int)(662, 0x1fac27bc "gui_VIDEO", 0, 4) + 626 bytes
[68] m_interpreter.dll:int __cdecl inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag volatile *,int *)(1, 84, 1, 0) + 1282 bytes
[69] m_interpreter.dll:int __cdecl protected_inInterp(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *,int *)(1, 84, 1, 0) + 39 bytes
[70] m_interpreter.dll:int __cdecl inInterPcodeSJ(enum inDebugCheck,int,int,enum opcodes,struct inPcodeNest_tag *,int *)(1, 84, 1, 0) + 251 bytes
[71] m_interpreter.dll:int __cdecl inExecuteMFunctionOrScript(class Mfh_mp *,bool)(0x00c2af00, 0xffffffff, 0x1f991be8 "|1 z§3", 0x00c2b1c4) + 876 bytes
[72] m_interpreter.dll:void __cdecl inRunMfile(int,struct mxArray_tag * *,int,struct mxArray_tag * *,class Mfh_mp *,struct inWorkSpace_tag *)(0, 0x00c2b1c4, 2, 0x26cd68f4) + 466 bytes
[73] m_interpreter.dll:public: virtual void __thiscall Mfh_mp::dispatch_file(struct _mdUnknown_workspace *,int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0x1f964da8, 0, 0x00c2b1c4, 2) + 23 bytes
[74] m_dispatcher.dll:public: virtual void __thiscall Mfh_file::dispatch_fh(struct _mdUnknown_workspace *,int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0x1f964da8, 0, 0x00c2b1c4, 2) + 241 bytes
[75] m_dispatcher.dll:public: virtual void __thiscall mdMxarrayNestedFunctionHandle::dispatch_fh(int,struct mxArray_tag * *,int,struct mxArray_tag * *)(0, 0x00c2b1c4, 2, 0x26cd68f4) + 46 bytes
[76] m_dispatcher.dll:void __cdecl callViamdMxarrayFunctionHandle(void *,int,struct mxArray_tag * * const,int,struct mxArray_tag * * const)(0x0845e690, 0, 0x00c2b1c4, 2) + 75 bytes
[77] libmx.dll:void __cdecl mxFevalFunctionHandle(int,struct mxArray_tag * * const,int,struct mxArray_tag * * const)(0, 0x00c2b1c4, 3, 0x26cd68f0) + 38 bytes
[78] m_interpreter.dll:_inFullFevalFcn(0, 0x00c2b1c4, 3, 0x26cd68f0) + 140 bytes
[79] libmwgui.dll:private: bool __thiscall MCallback::_execute(struct mxArray_tag *,struct mxArray_tag *,int,struct mxArray_tag * *)const (0x1d4f17d0, 0x1d4eb7c8, 3, 0x26cd68f0) + 195 bytes
[80] libmwgui.dll:public: bool __thiscall MCallback::execute(struct mxArray_tag *,struct mxArray_tag *)const (0x1d4f17d0, 0x1d4eb7c8, 0x00c2b290 "ä²Â", 0x78f4015a) + 360 bytes
[81] libmwgui.dll:bool __cdecl ExecuteMCallback(class MCallback const *,struct mxArray_tag *,struct mxArray_tag *)(0x1fc2bb08, 0x1d4f17d0, 0x1d4eb7c8, 1) + 19 bytes
[82] hg.dll:enum inExecutionStatus __cdecl goCallEventCallback(struct GObject_tag *,class MCallback *,char const *,void (__cdecl*)(struct GObject_tag *,void *),void *,void (__cdecl*)(struct GObject_tag *,void *),struct mxArray_tag *)(0x1fc2bb08, 0x78fcba48 "Callback", 0x26cfdd10, 0) + 394 bytes
[83] hg.dll:_goCallCallback(0x1f98fda0, 0x1fc2bb08, 0x78fcba48 "Callback", 0x78f0bdc0) + 171 bytes
[84] hg.dll:_uicontrolEventHandler(0x1f98fda0, 0x1fc2bb08, 0, 0x00c2b394 "¨³Â") + 423 bytes
[85] hg.dll:public: virtual void __thiscall UIControlGObjectDisplayManagerModel::EventHandler(enum ControlCallbackType,void *)(0, 0, 0x00c2b474, 0x1fc2e628) + 20 bytes
[86] hg.dll:public: virtual void __thiscall UIControlJavaDisplayManager::Activated(class UDInterface *,class DisplayManager *,void *)(0x1fb9f128, 0x1fc2fbd8, 0x1993402c, 0x00c2b3bc "à³Â") + 87 bytes
[87] hg.dll:public: virtual void __thiscall DefaultJavaViewContainer::JavaViewActionCallback(class UDInterface *,class JavaViewContainer *,void *)(0x1fb9f128, 0x1fc2fc10, 0x1993402c, 0x00c2b3e0) + 47 bytes
[88] hg.dll:public: static void __cdecl DefaultJavaViewContainer::JavaViewActionCallbackDispatch(class UDInterface *,class JavaViewContainer *,void *,bool)(0x1fb9f128, 0x1fc2fc10, 0x1993402c, 0x7b186900) + 22 bytes
[89] hg.dll:public: virtual bool __thiscall JavaEventListener::execute(class UDEvent *)(0x00c2b474, 0x1f715030, 0x1fb9f128, 0x00c2b
If you help me about this, I appreciate you.

Best Answer

Generally with any segmentation violation, you're supposed to contact the Mathworks technical support directly.
Related Question