segmentation violation problem help

1 view (last 30 days)
shuo xu
shuo xu on 13 Mar 2015
Answered: Image Analyst on 13 Mar 2015
Hi, I encountered a segmentation violation warning every time when I ran my code. The message is as below: Configuration: Crash Decoding : Disabled Default Encoding: windows-1252 MATLAB Root : G:\Program Files\MATLAB\R2012a MATLAB Version : 7.14.0.739 (R2012a) Operating System: Microsoft Windows 7 Processor ID : x86 Family 6 Model 42 Stepping 7, GenuineIntel Virtual Machine : Java 1.6.0_17-b04 with Sun Microsystems Inc. Java HotSpot™ 64-Bit Server VM mixed mode Window System : Version 6.1 (Build 7601: Service Pack 1)
Fault Count: 1
Abnormal termination: Segmentation violation
Register State (from fault): RAX = 00000000a4640050 RBX = 0000000000000000 RCX = 000000007653c980 RDX = 00000000000d65c0 RSP = 000000000411ee58 RBP = 00000000a7346cb0 RSI = 0000000000008238 RDI = 00000000a944f700
R8 = 0000000000027100 R9 = 0000000000006b2e
R10 = 0000000000007190 R11 = 0000000000000000
R12 = 0000000000000000 R13 = 0000000000006e6a
R14 = 0000000000003b45 R15 = 0000000000003322
RIP = 000007fed9c41dc4 EFL = 00010206
CS = 0033 FS = 0053 GS = 002b
Stack Trace (from fault): [ 0] 0x000007fed9c41dc4 C:\Program Files\IBM\ILOG\CPLEX_Studio126\opl\bin\x64_win64\cplex1260.dll+02825668 ( CPXEgeneric_unlock+046084 ) [ 1] 0x000007fed9e19f97 C:\Program Files\IBM\ILOG\CPLEX_Studio126\opl\bin\x64_win64\cplex1260.dll+04759447 ( c97863999c43fd56d2771c0378f07bfd+216727 ) [ 2] 0x000007fed9dfea8f C:\Program Files\IBM\ILOG\CPLEX_Studio126\opl\bin\x64_win64\cplex1260.dll+04647567 ( c97863999c43fd56d2771c0378f07bfd+104847 ) [ 3] 0x000007fed9c6f803 C:\Program Files\IBM\ILOG\CPLEX_Studio126\opl\bin\x64_win64\cplex1260.dll+03012611 ( CPXEgeneric_lock+002771 ) [ 4] 0x000007fed9c7157f C:\Program Files\IBM\ILOG\CPLEX_Studio126\opl\bin\x64_win64\cplex1260.dll+03020159 ( DllMain+001327 ) [ 5] 0x000007fed9c73881 C:\Program Files\IBM\ILOG\CPLEX_Studio126\opl\bin\x64_win64\cplex1260.dll+03029121 ( DllMain+010289 ) [ 6] 0x000007fed9c730f1 C:\Program Files\IBM\ILOG\CPLEX_Studio126\opl\bin\x64_win64\cplex1260.dll+03027185 ( DllMain+008353 ) [ 7] 0x000007fed9c6f9b1 C:\Program Files\IBM\ILOG\CPLEX_Studio126\opl\bin\x64_win64\cplex1260.dll+03013041 ( CPXEgeneric_lock+003201 ) [ 8] 0x000007fed9dfc8ff C:\Program Files\IBM\ILOG\CPLEX_Studio126\opl\bin\x64_win64\cplex1260.dll+04638975 ( c97863999c43fd56d2771c0378f07bfd+096255 ) [ 9] 0x000007fed9dfaff4 C:\Program Files\IBM\ILOG\CPLEX_Studio126\opl\bin\x64_win64\cplex1260.dll+04632564 ( c97863999c43fd56d2771c0378f07bfd+089844 ) [ 10] 0x000007fed9c68c30 C:\Program Files\IBM\ILOG\CPLEX_Studio126\opl\bin\x64_win64\cplex1260.dll+02985008 ( CPXEgeneric_unlock+205424 ) [ 11] 0x000007fed9cd8154 C:\Program Files\IBM\ILOG\CPLEX_Studio126\opl\bin\x64_win64\cplex1260.dll+03440980 ( CPXLstoreNEThandle+005332 ) [ 12] 0x000007fed9c4360f C:\Program Files\IBM\ILOG\CPLEX_Studio126\opl\bin\x64_win64\cplex1260.dll+02831887 ( CPXEgeneric_unlock+052303 ) [ 13] 0x000007fed9c42ddc C:\Program Files\IBM\ILOG\CPLEX_Studio126\opl\bin\x64_win64\cplex1260.dll+02829788 ( CPXEgeneric_unlock+050204 ) [ 14] 0x000007fed9c6f562 C:\Program Files\IBM\ILOG\CPLEX_Studio126\opl\bin\x64_win64\cplex1260.dll+03011938 ( CPXEgeneric_lock+002098 ) [ 15] 0x000007fed9c7157f C:\Program Files\IBM\ILOG\CPLEX_Studio126\opl\bin\x64_win64\cplex1260.dll+03020159 ( DllMain+001327 ) [ 16] 0x000007fed9c7267e C:\Program Files\IBM\ILOG\CPLEX_Studio126\opl\bin\x64_win64\cplex1260.dll+03024510 ( DllMain+005678 ) [ 17] 0x000007fed9c6f692 C:\Program Files\IBM\ILOG\CPLEX_Studio126\opl\bin\x64_win64\cplex1260.dll+03012242 ( CPXEgeneric_lock+002402 ) [ 18] 0x000007fed9c436cc C:\Program Files\IBM\ILOG\CPLEX_Studio126\opl\bin\x64_win64\cplex1260.dll+02832076 ( CPXEgeneric_unlock+052492 ) [ 19] 0x000007fed9ebe010 C:\Program Files\IBM\ILOG\CPLEX_Studio126\opl\bin\x64_win64\cplex1260.dll+05431312 ( CPXindconstrslackfromx+000160 ) [ 20] 0x000007fed9ebe068 C:\Program Files\IBM\ILOG\CPLEX_Studio126\opl\bin\x64_win64\cplex1260.dll+05431400 ( CPXmipopt+000056 ) [ 21] 0x000007feed892521 C:\Program Files\IBM\ILOG\CPLEX_Studio126\cplex\matlab\x64_win64\cplexlink1260.mexw64+00009505 ( ???+000000 ) [ 22] 0x000007feed89292d C:\Program Files\IBM\ILOG\CPLEX_Studio126\cplex\matlab\x64_win64\cplexlink1260.mexw64+00010541 ( mexFunction+000509 ) [ 23] 0x000000006d430f63 G:\Program Files\MATLAB\R2012a\bin\win64\libmex.dll+00069475 ( mexRunMexFile+000131 ) [ 24] 0x000000006d42fce2 G:\Program Files\MATLAB\R2012a\bin\win64\libmex.dll+00064738 ( inSwapMexfileReader+000226 ) [ 25] 0x000000006d42fe58 G:\Program Files\MATLAB\R2012a\bin\win64\libmex.dll+00065112 ( inSwapMexfileReader+000600 ) [ 26] 0x0000000004fbb046 G:\Program Files\MATLAB\R2012a\bin\win64\m_dispatcher.dll+00045126 ( Mfh_file::dispatch_fh+000486 ) [ 27] 0x0000000004fbb93c G:\Program Files\MATLAB\R2012a\bin\win64\m_dispatcher.dll+00047420 ( Mfunction_handle::dispatch+000812 ) [ 28] 0x00000000047d4ff3 G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+00479219 ( inDestroyWS+193347 ) [ 29] 0x00000000047d6668 G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+00484968 ( inDestroyWS+199096 ) [ 30] 0x00000000047be41f G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+00386079 ( inDestroyWS+100207 ) [ 31] 0x00000000047be390 G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+00385936 ( inDestroyWS+100064 ) [ 32] 0x00000000047d1ae1 G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+00465633 ( inDestroyWS+179761 ) [ 33] 0x00000000047d2cca G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+00470218 ( inDestroyWS+184346 ) [ 34] 0x00000000047c5709 G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+00415497 ( inDestroyWS+129625 ) [ 35] 0x0000000004fbb046 G:\Program Files\MATLAB\R2012a\bin\win64\m_dispatcher.dll+00045126 ( Mfh_file::dispatch_fh+000486 ) [ 36] 0x0000000004fbb93c G:\Program Files\MATLAB\R2012a\bin\win64\m_dispatcher.dll+00047420 ( Mfunction_handle::dispatch+000812 ) [ 37] 0x00000000047d4ff3 G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+00479219 ( inDestroyWS+193347 ) [ 38] 0x00000000047d6668 G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+00484968 ( inDestroyWS+199096 ) [ 39] 0x00000000047be41f G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+00386079 ( inDestroyWS+100207 ) [ 40] 0x00000000047be390 G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+00385936 ( inDestroyWS+100064 ) [ 41] 0x00000000047d1ae1 G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+00465633 ( inDestroyWS+179761 ) [ 42] 0x00000000047d2cca G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+00470218 ( inDestroyWS+184346 ) [ 43] 0x00000000047c5709 G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+00415497 ( inDestroyWS+129625 ) [ 44] 0x0000000004fbb046 G:\Program Files\MATLAB\R2012a\bin\win64\m_dispatcher.dll+00045126 ( Mfh_file::dispatch_fh+000486 ) [ 45] 0x0000000004fbb93c G:\Program Files\MATLAB\R2012a\bin\win64\m_dispatcher.dll+00047420 ( Mfunction_handle::dispatch+000812 ) [ 46] 0x00000000047d4ff3 G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+00479219 ( inDestroyWS+193347 ) [ 47] 0x00000000047d6668 G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+00484968 ( inDestroyWS+199096 ) [ 48] 0x00000000047be41f G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+00386079 ( inDestroyWS+100207 ) [ 49] 0x00000000047be390 G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+00385936 ( inDestroyWS+100064 ) [ 50] 0x00000000047d1ae1 G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+00465633 ( inDestroyWS+179761 ) [ 51] 0x00000000047d2cca G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+00470218 ( inDestroyWS+184346 ) [ 52] 0x00000000047c5709 G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+00415497 ( inDestroyWS+129625 ) [ 53] 0x0000000004fbb046 G:\Program Files\MATLAB\R2012a\bin\win64\m_dispatcher.dll+00045126 ( Mfh_file::dispatch_fh+000486 ) [ 54] 0x0000000004fbb93c G:\Program Files\MATLAB\R2012a\bin\win64\m_dispatcher.dll+00047420 ( Mfunction_handle::dispatch+000812 ) [ 55] 0x00000000047d4ff3 G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+00479219 ( inDestroyWS+193347 ) [ 56] 0x000000000485f373 G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+01045363 ( inEachVisibleName+020035 ) [ 57] 0x00000000047d7f37 G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+00491319 ( inDestroyWS+205447 ) [ 58] 0x00000000047be41f G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+00386079 ( inDestroyWS+100207 ) [ 59] 0x00000000047be390 G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+00385936 ( inDestroyWS+100064 ) [ 60] 0x00000000047d1ae1 G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+00465633 ( inDestroyWS+179761 ) [ 61] 0x00000000047d2cca G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+00470218 ( inDestroyWS+184346 ) [ 62] 0x00000000047c5709 G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+00415497 ( inDestroyWS+129625 ) [ 63] 0x0000000004fbb046 G:\Program Files\MATLAB\R2012a\bin\win64\m_dispatcher.dll+00045126 ( Mfh_file::dispatch_fh+000486 ) [ 64] 0x0000000004fbb93c G:\Program Files\MATLAB\R2012a\bin\win64\m_dispatcher.dll+00047420 ( Mfunction_handle::dispatch+000812 ) [ 65] 0x00000000047d4ff3 G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+00479219 ( inDestroyWS+193347 ) [ 66] 0x000000000485f373 G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+01045363 ( inEachVisibleName+020035 ) [ 67] 0x00000000047d7f37 G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+00491319 ( inDestroyWS+205447 ) [ 68] 0x00000000047be41f G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+00386079 ( inDestroyWS+100207 ) [ 69] 0x00000000047be390 G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+00385936 ( inDestroyWS+100064 ) [ 70] 0x00000000047d1ae1 G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+00465633 ( inDestroyWS+179761 ) [ 71] 0x00000000047d2cca G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+00470218 ( inDestroyWS+184346 ) [ 72] 0x00000000047c5709 G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+00415497 ( inDestroyWS+129625 ) [ 73] 0x0000000004fbb046 G:\Program Files\MATLAB\R2012a\bin\win64\m_dispatcher.dll+00045126 ( Mfh_file::dispatch_fh+000486 ) [ 74] 0x0000000004fbb93c G:\Program Files\MATLAB\R2012a\bin\win64\m_dispatcher.dll+00047420 ( Mfunction_handle::dispatch+000812 ) [ 75] 0x000000000486f805 G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+01112069 ( PushMcparserInterface::PushMcparserInterface+001557 ) [ 76] 0x000000000487d745 G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+01169221 ( init_cleaner+006021 ) [ 77] 0x000000000487d6e5 G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+01169125 ( init_cleaner+005925 ) [ 78] 0x000000000487d6b8 G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+01169080 ( init_cleaner+005880 ) [ 79] 0x000000000487d677 G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+01169015 ( init_cleaner+005815 ) [ 80] 0x000000000476f679 G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+00063097 ( inFullFevalFcn+001737 ) [ 81] 0x0000000004873ed0 G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+01130192 ( inValidateLoadedObject+013280 ) [ 82] 0x0000000004873f5c G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+01130332 ( inValidateLoadedObject+013420 ) [ 83] 0x0000000004873fb1 G:\Program Files\MATLAB\R2012a\bin\win64\m_interpreter.dll+01130417 ( inEvalCmdWithLocalReturn+000065 ) [ 84] 0x0000000079fc016d G:\Program Files\MATLAB\R2012a\bin\win64\libmwbridge.dll+00065901 ( mnDebugPrompt+000109 ) [ 85] 0x0000000079fc177c G:\Program Files\MATLAB\R2012a\bin\win64\libmwbridge.dll+00071548 ( mnParser+000412 ) [ 86] 0x00000000749f4164 G:\Program Files\MATLAB\R2012a\bin\win64\mcr.dll+00541028 ( mcrInstance::mnParser_on_interpreter_thread+000036 ) [ 87] 0x00000000749d6a6f G:\Program Files\MATLAB\R2012a\bin\win64\mcr.dll+00420463 ( DepfunRules::postWarning+029263 ) [ 88] 0x00000000749d6ad1 G:\Program Files\MATLAB\R2012a\bin\win64\mcr.dll+00420561 ( DepfunRules::postWarning+029361 ) [ 89] 0x00000000067dc556 G:\Program Files\MATLAB\R2012a\bin\win64\uiw.dll+00378198 ( UIW_IsUserMessage+000086 ) [ 90] 0x00000000067dcbd4 G:\Program Files\MATLAB\R2012a\bin\win64\uiw.dll+00379860 ( ws_ProcessOneEventBlocking+001028 ) [ 91] 0x0000000076da87fe C:\Windows\system32\USER32.dll+00165886 ( GetMenuBarInfo+000638 ) [ 92] 0x0000000076d8f5fb C:\Windows\system32\USER32.dll+00062971 ( SystemParametersInfoW+000235 ) [ 93] 0x0000000076d94895 C:\Windows\system32\USER32.dll+00084117 ( IsProcessDPIAware+000465 ) [ 94] 0x00000000771311f5 C:\Windows\SYSTEM32\ntdll.dll+00332277 ( KiUserCallbackDispatcher+000031 ) [ 95] 0x0000000076d99e6a C:\Windows\system32\USER32.dll+00106090 ( SfmDxSetSwapChainStats+000026 ) [ 96] 0x0000000076d9615e C:\Windows\system32\USER32.dll+00090462 ( GetMessageA+000078 ) [ 97] 0x00000000067b7be7 G:\Program Files\MATLAB\R2012a\bin\win64\uiw.dll+00228327 ( UIW_SetCurrentDialog+000855 ) [ 98] 0x00000000067ddfa7 G:\Program Files\MATLAB\R2012a\bin\win64\uiw.dll+00384935 ( ws_FreeSystemFont+000519 ) [ 99] 0x000000007bf7e4f3 G:\Program Files\MATLAB\R2012a\bin\win64\libmwservices.dll+00713971 ( sysq::removeCommitDatabaseUpdatesHook+002131 ) [100] 0x000000007bf7fc68 G:\Program Files\MATLAB\R2012a\bin\win64\libmwservices.dll+00719976 ( sysq::removeCommitDatabaseUpdatesHook+008136 ) [101] 0x000000007bf81880 G:\Program Files\MATLAB\R2012a\bin\win64\libmwservices.dll+00727168 ( sysq::addProcessPendingEventsUnitTestHook+000240 ) [102] 0x000000007bf81948 G:\Program Files\MATLAB\R2012a\bin\win64\libmwservices.dll+00727368 ( sysq::addProcessPendingEventsUnitTestHook+000440 ) [103] 0x000000007bf81b03 G:\Program Files\MATLAB\R2012a\bin\win64\libmwservices.dll+00727811 ( sysq::addProcessPendingEventsUnitTestHook+000883 ) [104] 0x000000007bf81bd6 G:\Program Files\MATLAB\R2012a\bin\win64\libmwservices.dll+00728022 ( sysq::addProcessPendingEventsUnitTestHook+001094 ) [105] 0x00000000749d7cff G:\Program Files\MATLAB\R2012a\bin\win64\mcr.dll+00425215 ( DepfunRules::postWarning+034015 ) [106] 0x00000000749d8024 G:\Program Files\MATLAB\R2012a\bin\win64\mcr.dll+00426020 ( DepfunRules::postWarning+034820 ) [107] 0x00000000749d84be G:\Program Files\MATLAB\R2012a\bin\win64\mcr.dll+00427198 ( DepfunRules::postWarning+035998 ) [108] 0x000000013f50b8f9 G:\Program Files\MATLAB\R2012a\bin\win64\MATLAB.exe+00047353 ( ???+000000 ) [109] 0x000000013f50bbd6 G:\Program Files\MATLAB\R2012a\bin\win64\MATLAB.exe+00048086 ( ???+000000 ) [110] 0x000000013f50c133 G:\Program Files\MATLAB\R2012a\bin\win64\MATLAB.exe+00049459 ( ???+000000 ) [111] 0x0000000076fd59ed C:\Windows\system32\kernel32.dll+00088557 ( BaseThreadInitThunk+000013 ) [112] 0x000000007710c541 C:\Windows\SYSTEM32\ntdll.dll+00181569 ( RtlUserThreadStart+000033 )
The interesting thing is if I set up a break point before where the warning happens and manually pass the line, the program runs very well. It only gives me warning message when I automatically run the program. Can anyone give me a good idea of solving this issue?

Answers (1)

Image Analyst
Image Analyst on 13 Mar 2015

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!