MatLab Mex File Crashing Every Third Run -
i trying run codes glmnet package (http://web.stanford.edu/~hastie/glmnet_matlab/index.html). calls mex files during process. when run functions package first 2 times, works fine. every third time try, matlab gives "catastrophic" error , requires me close it. can possibly memory allocation mex files? wondering if may common problem mex files user. thanks.
edit: here "catastrophic" error:
------------------------------------------------------------------------ access violation detected @ mon jul 13 13:20:32 2015 ------------------------------------------------------------------------ configuration: crash decoding : disabled crash mode : continue (default) current graphics driver: unknown hardware default encoding : windows-1252 graphics card 1 : nvidia ( 0x10de ) nvidia geforce gt 740m version 9.18.13.4752 graphics card 2 : intel corporation ( 0x8086 ) intel(r) hd graphics 4000 version 10.18.10.3308 host name : marcelo matlab architecture : win64 matlab root : c:\program files\matlab\matlab production server\r2015a matlab version : 8.5.0.197613 (r2015a) opengl : hardware operating system : microsoft windows 8.1 single language processor id : x86 family 6 model 58 stepping 9, genuineintel virtual machine : java 1.7.0_60-b19 oracle corporation java hotspot(tm) 64-bit server vm mixed mode window system : version 6.3 (build 9600) fault count: 1 abnormal termination: access violation register state (from fault): rax = 00006e6f69746365 rbx = 0000000000000000 rcx = 0000000004032bf0 rdx = 0000000000000000 rsp = 0000000004031108 rbp = 0000000004032ce0 rsi = 00000000f69ef970 rdi = 0000000004032be0 r8 = 000000007fc60fc0 r9 = 0000000000000006 r10 = 000000007fefd750 r11 = 000000007fefd750 r12 = 0000000000000001 r13 = 0000000000000000 r14 = 0000000004032ce0 r15 = 0000000004032be0 rip = 00000000fe16e073 efl = 00010206 cs = 0033 fs = 0053 gs = 002b stack trace (from fault): [ 0] 0x00000000fe16e073 c:\program files\matlab\matlab production server\r2015a\bin\win64\libmx.dll+00450675 mxgetpr+00000003 [ 1] 0x00007ff87cdc1a95 c:\users\marcelo\desktop\marcelo\puc\mestrado\diss\instrumentselection\glmnet_matlab\glmnetmex.mexw64+00006805 mexfunction+00002709 [ 2] 0x00000000fc5f3740 c:\program files\matlab\matlab production server\r2015a\bin\win64\libmex.dll+00079680 mexrunmexfile+00000112 [ 3] 0x00000000fc5f2a72 c:\program files\matlab\matlab production server\r2015a\bin\win64\libmex.dll+00076402 inswapmexfilereader+00000594 [ 4] 0x00000000fc5f25c8 c:\program files\matlab\matlab production server\r2015a\bin\win64\libmex.dll+00075208 mexunlock+00002840 [ 5] 0x0000000004f22694 c:\program files\matlab\matlab production server\r2015a\bin\win64\m_dispatcher.dll+00075412 mfh_file::dispatch_fh+00000548 [ 6] 0x0000000004f22a7e c:\program files\matlab\matlab production server\r2015a\bin\win64\m_dispatcher.dll+00076414 mfunction_handle::dispatch+00000766 [ 7] 0x0000000005059597 c:\program files\matlab\matlab production server\r2015a\bin\win64\m_interpreter.dll+00103831 in_is_matlab_function+00048455 [ 8] 0x000000000505a1ab c:\program files\matlab\matlab production server\r2015a\bin\win64\m_interpreter.dll+00106923 in_is_matlab_function+00051547 [ 9] 0x000000000512684f c:\program files\matlab\matlab production server\r2015a\bin\win64\m_interpreter.dll+00944207 mathworks::mexception::mexceptionenvelope::mcosclassid+00000991 [ 10] 0x00000000051267b1 c:\program files\matlab\matlab production server\r2015a\bin\win64\m_interpreter.dll+00944049 mathworks::mexception::mexceptionenvelope::mcosclassid+00000833 [ 11] 0x000000000509da75 c:\program files\matlab\matlab production server\r2015a\bin\win64\m_interpreter.dll+00383605 ingetcurrentws+00155269 [ 12] 0x000000000509ce8c c:\program files\matlab\matlab production server\r2015a\bin\win64\m_interpreter.dll+00380556 ingetcurrentws+00152220 [ 13] 0x000000000509b6e9 c:\program files\matlab\matlab production server\r2015a\bin\win64\m_interpreter.dll+00374505 ingetcurrentws+00146169 [ 14] 0x0000000004f22694 c:\program files\matlab\matlab production server\r2015a\bin\win64\m_dispatcher.dll+00075412 mfh_file::dispatch_fh+00000548 [ 15] 0x0000000004f22a7e c:\program files\matlab\matlab production server\r2015a\bin\win64\m_dispatcher.dll+00076414 mfunction_handle::dispatch+00000766 [ 16] 0x0000000005059597 c:\program files\matlab\matlab production server\r2015a\bin\win64\m_interpreter.dll+00103831 in_is_matlab_function+00048455 [ 17] 0x000000000505a1ab c:\program files\matlab\matlab production server\r2015a\bin\win64\m_interpreter.dll+00106923 in_is_matlab_function+00051547 [ 18] 0x000000000512684f c:\program files\matlab\matlab production server\r2015a\bin\win64\m_interpreter.dll+00944207 mathworks::mexception::mexceptionenvelope::mcosclassid+00000991 [ 19] 0x00000000051267b1 c:\program files\matlab\matlab production server\r2015a\bin\win64\m_interpreter.dll+00944049 mathworks::mexception::mexceptionenvelope::mcosclassid+00000833 [ 20] 0x000000000509da75 c:\program files\matlab\matlab production server\r2015a\bin\win64\m_interpreter.dll+00383605 ingetcurrentws+00155269 [ 21] 0x000000000509ce8c c:\program files\matlab\matlab production server\r2015a\bin\win64\m_interpreter.dll+00380556 ingetcurrentws+00152220 [ 22] 0x000000000509b6e9 c:\program files\matlab\matlab production server\r2015a\bin\win64\m_interpreter.dll+00374505 ingetcurrentws+00146169 [ 23] 0x0000000004f22694 c:\program files\matlab\matlab production server\r2015a\bin\win64\m_dispatcher.dll+00075412 mfh_file::dispatch_fh+00000548 [ 24] 0x0000000004f22a7e c:\program files\matlab\matlab production server\r2015a\bin\win64\m_dispatcher.dll+00076414 mfunction_handle::dispatch+00000766 [ 25] 0x0000000005059597 c:\program files\matlab\matlab production server\r2015a\bin\win64\m_interpreter.dll+00103831 in_is_matlab_function+00048455 [ 26] 0x00000000051731a7 c:\program files\matlab\matlab production server\r2015a\bin\win64\m_interpreter.dll+01257895 iniskeyword+00027799 [ 27] 0x000000000505b69a c:\program files\matlab\matlab production server\r2015a\bin\win64\m_interpreter.dll+00112282 in_is_matlab_function+00056906 [ 28] 0x000000000512684f c:\program files\matlab\matlab production server\r2015a\bin\win64\m_interpreter.dll+00944207 mathworks::mexception::mexceptionenvelope::mcosclassid+00000991 [ 29] 0x00000000051267b1 c:\program files\matlab\matlab production server\r2015a\bin\win64\m_interpreter.dll+00944049 mathworks::mexception::mexceptionenvelope::mcosclassid+00000833 [ 30] 0x000000000509da75 c:\program files\matlab\matlab production server\r2015a\bin\win64\m_interpreter.dll+00383605 ingetcurrentws+00155269 [ 31] 0x000000000509ce8c c:\program files\matlab\matlab production server\r2015a\bin\win64\m_interpreter.dll+00380556 ingetcurrentws+00152220 [ 32] 0x000000000509b6e9 c:\program files\matlab\matlab production server\r2015a\bin\win64\m_interpreter.dll+00374505 ingetcurrentws+00146169 [ 33] 0x0000000004f22757 c:\program files\matlab\matlab production server\r2015a\bin\win64\m_dispatcher.dll+00075607 mfh_file::dispatch_fh+00000743 [ 34] 0x0000000004f22a7e c:\program files\matlab\matlab production server\r2015a\bin\win64\m_dispatcher.dll+00076414 mfunction_handle::dispatch+00000766 [ 35] 0x0000000005059597 c:\program files\matlab\matlab production server\r2015a\bin\win64\m_interpreter.dll+00103831 in_is_matlab_function+00048455 [ 36] 0x00000000051731a7 c:\program files\matlab\matlab production server\r2015a\bin\win64\m_interpreter.dll+01257895 iniskeyword+00027799 [ 37] 0x000000000505b69a c:\program files\matlab\matlab production server\r2015a\bin\win64\m_interpreter.dll+00112282 in_is_matlab_function+00056906 [ 38] 0x000000000512684f c:\program files\matlab\matlab production server\r2015a\bin\win64\m_interpreter.dll+00944207 mathworks::mexception::mexceptionenvelope::mcosclassid+00000991 [ 39] 0x00000000051267b1 c:\program files\matlab\matlab production server\r2015a\bin\win64\m_interpreter.dll+00944049 mathworks::mexception::mexceptionenvelope::mcosclassid+00000833 [ 40] 0x000000000509da75 c:\program files\matlab\matlab production server\r2015a\bin\win64\m_interpreter.dll+00383605 ingetcurrentws+00155269 [ 41] 0x000000000509ce8c c:\program files\matlab\matlab production server\r2015a\bin\win64\m_interpreter.dll+00380556 ingetcurrentws+00152220 [ 42] 0x000000000509b6e9 c:\program files\matlab\matlab production server\r2015a\bin\win64\m_interpreter.dll+00374505 ingetcurrentws+00146169 [ 43] 0x0000000004f22757 c:\program files\matlab\matlab production server\r2015a\bin\win64\m_dispatcher.dll+00075607 mfh_file::dispatch_fh+00000743 [ 44] 0x0000000004f22a7e c:\program files\matlab\matlab production server\r2015a\bin\win64\m_dispatcher.dll+00076414 mfunction_handle::dispatch+00000766 [ 45] 0x000000000512b268 c:\program files\matlab\matlab production server\r2015a\bin\win64\m_interpreter.dll+00963176 inanonymousfunction+00000360 [ 46] 0x000000000512b864 c:\program files\matlab\matlab production server\r2015a\bin\win64\m_interpreter.dll+00964708 inanonymousfunction+00001892 [ 47] 0x000000000512ba25 c:\program files\matlab\matlab production server\r2015a\bin\win64\m_interpreter.dll+00965157 inanonymousfunction+00002341 [ 48] 0x000000000512b9f2 c:\program files\matlab\matlab production server\r2015a\bin\win64\m_interpreter.dll+00965106 inanonymousfunction+00002290 [ 49] 0x000000000512b9a7 c:\program files\matlab\matlab production server\r2015a\bin\win64\m_interpreter.dll+00965031 inanonymousfunction+00002215 [ 50] 0x00000000050df6bd c:\program files\matlab\matlab production server\r2015a\bin\win64\m_interpreter.dll+00652989 ingetcallersworkspace+00001805 [ 51] 0x00000000050d854d c:\program files\matlab\matlab production server\r2015a\bin\win64\m_interpreter.dll+00623949 inevalcmdwithlocalreturn+00000285 [ 52] 0x00000000050d8471 c:\program files\matlab\matlab production server\r2015a\bin\win64\m_interpreter.dll+00623729 inevalcmdwithlocalreturn+00000065 [ 53] 0x00000000fb5fe82d c:\program files\matlab\matlab production server\r2015a\bin\win64\libmwbridge.dll+00059437 mngetprompt+00002717 [ 54] 0x00000000fb5ff2a9 c:\program files\matlab\matlab production server\r2015a\bin\win64\libmwbridge.dll+00062121 mnparser+00000745 [ 55] 0x00000000fd0e13d4 c:\program files\matlab\matlab production server\r2015a\bin\win64\mcr.dll+00398292 mcrinstance::mnparser_on_interpreter_thread+00000036 [ 56] 0x00000000fd0a9757 c:\program files\matlab\matlab production server\r2015a\bin\win64\mcr.dll+00169815 mcr::runtime::setinterpreterthreadtocurrent+00019751 [ 57] 0x00000000fd0a9793 c:\program files\matlab\matlab production server\r2015a\bin\win64\mcr.dll+00169875 mcr::runtime::setinterpreterthreadtocurrent+00019811 [ 58] 0x00000000fd0a9f91 c:\program files\matlab\matlab production server\r2015a\bin\win64\mcr.dll+00171921 mcr::runtime::setinterpreterthreadtocurrent+00021857 [ 59] 0x00000000fab5d216 c:\program files\matlab\matlab production server\r2015a\bin\win64\uiw.dll+00512534 uiw_attachthreadinput+00001270 [ 60] 0x00000000fab5caa5 c:\program files\matlab\matlab production server\r2015a\bin\win64\uiw.dll+00510629 wsd_to_msw+00004373 [ 61] 0x00000000fab5cb29 c:\program files\matlab\matlab production server\r2015a\bin\win64\uiw.dll+00510761 wsd_to_msw+00004505 [ 62] 0x00007ff8ad1708ca c:\windows\system32\user32.dll+00592074 broadcastsystemmessageexa+00000586 [ 63] 0x00007ff8ad0e2e1f c:\windows\system32\user32.dll+00011807 iswindow+00000367 [ 64] 0x00007ff8ad0e2e96 c:\windows\system32\user32.dll+00011926 iswindow+00000486 [ 65] 0x00007ff8af413034 c:\windows\system32\ntdll.dll+00602164 kiusercallbackdispatcher+00000036 [ 66] 0x00007ff8ad0e2a8a c:\windows\system32\user32.dll+00010890 peekmessagew+00000250 [ 67] 0x00007ff8ad0e6283 c:\windows\system32\user32.dll+00025219 getmessagea+00000243 [ 68] 0x00007ff8ad0e622f c:\windows\system32\user32.dll+00025135 getmessagea+00000159 [ 69] 0x00000000fab09bdb c:\program files\matlab\matlab production server\r2015a\bin\win64\uiw.dll+00170971 uiw_showmenuitem+00005179 [ 70] 0x00000000fab5db52 c:\program files\matlab\matlab production server\r2015a\bin\win64\uiw.dll+00514898 uiw_suspendattachthreadinput+00000466 [ 71] 0x0000000100122c83 c:\program files\matlab\matlab production server\r2015a\bin\win64\libmwservices.dll+01256579 services::system_events::ppedispatchhook::dispatchone+00032291 [ 72] 0x000000010012e6f5 c:\program files\matlab\matlab production server\r2015a\bin\win64\libmwservices.dll+01304309 sysq::addprocesspendingeventsunittesthook+00005813 [ 73] 0x000000010012e7a0 c:\program files\matlab\matlab production server\r2015a\bin\win64\libmwservices.dll+01304480 sysq::addprocesspendingeventsunittesthook+00005984 [ 74] 0x0000000100130595 c:\program files\matlab\matlab production server\r2015a\bin\win64\libmwservices.dll+01312149 sysq::getcondition+00004629 [ 75] 0x0000000100131f52 c:\program files\matlab\matlab production server\r2015a\bin\win64\libmwservices.dll+01318738 svws_processpendingevents+00000162 [ 76] 0x00000000fd0aa6ad c:\program files\matlab\matlab production server\r2015a\bin\win64\mcr.dll+00173741 mcr::runtime::setinterpreterthreadtocurrent+00023677 [ 77] 0x00000000fd0ab31a c:\program files\matlab\matlab production server\r2015a\bin\win64\mcr.dll+00176922 mcr::runtime::setinterpreterthreadtocurrent+00026858 [ 78] 0x00000000fd0a2f75 c:\program files\matlab\matlab production server\r2015a\bin\win64\mcr.dll+00143221 mcr_process_events+00007557 [ 79] 0x00000000fd0a4882 c:\program files\matlab\matlab production server\r2015a\bin\win64\mcr.dll+00149634 mcr_process_events+00013970 [ 80] 0x00000000084ab49d c:\program files\matlab\matlab production server\r2015a\bin\win64\mvmlocal.dll+00177309 mvm_server::inproc::localfactory::terminate+00048141 [ 81] 0x00000000fa8fa27a c:\program files\matlab\matlab production server\r2015a\bin\win64\mvm.dll+00828026 mvm::detail::initlocalmvmhack+00000490 [ 82] 0x00000000fa8fa838 c:\program files\matlab\matlab production server\r2015a\bin\win64\mvm.dll+00829496 mvm::detail::sessionimpl::privatesession+00000376 [ 83] 0x00000000fa8faa88 c:\program files\matlab\matlab production server\r2015a\bin\win64\mvm.dll+00830088 mvm::detail::sessionimpl::privatesession+00000968 [ 84] 0x000000014000630d c:\program files\matlab\matlab production server\r2015a\bin\win64\matlab.exe+00025357 [ 85] 0x0000000140007dd0 c:\program files\matlab\matlab production server\r2015a\bin\win64\matlab.exe+00032208 [ 86] 0x00007ff8acea13d2 c:\windows\system32\kernel32.dll+00005074 basethreadinitthunk+00000034 [ 87] 0x00007ff8af395444 c:\windows\system32\ntdll.dll+00087108 rtluserthreadstart+00000052 error detected while mex-file running. if mex-file not official mathworks function, please examine source code errors. please consult external interfaces guide information on debugging mex-files. if problem reproducible, please submit service request via: http://www.mathworks.com/support/contact_us/ technical support engineer might contact further information. thank help.
summarizing our comments above, first step through mex function debugger. check out post on how set ide based on whatever operating system you're using: preventing mex file crashing in matlab... on third try, figure out line it's crashing at.
now figured out it's crashing, you're getting unresolved link errors. unresolved linking errors come trying use code / functions there no definition code available. sounds there precompiled mex files causing problem when run code. try recompiling code compatible system.
the instructions 64-bit windows here: http://web.stanford.edu/~hastie/glmnet_matlab/win64compile.html. similarly, 32-bit instructions here: http://web.stanford.edu/~hastie/glmnet_matlab/win32compile.html. can skip second step in instructions, believe step handled more recent versions of matlab.
hope make things more stable!
Comments
Post a Comment