Hi, I had a close look at the attached stack traces but it’s difficult to make any firm guesses at the cause of the problem primarily because the function argument values are not visible (I would probably need to view also some of the data structures that the function arguments point to in order to make more specific conclusions). Currently my best guess is that the function tcpiiu::readNotifyRequest is throwing a C++ exception due to a configuration problem, such as an insufficient maximum array size, which would normally be caught further up the stack in ca_array_get_callback where the exception is converted to a C error status return value, but somehow the C++ exception handling stack unwinding isn’t working correctly in the MATLAB MEX environment. One possibility is that perhaps the MATLAB MEX program isn’t linked using the C++ compiler, and instead is being linked using a C compiler and so maybe the C++ exception handling isn’t correctly installed into the MATLAB MEX executable? That’s just a guess so hopefully I am not sending you in the wrong direction. I do see that the libca.so.3.14 sharable library is in use and presumably it __was__ built properly using the C++ compiler so perhaps this is a bad guess at the cause of the problem. In any case, it might be a good idea to read the MATLAB manuals describing proper building of MEX files which include C++ code. One possible approach would be to set a breakpoint in tcpiiu::readNotifyRequest in the MATLAB process when it is running so that one can discover more specifics about the cause of the failure. In any case that is the approach I would take if I was resolving this issue here. Another possibility might be that EZCA is passing an invalid (has already been destroyed channel identifier). Did you see any additional messages on the console when the MEX program died? Jeff ______________________________________________________ Jeffrey O. Hill Email [email protected] LANL MS H820 Voice 505 665 1831 Los Alamos NM 87545 USA FAX 505 665 5107 Message content: TSPA I compiled areaDetector modules to link CCD detector. But when I run program in the Matlab by LabCA , the Matlab crash . The error code as follows. Does anyone know why? [ 0] 0x0057c422 /usr/local/matlab/bin/glnx86/../../bin/glnx86/libmwfl.so+00496674 fl::sysdep::linux::unwind_stack(void const**, unsigned int, unsigned int)+000036 [ 1] 0x0051d8f4 /usr/local/matlab/bin/glnx86/../../bin/glnx86/libmwfl.so+00108788 fl::diag::stacktrace_base::capture(unsigned int)+000046 [ 2] 0x00826d50 /usr/local/matlab/bin/glnx86/../../bin/glnx86/libmwmcr.so+00302416 [ 3] 0x008274b7 /usr/local/matlab/bin/glnx86/../../bin/glnx86/libmwmcr.so+00304311 [ 4] 0x00405835 /usr/local/matlab/bin/glnx86/../../sys/os/glnx86/libstdc++.so.6+00739381 [ 5] 0x00405872 /usr/local/matlab/bin/glnx86/../../sys/os/glnx86/libstdc++.so.6+00739442 [ 6] 0x0040599a /usr/local/matlab/bin/glnx86/../../sys/os/glnx86/libstdc++.so.6+00739738 [ 7] 0x03300d65 /home/xxxx/shiyan/epics/src/base-3-14-11/lib/linux-x86/libca.so.3.14+00204133 tcpiiu::readNotifyRequest(epicsGuard<epicsMutex>&, nciu&, netReadNotifyIO&, unsigned int, unsigned long)+000357 [ 8] 0xa0ef1f38 /home/xxxx/shiyan/epics/src/base-3-14-11/lib/linux-x86/libca.so.3.14+2646748984 [ 0] 0x0057c422 /usr/local/matlab/bin/glnx86/../../bin/glnx86/libmwfl.so+00496674 fl::sysdep::linux::unwind_stack(void const**, unsigned int, unsigned int)+000036 [ 1] 0x0051d8f4 /usr/local/matlab/bin/glnx86/../../bin/glnx86/libmwfl.so+00108788 fl::diag::stacktrace_base::capture(unsigned int)+000046 [ 2] 0x00826d50 /usr/local/matlab/bin/glnx86/../../bin/glnx86/libmwmcr.so+00302416 [ 3] 0x008274f4 /usr/local/matlab/bin/glnx86/../../bin/glnx86/libmwmcr.so+00304372 [ 4] 0x006ce40c __kernel_rt_sigreturn+000000 [ 5] 0x006ce416 __kernel_vsyscall+000002 [ 6] 0x037b0e71 /lib/i386-linux-gnu/libc.so.6+00175729 gsignal+000081 [ 7] 0x037b434e /lib/i386-linux-gnu/libc.so.6+00189262 abort+000382 [ 8] 0x0040583a /usr/local/matlab/bin/glnx86/../../sys/os/glnx86/libstdc++.so.6+00739386 [ 9] 0x00405872 /usr/local/matlab/bin/glnx86/../../sys/os/glnx86/libstdc++.so.6+00739442 [ 10] 0x0040599a /usr/local/matlab/bin/glnx86/../../sys/os/glnx86/libstdc++.so.6+00739738 [ 11] 0x03300d65 /home/xxxx/shiyan/epics/src/base-3-14-11/lib/linux-x86/libca.so.3.14+00204133 tcpiiu::readNotifyRequest(epicsGuard<epicsMutex>&, nciu&, netReadNotifyIO&, unsigned int, unsigned long)+000357 [ 12] 0x032eed95 /home/xxxx/shiyan/epics/src/base-3-14-11/lib/linux-x86/libca.so.3.14+00130453 cac::readNotifyRequest(epicsGuard<epicsMutex>&, nciu&, privateInterfaceForIO&, unsigned int, unsigned long, cacReadNotify&)+000197 [ 13] 0x032fbd4a /home/xxxx/shiyan/epics/src/base-3-14-11/lib/linux-x86/libca.so.3.14+00183626 nciu::read(epicsGuard<epicsMutex>&, unsigned int, unsigned long, cacReadNotify&, unsigned int*)+000186 [ 14] 0x0330e71a /home/xxxx/shiyan/epics/src/base-3-14-11/lib/linux-x86/libca.so.3.14+00259866 ca_array_get_callback+000186 [ 15] 0x07631716 /home/xxxx/shiyan/epics/src/extensions/src/labca_3_3/lib/linux-x86/libezcamt.so.0+00022294 [ 16] 0x076329b9 /home/xxxx/shiyan/epics/src/extensions/src/labca_3_3/lib/linux-x86/libezcamt.so.0+00027065 ezcaEndGroupWithReport+002345 [ 17] 0x01bd026f /home/xxxx/shiyan/epics/src/extensions/src/labca_3_3/lib/linux-x86/libmezcaglue.so.0+00012911 multi_ezca_get+001247 [ 18] 0x01b40cc8 /home/xxxx/shiyan/epics/src/extensions/src/labca_3_3/bin/linux-x86/labca/lcaGet.mexglx+00003272 mexFunction+000536 [ 19] 0x0078f8fb /usr/local/matlab/bin/glnx86/../../bin/glnx86/../../bin/glnx86/libmex.so+00039163 mexRunMexFile+000109 [ 20] 0x0078c459 /usr/local/matlab/bin/glnx86/../../bin/glnx86/../../bin/glnx86/libmex.so+00025689 [ 21] 0x0078db69 /usr/local/matlab/bin/glnx86/../../bin/glnx86/../../bin/glnx86/libmex.so+00031593 [ 22] 0x001fe982 /usr/local/matlab/bin/glnx86/../../bin/glnx86/libmwm_dispatcher.so+00432514 Mfh_file::dispatch_fh(int, mxArray_tag**, int, mxArray_tag**)+000318 [ 23] 0x00df420f /usr/local/matlab/bin/glnx86/../../bin/glnx86/libmwm_interpreter.so+03146255 [ 24] 0x00df99b2 /usr/local/matlab/bin/glnx86/../../bin/glnx86/libmwm_interpreter.so+03168690 [ 25] 0x00dfa5fa /usr/local/matlab/bin/glnx86/../../bin/glnx86/libmwm_interpreter.so+03171834 [ 26] 0x00c2ee57 /usr/local/matlab/bin/glnx86/../../bin/glnx86/libmwm_interpreter.so+01289815 [ 27] 0x00c50054 /usr/local/matlab/bin/glnx86/../../bin/glnx86/libmwm_interpreter.so+01425492 [ 28] 0x00c50113 /usr/local/matlab/bin/glnx86/../../bin/glnx86/libmwm_interpreter.so+01425683 [ 29] 0x00d988c8 /usr/local/matlab/bin/glnx86/../../bin/glnx86/libmwm_interpreter.so+02771144 [ 30] 0x00bc3988 /usr/local/matlab/bin/glnx86/../../bin/glnx86/libmwm_interpreter.so+00850312 [ 31] 0x00c2c6e4 /usr/local/matlab/bin/glnx86/../../bin/glnx86/libmwm_interpreter.so+01279716 [ 32] 0x00c01634 /usr/local/matlab/bin/glnx86/../../bin/glnx86/libmwm_interpreter.so+01103412 [ 33] 0x00c004fe /usr/local/matlab/bin/glnx86/../../bin/glnx86/libmwm_interpreter.so+01099006 [ 34] 0x001fe982 /usr/local/matlab/bin/glnx86/../../bin/glnx86/libmwm_dispatcher.so+00432514 Mfh_file::dispatch_fh(int, mxArray_tag**, int, mxArray_tag**)+000318 [ 35] 0x00c06f3b /usr/local/matlab/bin/glnx86/../../bin/glnx86/libmwm_interpreter.so+01126203 [ 36] 0x00bb5578 /usr/local/matlab/bin/glnx86/../../bin/glnx86/libmwm_interpreter.so+00791928 [ 37] 0x00bb9c96 /usr/local/matlab/bin/glnx86/../../bin/glnx86/libmwm_interpreter.so+00810134 [ 38] 0x00bba3b9 /usr/local/matlab/bin/glnx86/../../bin/glnx86/libmwm_interpreter.so+00811961 [ 39] 0x00b76cdf /usr/local/matlab/bin/glnx86/../../bin/glnx86/libmwm_interpreter.so+00535775 inEvalCmdWithLocalReturn+000081 [ 40] 0x00181758 /usr/local/matlab/bin/glnx86/../../bin/glnx86/libmwbridge.so+00091992 [ 41] 0x00182763 /usr/local/matlab/bin/glnx86/../../bin/glnx86/libmwbridge.so+00096099 mnParser+000333 [ 42] 0x0080de57 /usr/local/matlab/bin/glnx86/../../bin/glnx86/libmwmcr.so+00200279 mcrInstance::mnParser_on_interpreter_thread()+000051 [ 43] 0x00816f54 /usr/local/matlab/bin/glnx86/../../bin/glnx86/libmwmcr.so+00237396 [ 44] 0x007f5abe /usr/local/matlab/bin/glnx86/../../bin/glnx86/libmwmcr.so+00101054 [ 45] 0x007f5ba1 /usr/local/matlab/bin/glnx86/../../bin/glnx86/libmwmcr.so+00101281 [ 46] 0x007f05ef /usr/local/matlab/bin/glnx86/../../bin/glnx86/libmwmcr.so+00079343 [ 47] 0x0181b591 /usr/local/matlab/bin/glnx86/../../bin/glnx86/../../bin/glnx86/libmwuix.so+00390545 [ 48] 0x018163b8 /usr/local/matlab/bin/glnx86/../../bin/glnx86/../../bin/glnx86/libmwuix.so+00369592 [ 49] 0x0181e366 /usr/local/matlab/bin/glnx86/../../bin/glnx86/../../bin/glnx86/libmwuix.so+00402278 [ 50] 0x0625863c /usr/local/matlab/bin/glnx86/../../bin/glnx86/../../bin/glnx86/libuij.so+00251452 [ 51] 0x06254d8f /usr/local/matlab/bin/glnx86/../../bin/glnx86/../../bin/glnx86/libuij.so+00236943 svWS_ProcessPendingEvents(int, int, bool)+000595 [ 52] 0x0625820a /usr/local/matlab/bin/glnx86/../../bin/glnx86/../../bin/glnx86/libuij.so+00250378 UIJ_WS_ProcessPendingEvents(int, int)+000044 [ 53] 0x0094673f /usr/local/matlab/bin/glnx86/../../bin/glnx86/libmwservices.so+00378687 svWS_ProcessPendingEvents+000037 [ 54] 0x007f0e55 /usr/local/matlab/bin/glnx86/../../bin/glnx86/libmwmcr.so+00081493 [ 55] 0x007f117a /usr/local/matlab/bin/glnx86/../../bin/glnx86/libmwmcr.so+00082298 [ 56] 0x007f13ab /usr/local/matlab/bin/glnx86/../../bin/glnx86/libmwmcr.so+00082859 [ 57] 0x0024de99 /lib/i386-linux-gnu/libpthread.so.0+00024217 [ 58] 0x0385673e /lib/i386-linux-gnu/libc.so.6+00853822 clone+000094 Best wishes peng |