[討論] SegTool無法執行
作業環境:Win 7 64bit + Matlab2012b
最近在看segmentation的東西
在網路上找到一個別人寫好的程式 (SegTool,一個做影像切割的程式)
http://www.cs.cmu.edu/~mohitg/segmentation.htm
我照著指令把兩個mex檔建好後 (compiler使用 Microsoft Visual C++ 2010)
(in d:\Program Files (x86)\Microsoft Visual Studio 10.0)
執行時卻會出現Segmentation violation
我覺得可能是compiler的問題,但我的visual studio 2010可以正常編譯x64的執行檔
不知道是哪個環節出了問題呢?
請各位先進不吝賜教,謝謝!
以下是error message
===========================================================================
MATLAB crash
file:C:\Users\Trumen\AppData\Local\Temp\matlab_crash_dump.10908-1:
------------------------------------------------------------------------
Segmentation violation detected at Wed Apr 24 21:45:50 2013
------------------------------------------------------------------------
Configuration:
Crash Decoding : Disabled
Default Encoding: Big5
MATLAB Root : D:\Program Files\MATLAB\R2012b
MATLAB Version : 8.0.0.783 (R2012b)
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(TM) 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 = 00000000150164d0 RBX = 000000002c0de6a0
RCX = 00000000000010e7 RDX = 000000004060e000
RSP = 000000000405dc70 RBP = 000000000405dd70
RSI = ffffffffff820380 RDI = 00000000000000b1
R8 = 00000000000000a9 R9 = 00000000059d8d60
R10 = 0000000000000000 R11 = 000000000405dc10
R12 = 0000000000000548 R13 = 000000001510d620
R14 = 000000001504b2c0 R15 = 000000000405e0d8
RIP = 000007fef15f2c09 EFL = 00010206
CS = 0033 FS = 0053 GS = 002b
Stack Trace (from fault):
[ 0] 0x000007fef15f2c09
E:\Kinect\HumanSegmentation\GrabCut\SegToolBox\GraphCutSegment.mexw64+00011273
???+000000
[ 1] 0x000007fef15f6714
E:\Kinect\HumanSegmentation\GrabCut\SegToolBox\GraphCutSegment.mexw64+00026388
( mexFunction+003524 )
[ 2] 0x000000006c690f83 D:\Program
Files\MATLAB\R2012b\bin\win64\libmex.dll+00069507 ( mexRunMexFile+000131 )
[ 3] 0x000000006c68fce2 D:\Program
Files\MATLAB\R2012b\bin\win64\libmex.dll+00064738 (
inSwapMexfileReader+000226 )
[ 4] 0x000000006c68fe64 D:\Program
Files\MATLAB\R2012b\bin\win64\libmex.dll+00065124 (
inSwapMexfileReader+000612 )
[ 5] 0x0000000074e8c80d D:\Program
Files\MATLAB\R2012b\bin\win64\m_dispatcher.dll+00051213 (
Mfh_file::dispatch_fh+000509 )
[ 6] 0x0000000074e8d0d6 D:\Program
Files\MATLAB\R2012b\bin\win64\m_dispatcher.dll+00053462 (
Mfunction_handle::dispatch+000854 )
[ 7] 0x000007fee290210b D:\Program
Files\MATLAB\R2012b\bin\win64\m_interpreter.dll+00336139 (
inFunctionHandleInterface::DestroyWorkspace+148683 )
[ 8] 0x000007fee2913edf D:\Program
Files\MATLAB\R2012b\bin\win64\m_interpreter.dll+00409311 (
inFunctionHandleInterface::DestroyWorkspace+221855 )
[ 9] 0x000007fee2930ae8 D:\Program
Files\MATLAB\R2012b\bin\win64\m_interpreter.dll+00527080 (
inFunctionHandleInterface::DestroyWorkspace+339624 )
[ 10] 0x000007fee2918d94 D:\Program
Files\MATLAB\R2012b\bin\win64\m_interpreter.dll+00429460 (
inFunctionHandleInterface::DestroyWorkspace+242004 )
[ 11] 0x000007fee2922978 D:\Program
Files\MATLAB\R2012b\bin\win64\m_interpreter.dll+00469368 (
inFunctionHandleInterface::DestroyWorkspace+281912 )
[ 12] 0x000007fee2925a8b D:\Program
Files\MATLAB\R2012b\bin\win64\m_interpreter.dll+00481931 (
inFunctionHandleInterface::DestroyWorkspace+294475 )
[ 13] 0x000007fee290de1f D:\Program
Files\MATLAB\R2012b\bin\win64\m_interpreter.dll+00384543 (
inFunctionHandleInterface::DestroyWorkspace+197087 )
[ 14] 0x000007fee290dd80 D:\Program
Files\MATLAB\R2012b\bin\win64\m_interpreter.dll+00384384 (
inFunctionHandleInterface::DestroyWorkspace+196928 )
[ 15] 0x000007fee293197d D:\Program
Files\MATLAB\R2012b\bin\win64\m_interpreter.dll+00530813 (
inFunctionHandleInterface::DestroyWorkspace+343357 )
[ 16] 0x000007fee2930271 D:\Program
Files\MATLAB\R2012b\bin\win64\m_interpreter.dll+00524913 (
inFunctionHandleInterface::DestroyWorkspace+337457 )
[ 17] 0x000007fee29120e9 D:\Program
Files\MATLAB\R2012b\bin\win64\m_interpreter.dll+00401641 (
inFunctionHandleInterface::DestroyWorkspace+214185 )
[ 18] 0x0000000074e8c80d D:\Program
Files\MATLAB\R2012b\bin\win64\m_dispatcher.dll+00051213 (
Mfh_file::dispatch_fh+000509 )
[ 19] 0x0000000074e8d0d6 D:\Program
Files\MATLAB\R2012b\bin\win64\m_dispatcher.dll+00053462 (
Mfunction_handle::dispatch+000854 )
[ 20] 0x000007fee290210b D:\Program
Files\MATLAB\R2012b\bin\win64\m_interpreter.dll+00336139 (
inFunctionHandleInterface::DestroyWorkspace+148683 )
[ 21] 0x000007fee2913edf D:\Program
Files\MATLAB\R2012b\bin\win64\m_interpreter.dll+00409311 (
inFunctionHandleInterface::DestroyWorkspace+221855 )
[ 22] 0x000007fee2930ae8 D:\Program
Files\MATLAB\R2012b\bin\win64\m_interpreter.dll+00527080 (
inFunctionHandleInterface::DestroyWorkspace+339624 )
[ 23] 0x000007fee2918d94 D:\Program
Files\MATLAB\R2012b\bin\win64\m_interpreter.dll+00429460 (
inFunctionHandleInterface::DestroyWorkspace+242004 )
[ 24] 0x000007fee2922978 D:\Program
Files\MATLAB\R2012b\bin\win64\m_interpreter.dll+00469368 (
inFunctionHandleInterface::DestroyWorkspace+281912 )
[ 25] 0x000007fee2925a8b D:\Program
Files\MATLAB\R2012b\bin\win64\m_interpreter.dll+00481931 (
inFunctionHandleInterface::DestroyWorkspace+294475 )
[ 26] 0x000007fee290de1f D:\Program
Files\MATLAB\R2012b\bin\win64\m_interpreter.dll+00384543 (
inFunctionHandleInterface::DestroyWorkspace+197087 )
[ 27] 0x000007fee290dd80 D:\Program
Files\MATLAB\R2012b\bin\win64\m_interpreter.dll+00384384 (
inFunctionHandleInterface::DestroyWorkspace+196928 )
[ 28] 0x000007fee293197d D:\Program
Files\MATLAB\R2012b\bin\win64\m_interpreter.dll+00530813 (
inFunctionHandleInterface::DestroyWorkspace+343357 )
[ 29] 0x000007fee2930271 D:\Program
Files\MATLAB\R2012b\bin\win64\m_interpreter.dll+00524913 (
inFunctionHandleInterface::DestroyWorkspace+337457 )
[ 30] 0x000007fee29120e9 D:\Program
Files\MATLAB\R2012b\bin\win64\m_interpreter.dll+00401641 (
inFunctionHandleInterface::DestroyWorkspace+214185 )
[ 31] 0x0000000074e8c80d D:\Program
Files\MATLAB\R2012b\bin\win64\m_dispatcher.dll+00051213 (
Mfh_file::dispatch_fh+000509 )
[ 32] 0x0000000074e8d0d6 D:\Program
Files\MATLAB\R2012b\bin\win64\m_dispatcher.dll+00053462 (
Mfunction_handle::dispatch+000854 )
[ 33] 0x000007fee2929482 D:\Program
Files\MATLAB\R2012b\bin\win64\m_interpreter.dll+00496770 (
inFunctionHandleInterface::DestroyWorkspace+309314 )
[ 34] 0x000007fee29a4ef5 D:\Program
Files\MATLAB\R2012b\bin\win64\m_interpreter.dll+01003253 (
inGetCurrentWS+000373 )
[ 35] 0x000007fee29273d3 D:\Program
Files\MATLAB\R2012b\bin\win64\m_interpreter.dll+00488403 (
inFunctionHandleInterface::DestroyWorkspace+300947 )
[ 36] 0x000007fee290de1f D:\Program
Files\MATLAB\R2012b\bin\win64\m_interpreter.dll+00384543 (
inFunctionHandleInterface::DestroyWorkspace+197087 )
[ 37] 0x000007fee290dd80 D:\Program
Files\MATLAB\R2012b\bin\win64\m_interpreter.dll+00384384 (
inFunctionHandleInterface::DestroyWorkspace+196928 )
[ 38] 0x000007fee28bdb35 D:\Program
Files\MATLAB\R2012b\bin\win64\m_interpreter.dll+00056117 (
inClearArraysInDesiredWS+000741 )
[ 39] 0x000007fee28c41a9 D:\Program
Files\MATLAB\R2012b\bin\win64\m_interpreter.dll+00082345 (
inIsDefinedVariable+002313 )
[ 40] 0x000007fee28b7a48 D:\Program
Files\MATLAB\R2012b\bin\win64\m_interpreter.dll+00031304 (
boost::serialization::singleton<boost::archive::detail::oserializer<boost::archive::xml_oarchive,mlutil::eventmgr::BaseEvent>
>::get_instance+017000 )
[ 41] 0x000007fee28b7a78 D:\Program
Files\MATLAB\R2012b\bin\win64\m_interpreter.dll+00031352 (
boost::serialization::singleton<boost::archive::detail::oserializer<boost::archive::xml_oarchive,mlutil::eventmgr::BaseEvent>
>::get_instance+017048 )
[ 42] 0x000007fee28b7ab3 D:\Program
Files\MATLAB\R2012b\bin\win64\m_interpreter.dll+00031411 (
boost::serialization::singleton<boost::archive::detail::oserializer<boost::archive::xml_oarchive,mlutil::eventmgr::BaseEvent>
>::get_instance+017107 )
[ 43] 0x000007fee28c00fd D:\Program
Files\MATLAB\R2012b\bin\win64\m_interpreter.dll+00065789 (
inPathNotification::function_clear_notification+003741 )
[ 44] 0x000007fee28bbb60 D:\Program
Files\MATLAB\R2012b\bin\win64\m_interpreter.dll+00047968 (
inEvalExpInWS+006048 )
[ 45] 0x000007fee28bbab1 D:\Program
Files\MATLAB\R2012b\bin\win64\m_interpreter.dll+00047793 (
inEvalExpInWS+005873 )
[ 46] 0x000007fee28ba40b D:\Program
Files\MATLAB\R2012b\bin\win64\m_interpreter.dll+00041995 (
inEvalExpInWS+000075 )
[ 47] 0x000000006abe4c19 D:\Program
Files\MATLAB\R2012b\bin\win64\libmwgui.dll+00412697 (
MCallback::_execute+000217 )
[ 48] 0x000000006abe50f8 D:\Program
Files\MATLAB\R2012b\bin\win64\libmwgui.dll+00413944 (
MCallback::execute+000504 )
[ 49] 0x0000000057953eda D:\Program
Files\MATLAB\R2012b\bin\win64\hg.dll+04275930 ( GO_InvalObject+007706 )
[ 50] 0x0000000057954efb D:\Program
Files\MATLAB\R2012b\bin\win64\hg.dll+04280059 ( goCallInternalCallback+003387
)
[ 51] 0x00000000576178d3 D:\Program
Files\MATLAB\R2012b\bin\win64\hg.dll+00882899 ( hgJavacomponent+003267 )
[ 52] 0x00000000575a4362 D:\Program
Files\MATLAB\R2012b\bin\win64\hg.dll+00410466 ( hgImage+014226 )
[ 53] 0x000000006be6e808 D:\Program
Files\MATLAB\R2012b\bin\win64\udd.dll+00190472 (
uddSetListenerRecursionWarning+000680 )
[ 54] 0x000000006be6ee6c D:\Program
Files\MATLAB\R2012b\bin\win64\udd.dll+00192108 (
UDListenerManagerHost::notifyEvent+000076 )
[ 55] 0x000000006be6697d D:\Program
Files\MATLAB\R2012b\bin\win64\udd.dll+00158077 ( UDEventInfo::send+000093 )
[ 56] 0x0000000068becedb D:\Program
Files\MATLAB\R2012b\bin\win64\udd_mi.dll+00052955 (
MErrorException::operator=+047675 )
[ 57] 0x00000000055ce0b6 D:\Program
Files\MATLAB\R2012b\bin\win64\uiw.dll+00385206 ( UIW_IsUserMessage+000086 )
[ 58] 0x00000000055ce7b9 D:\Program
Files\MATLAB\R2012b\bin\win64\uiw.dll+00387001 ( UIW_SetGLIMUserMsg+000153 )
[ 59] 0x00000000767c87fe
C:\Windows\system32\USER32.dll+00165886 ( GetMenuBarInfo+000638 )
[ 60] 0x00000000767af5fb
C:\Windows\system32\USER32.dll+00062971 ( SystemParametersInfoW+000235 )
[ 61] 0x00000000767b4895
C:\Windows\system32\USER32.dll+00084117 ( IsProcessDPIAware+000465 )
[ 62] 0x0000000076db1225
C:\Windows\SYSTEM32\ntdll.dll+00332325 ( KiUserCallbackDispatcher+000031 )
[ 63] 0x00000000767b9e6a
C:\Windows\system32\USER32.dll+00106090 ( SfmDxSetSwapChainStats+000026 )
[ 64] 0x00000000767b615e
C:\Windows\system32\USER32.dll+00090462 ( GetMessageA+000078 )
[ 65] 0x00000000055a95cf D:\Program
Files\MATLAB\R2012b\bin\win64\uiw.dll+00234959 ( win_sleep+000895 )
[ 66] 0x0000000079fba589 D:\Program
Files\MATLAB\R2012b\bin\win64\libmwbridge.dll+00042377 (
ioCmdLineEditSave+000873 )
[ 67] 0x0000000079fbb48e D:\Program
Files\MATLAB\R2012b\bin\win64\libmwbridge.dll+00046222 (
ioCmdLineEditSave+004718 )
[ 68] 0x0000000079fbb809 D:\Program
Files\MATLAB\R2012b\bin\win64\libmwbridge.dll+00047113 ( ioReadLine+000121 )
[ 69] 0x0000000079fbc3be D:\Program
Files\MATLAB\R2012b\bin\win64\libmwbridge.dll+00050110 ( ioReadLine+003118 )
[ 70] 0x0000000079fbfadb D:\Program
Files\MATLAB\R2012b\bin\win64\libmwbridge.dll+00064219 (
QueryMLFcnTable_libmwbridge+000331 )
[ 71] 0x0000000079fbfba0 D:\Program
Files\MATLAB\R2012b\bin\win64\libmwbridge.dll+00064416 (
QueryMLFcnTable_libmwbridge+000528 )
[ 72] 0x0000000079fc03d1 D:\Program
Files\MATLAB\R2012b\bin\win64\libmwbridge.dll+00066513 ( mnParser+000433 )
[ 73] 0x00000000749a64a4 D:\Program
Files\MATLAB\R2012b\bin\win64\mcr.dll+00222372 (
mcrInstance::mnParser_on_interpreter_thread+000036 )
[ 74] 0x000000007498681f D:\Program
Files\MATLAB\R2012b\bin\win64\mcr.dll+00092191 (
mcr::setInterpreterThreadToCurrent+029887 )
[ 75] 0x0000000074986881 D:\Program
Files\MATLAB\R2012b\bin\win64\mcr.dll+00092289 (
mcr::setInterpreterThreadToCurrent+029985 )
[ 76] 0x00000000055ce0b6 D:\Program
Files\MATLAB\R2012b\bin\win64\uiw.dll+00385206 ( UIW_IsUserMessage+000086 )
[ 77] 0x00000000055ce7b9 D:\Program
Files\MATLAB\R2012b\bin\win64\uiw.dll+00387001 ( UIW_SetGLIMUserMsg+000153 )
[ 78] 0x00000000767c87fe
C:\Windows\system32\USER32.dll+00165886 ( GetMenuBarInfo+000638 )
[ 79] 0x00000000767af5fb
C:\Windows\system32\USER32.dll+00062971 ( SystemParametersInfoW+000235 )
[ 80] 0x00000000767b4895
C:\Windows\system32\USER32.dll+00084117 ( IsProcessDPIAware+000465 )
[ 81] 0x0000000076db1225
C:\Windows\SYSTEM32\ntdll.dll+00332325 ( KiUserCallbackDispatcher+000031 )
[ 82] 0x00000000767b908a
C:\Windows\system32\USER32.dll+00102538 ( PeekMessageW+000186 )
[ 83] 0x00000000767b50fe
C:\Windows\system32\USER32.dll+00086270 ( GetKeyState+000238 )
[ 84] 0x00000000767b3a6f
C:\Windows\system32\USER32.dll+00080495 ( PeekMessageA+000087 )
[ 85] 0x00000000055a8f4b D:\Program
Files\MATLAB\R2012b\bin\win64\uiw.dll+00233291 ( UIW_SetCurrentDialog+000731 )
[ 86] 0x00000000055cfbe2 D:\Program
Files\MATLAB\R2012b\bin\win64\uiw.dll+00392162 ( ws_FreeSystemFont+000546 )
[ 87] 0x000000000484e6a3 D:\Program
Files\MATLAB\R2012b\bin\win64\libmwservices.dll+00779939 (
sysq::removeCommitDatabaseUpdatesHook+002131 )
[ 88] 0x000000000484fe18 D:\Program
Files\MATLAB\R2012b\bin\win64\libmwservices.dll+00785944 (
sysq::removeCommitDatabaseUpdatesHook+008136 )
[ 89] 0x0000000004851a20 D:\Program
Files\MATLAB\R2012b\bin\win64\libmwservices.dll+00793120 (
sysq::addProcessPendingEventsUnitTestHook+000240 )
[ 90] 0x0000000004851ae8 D:\Program
Files\MATLAB\R2012b\bin\win64\libmwservices.dll+00793320 (
sysq::addProcessPendingEventsUnitTestHook+000440 )
[ 91] 0x0000000004851ca3 D:\Program
Files\MATLAB\R2012b\bin\win64\libmwservices.dll+00793763 (
sysq::addProcessPendingEventsUnitTestHook+000883 )
[ 92] 0x0000000004851d76 D:\Program
Files\MATLAB\R2012b\bin\win64\libmwservices.dll+00793974 (
sysq::addProcessPendingEventsUnitTestHook+001094 )
[ 93] 0x000000007498837e D:\Program
Files\MATLAB\R2012b\bin\win64\mcr.dll+00099198 (
mcr::setInterpreterThreadToCurrent+036894 )
[ 94] 0x0000000074988665 D:\Program
Files\MATLAB\R2012b\bin\win64\mcr.dll+00099941 (
mcr::setInterpreterThreadToCurrent+037637 )
[ 95] 0x000000007497b166 D:\Program
Files\MATLAB\R2012b\bin\win64\mcr.dll+00045414 (
DepfunRules::postWarning+003430 )
[ 96] 0x000000013f808a33 D:\Program
Files\MATLAB\R2012b\bin\win64\matlab.exe+00035379 ( ???+000000 )
[ 97] 0x000000013f808c97 D:\Program
Files\MATLAB\R2012b\bin\win64\matlab.exe+00035991 ( ???+000000 )
[ 98] 0x000000013f809163 D:\Program
Files\MATLAB\R2012b\bin\win64\matlab.exe+00037219 ( ???+000000 )
[ 99] 0x000000007669652d
C:\Windows\system32\kernel32.dll+00091437 ( BaseThreadInitThunk+000013 )
[100] 0x0000000076d8c521
C:\Windows\SYSTEM32\ntdll.dll+00181537 ( RtlUserThreadStart+000033 )
This error was detected while a MEX-file was running. If the MEX-file
is not an official MathWorks function, please examine its source code
for errors. Please consult the External Interfaces Guide for information
on debugging MEX-files.
If this problem is reproducible, please submit a Service Request via:
http://www.mathworks.com/support/contact_us/
A technical support engineer might contact you with further information.
Thank you for your help.
==========================================================================
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.48.126
※ 編輯: Trumen 來自: 140.112.48.126 (04/24 21:50)