Author Topic: My project won't compile. :/  (Read 5376 times)

Jam0864

  • Contributor
  • Fanatic
  • **
  • Posts: 744
    • MSN Messenger - marmalade0864@hotmail.com
    • View Profile
    • Jam0864's Content Dump
    • Email
My project won't compile. :/
« on: 2009-02-05, 03:50:29 AM »
SGDK2 crashed on me halfway through placing a sprite on a map, and now when I open my project and try and run it I get "object reference not set to an instance of an object."
If I click ok to that, I get this.



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.FileNotFoundException: Could not find file 'D:\Documents and Settings\Administrator\Desktop\guitar\Solidity.cs'.
File name: 'D:\Documents and Settings\Administrator\Desktop\guitar\Solidity.cs'
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromFileBatch(CompilerParameters options, String[] fileNames)
   at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromFile(CompilerParameters options, String[] fileNames)
   at SGDK2.CodeGenerator.CompileProject(String ProjectName, String FolderName, String& errs)
   at SGDK2.frmMain.mnuFileRunProject_Click(Object sender, EventArgs e)
   at System.Windows.Forms.MenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.MenuItem.MenuItemData.Execute()
   at System.Windows.Forms.Command.Invoke()
   at System.Windows.Forms.Command.DispatchID(Int32 id)
   at System.Windows.Forms.Control.WmCommand(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.Form.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.42 (RTM.050727-4200)
    CodeBase: file:///D:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
SGDK2IDE
    Assembly Version: 2.1.0.1
    Win32 Version: 2.1.0
    CodeBase: file:///D:/Documents%20and%20Settings/Administrator/Desktop/SGDK2/SGDK2IDE.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///D:/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.42 (RTM.050727-4200)
    CodeBase: file:///D:/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.42 (RTM.050727-4200)
    CodeBase: file:///D:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Data
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///D:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///D:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Deployment
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///D:/WINDOWS/assembly/GAC_MSIL/System.Deployment/2.0.0.0__b03f5f7f11d50a3a/System.Deployment.dll
----------------------------------------
OpenTK
    Assembly Version: 0.9.1.0
    Win32 Version: 0.9.1.0
    CodeBase: file:///D:/Documents%20and%20Settings/Administrator/Desktop/SGDK2/OpenTK.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.



Not sure how to reproduce the crash, it wasn't during anything I hadn't done before... just opened the map editor to wack a new sprite on and it stopped responding.

The project is uploaded to the enigmadream/support site.

Hardware OS info; (jsut in case you need it.)
AMD Athlon 64 x2 TK-53 1.7GHz
ATI Radeon Xpress 1150
1GB Ram, shared with GFX
Windows XP Professional SP3



Any help on this would be great, the project is near completion and I am eager to finish it off. :)


bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: My project won't compile. :/
« Reply #1 on: 2009-02-05, 06:17:57 AM »
SGDK2 had serious problems dealing with a rule in your "About Button" sprite.  The rule name is "and aboutorhelp != 2" and it's missing parameter 2.  I'll make SGDK2 handle that error better.  Until then, you need to make sure both parameters are provided when using an operator function.  BTW, I cant run the project on my system due to this error message from FMOD (right after I hear some opening chord):
A fatal error occurred initializing or running the game:
System.ApplicationException: FMOD error! ERR_MEMORY - Not enough memory or resources.
at CustomObjects.FMODBase.ERRCHECK(RESULT result) in [...]\fmodbase.cs:line 176
[...]

Do you get this message?

Jam0864

  • Contributor
  • Fanatic
  • **
  • Posts: 744
    • MSN Messenger - marmalade0864@hotmail.com
    • View Profile
    • Jam0864's Content Dump
    • Email
Re: My project won't compile. :/
« Reply #2 on: 2009-02-05, 02:38:57 PM »
I do not get that message, but I know a few people who do. (And a lot more that don't.) I think it might be caused by that start chord, because the chord is not a sound on it's own, it's just playing 12 individual sounds in the project in quick sequence to form a chord. (It was originally so all the notes would be in RAM before playing, so there was no delay first time you hit a note) I think it's making people crash so I'm gonna get rid of it and see if it helps.

I musta just missed that parameter, since I had already made the template for the button and was just copy pasting and modifying the parameters, musta forgot one.
Fixed it, thankyou very much. :)

tprime

  • Fanatic
  • ***
  • Posts: 395
    • View Profile
    • Email
Re: My project won't compile. :/
« Reply #3 on: 2009-02-05, 03:31:28 PM »
You have it on CD? The D: drive is where the CD drive should be... at least that's the way mine is.  ;D  If you have it on your computer, it should be C:.


Ex.
Code: [Select]
System.IO.FileNotFoundException: Could not find file 'D:\Documents and Settings\Administrator\Desktop\guitar\Solidity.cs'.
Find a way to change the location, or put it on a disc.

Jam0864

  • Contributor
  • Fanatic
  • **
  • Posts: 744
    • MSN Messenger - marmalade0864@hotmail.com
    • View Profile
    • Jam0864's Content Dump
    • Email
Re: My project won't compile. :/
« Reply #4 on: 2009-02-05, 11:00:35 PM »
The D drive is not necessarily the CD Drive, it's whatever you assign to it. My drives are currently like this.

C: vista installation
D: XP installation
E: Networked Harddrive
F: CD Drive



Solidity.cs is generated in the compile sequence, you aren't supposed to have a copy before compiling. No worries anyways anymore Tony, Bluemonkmn has fixed it, quite quickly I might add. :o

tprime

  • Fanatic
  • ***
  • Posts: 395
    • View Profile
    • Email
Re: My project won't compile. :/
« Reply #5 on: 2009-02-06, 12:20:05 AM »
The D drive is not necessarily the CD Drive, it's whatever you assign to it. My drives are currently like this.

C: vista installation
D: XP installation
E: Networked Harddrive
F: CD Drive

Wow, I never knew you could do that.
Thanks for the info about that too.  ;)  :educated:


Jam0864

  • Contributor
  • Fanatic
  • **
  • Posts: 744
    • MSN Messenger - marmalade0864@hotmail.com
    • View Profile
    • Jam0864's Content Dump
    • Email
Re: My project won't compile. :/
« Reply #6 on: 2009-02-06, 01:03:16 AM »
Alright I removed the (very) hardware intensive intro that seems to be crashing some people.
I'm not 100% sure if that was the issue or not, do you mind running it again?


If you have SGDK2 installed, download here

If you don't, download here

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: My project won't compile. :/
« Reply #7 on: 2009-02-06, 06:32:35 AM »
Works for me.

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: My project won't compile. :/
« Reply #8 on: 2009-02-06, 08:34:48 AM »
Works fine for me too.  I used to see that issue, but it's gone now.

It takes a few seconds to compile before running, though.  Is there a possibility of adding a progress bar or simple activity indicator while compiling?  (BlueMonk, not JAM)
Edward Dassmesser

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: My project won't compile. :/
« Reply #9 on: 2009-02-07, 11:43:28 AM »
What, the status bar message and wait cursor aren't enough?

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: My project won't compile. :/
« Reply #10 on: 2009-02-07, 10:48:56 PM »
Umm... no?  I mean, the status bar is nice, but only if you look at it.  And there's no sort of activity/progress indicator.  Even a little spinny animation works as an activity indicator, but a progress bar would be nicer.  With a Cancel button would be nicest, but I don't know how easy it would be to cancel.
Edward Dassmesser

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: My project won't compile. :/
« Reply #11 on: 2009-02-08, 09:12:31 AM »
And what about the hourglass cursor?  isn't that a good indication of the program being busy?  Would it help if you changed your wait cursor to something animated? :)

I suppose I could add some sort of animation and maybe even make it cancel-able, but I couldn't show a progress bar in the conventional sense because once the compiler takes over, I don't think I have a way of determining how much it has done, and that's where 90%+ of the time is taken.

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: My project won't compile. :/
« Reply #12 on: 2009-02-08, 10:13:11 AM »
Yeah, I thought about my cursor not being animated.  It's just that a lot of the time when I see the hourglass, it doesn't go away, and the program stops responding, and stops redrawing, and then other programs start slowing down, and then I have to force-quit the application.  So even if the program just keeps drawing an animated little thing, you know it's still redrawing the little spinny thing at least :).
Edward Dassmesser