【问题标题】:Nikon Capture NX 2 System.InvalidOperationException: Object is currently in use elsewhereNikon Capture NX 2 System.InvalidOperationException:对象当前正在其他地方使用
【发布时间】:2014-12-26 12:02:37
【问题描述】:

我有最新的 Windows 7 专业版。我一直在努力让我的 Nikon Capture NX 2 程序正常工作。发生了一些事情,无论我做什么,我都会收到相同的错误System.InvalidOperationException: Object is currently in use elsewhere. 并且应用程序崩溃,这发生在鼠标悬停时,因为在打开应用程序后只要移动鼠标就会弹出错误。堆栈跟踪揭示了一些导致问题的原因,也许在这个领域工作的人可以帮助我查明问题的根源?我已经尝试过重新安装所有尼康软件,包括 NEF Codec。我也尝试过重新安装 Microsoft.Net 4.5.x 但没有任何帮助,我总是收到此错误。

我在下面包含了完整的堆栈跟踪。

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.InvalidOperationException: Object is currently in use elsewhere.
   at System.Drawing.Image.get_RawFormat()
   at System.Drawing.Graphics.IgnoreMetafileErrors(Image image, Int32& errorStatus)
   at System.Drawing.Graphics.DrawImage(Image image, Int32 x, Int32 y, Int32 width, Int32 height)
   at System.Drawing.Graphics.DrawImage(Image image, Rectangle rect)
   at nik.Windows.Forms.Form.Paint_closeButton(Boolean active)
   at nik.Windows.Forms.Form.OnWM_NcHittest(Message& msg)
   at nik.Windows.Forms.Form.WndProc(Message& msg)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.18444 built by: FX451RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
Capture NX 2
    Assembly Version: 2.3.0.0
    Win32 Version: 2.4.7.3000
    CodeBase: file:///C:/Program%20Files/Nikon/Capture%20NX%202/Capture%20NX%202.exe
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34238 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
NxController
    Assembly Version: 2.3.0.11420
    Win32 Version: 2.3.0.0
    CodeBase: file:///C:/Program%20Files/Nikon/Capture%20NX%202/NxController.DLL
----------------------------------------
nik.GUIBase
    Assembly Version: 2.3.0.11326
    Win32 Version: 2.3.0.0
    CodeBase: file:///C:/Program%20Files/Nikon/Capture%20NX%202/nik.GUIBase.DLL
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.18408 built by: FX451RTMGREL
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.18408 built by: FX451RTMGREL
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
nik.Base
    Assembly Version: 2.3.0.11308
    Win32 Version: 2.3.0.0
    CodeBase: file:///C:/Program%20Files/Nikon/Capture%20NX%202/nik.Base.DLL
----------------------------------------
GUI_Common_Managed
    Assembly Version: 2.3.0.11419
    Win32 Version: 
    CodeBase: file:///C:/Program%20Files/Nikon/Capture%20NX%202/GUI_Common_Managed.DLL
----------------------------------------
Accessibility
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.18408 built by: FX451RTMGREL
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
nik.GUIBase.Resources
    Assembly Version: 2.3.0.11325
    Win32 Version: 
    CodeBase: file:///C:/Program%20Files/Nikon/Capture%20NX%202/nik.GUIBase.Resources.DLL
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34234 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
NxCursors
    Assembly Version: 2.3.0.11308
    Win32 Version: 2.3.0.0
    CodeBase: file:///C:/Program%20Files/Nikon/Capture%20NX%202/NxCursors.DLL
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

【问题讨论】:

    标签: .net windows windows-7 drawing


    【解决方案1】:

    使用关键字“system.drawing.image.get_rawformat invalidoperationexception”进行快速搜索,发现这可能是应用程序本身的线程问题。许多其他图像编辑软件由于线程安全问题而崩溃。

    你有应用程序的源代码吗?如果是,请检查不同线程对图像的访问。如果您无权访问,则必须向尼康支持团队提出问题。给他们一个转储以供分析。

    一个可行的方法是在具有单核的 VM 上运行应用程序。这可能会减少并发访问的机会。但这不是保证。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-10-14
      • 2010-09-19
      • 2010-11-06
      • 2012-02-03
      • 1970-01-01
      • 2011-12-25
      相关资源
      最近更新 更多