Author Topic: Error trying to run game while game is running  (Read 2153 times)

SmartBoy16

  • Contributor
  • Fanatic
  • **
  • Posts: 587
  • Looking for inspiration.....
    • View Profile
    • Email
Error trying to run game while game is running
« on: 2009-11-19, 08:55:47 AM »
hey! i was working on 2wenty when i got this message:
Code: [Select]
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IO.IOException: The process cannot access the file 'C:\Documents and Settings\jogreen\My Documents\SGDK\2wenty Dungeons\2wentyDungeons\OpenTK.dll' because it is being used by another process.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite)
   at SGDK2.CodeGenerator.CompileProject(String ProjectName, String FolderName, String& errs)
   at SGDK2.frmMain.mnuFileRunProjectInDebugMode_Click(Object sender, EventArgs e)
   at SGDK2.frmMain.tbrMain_ButtonClick(Object sender, ToolBarButtonClickEventArgs e)
   at System.Windows.Forms.ToolBar.OnButtonClick(ToolBarButtonClickEventArgs e)
   at System.Windows.Forms.ToolBar.WmReflectCommand(Message& m)
   at System.Windows.Forms.ToolBar.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3603 (GDR.050727-3600)
    CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
SGDK2IDE
    Assembly Version: 2.1.2.0
    Win32 Version: 2.1.2
    CodeBase: file:///C:/Documents%20and%20Settings/jogreen/My%20Documents/SGDK/SGDK2IDE21/SGDK2IDE.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3082 (QFE.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Data
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Deployment
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Deployment/2.0.0.0__b03f5f7f11d50a3a/System.Deployment.dll
----------------------------------------
System.Design
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Design/2.0.0.0__b03f5f7f11d50a3a/System.Design.dll
----------------------------------------
Accessibility
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
OpenTK
    Assembly Version: 0.9.8.2
    Win32 Version: 0.9.8.2
    CodeBase: file:///C:/Documents%20and%20Settings/jogreen/My%20Documents/SGDK/SGDK2IDE21/OpenTK.DLL
----------------------------------------
Reflect
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Documents%20and%20Settings/jogreen/My%20Documents/SGDK/SGDK2IDE21/Reflect.DLL
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.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.



inside a Continue/Quit Box.

When this popped up, I almost chose "quit" (which i would lose my saved data) but i realized i still had the previous project up. so i closed that, pushed "Continue" and ran it again (it worked fine). Is there a way for SGDK2 to figure out if OpenTK.dll is being used before trying to run it? I noticed that VisualStudio is able to detect if the program you compiled is still running so you can't edit it again until the program closes.
Looking to the skies.....

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Error trying to run game while game is running
« Reply #1 on: 2009-11-19, 01:21:45 PM »
Visual Studio normally has a debugger attached to the process, which is why it monitors the state of the running program so closely.  But I think it too will give you an error if you run without debugging (Ctrl+F5) and then try to edit and recompile the code.  SGDK2 does not have a debugger attached to the running process.