Author Topic: Unhandled Exception Error in Tutorial  (Read 5595 times)

NobodysSon

  • Visitor
  • *
  • Posts: 8
    • View Profile
    • Email
Unhandled Exception Error in Tutorial
« on: 2007-09-04, 01:40:22 PM »
Hello all.

I hope that I'm not asking a question that has already been answered here. I looked through the forum and didn't see anything that seemed to match the problem I'm having.

I am running the tutorial that comes with SGDK 2 v0.6 and when I get to step 11 where a new layer is being created on your map I get an unhandled exception error. I don't know if it helps any but the error text is at the end of this message.

Anyone have any ideas on what the problem could be?


************** Exception Text **************
System.ApplicationException: No hardware support for windowed mode on default display adapter
   at SGDK2.Display.MakeValidPresentParameters(GameDisplayMode mode, PresentParameters pp)
   at SGDK2.Display..ctor(GameDisplayMode mode, Boolean windowed)
   at SGDK2.Display..ctor()
   at SGDK2.frmMapEditor.InitializeComponent()
   at SGDK2.frmMapEditor..ctor(LayerRow Layer)
   at SGDK2.frmMapEditor.Edit(Form MdiParent, LayerRow EditRow)
   at SGDK2.frmLayerManager.SaveRecord()
   at SGDK2.frmLayerManager.btnOK_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: Unhandled Exception Error in Tutorial
« Reply #1 on: 2007-09-04, 02:26:10 PM »
This is an SGDK2 problem, not an SGDK1 problem.  Make sure your posts go in the right forum.

That said, what version of DirectX do you have installed?

To find out:

Start->Run
type "dxdiag"
click OK
in the main section, there is a list of information, the last item of which is "DirectX Version"
Edward Dassmesser

NobodysSon

  • Visitor
  • *
  • Posts: 8
    • View Profile
    • Email
Re: Unhandled Exception Error in Tutorial
« Reply #2 on: 2007-09-04, 06:59:08 PM »
>< Doh! Being a n00b sucks. Sorry about that.

In regard to your question DirectX 9.0

Now off to the correct section ><


Jam0864

  • Contributor
  • Fanatic
  • **
  • Posts: 744
    • MSN Messenger - marmalade0864@hotmail.com
    • View Profile
    • Jam0864's Content Dump
    • Email
Re: Unhandled Exception Error in Tutorial
« Reply #3 on: 2007-09-05, 04:15:10 AM »
has anyone tested SGDK2 in windows vista? (no point making a thread since we already have an offtopic one lol) i have vista and s'pose i could test =D

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Unhandled Exception Error in Tutorial
« Reply #4 on: 2007-09-05, 06:05:09 AM »
(Topic moved to correct forum)
It seems that your hardware or drivers are inadequate for SGDK2.  What video card are you using, how old is the system, and where/when did you acquire your video drivers?

NobodysSon

  • Visitor
  • *
  • Posts: 8
    • View Profile
    • Email
Re: Unhandled Exception Error in Tutorial
« Reply #5 on: 2007-09-05, 12:36:16 PM »
I have a Nvidia Riva TNT2 for my video card and am running a P4 1.5 ghz.  The driver for the card is from 99 and came from Microsoft.

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Unhandled Exception Error in Tutorial
« Reply #6 on: 2007-09-05, 04:27:23 PM »
Try downloading the drivers from the NVidia site:
http://www.nvidia.com/content/drivers/drivers.asp

NobodysSon

  • Visitor
  • *
  • Posts: 8
    • View Profile
    • Email
Re: Unhandled Exception Error in Tutorial
« Reply #7 on: 2007-09-05, 10:19:24 PM »
I have the newest driver installed from the Nvidia site but I am still encountering the same unhandled exception error.

Any other thoughts on the subject?

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Unhandled Exception Error in Tutorial
« Reply #8 on: 2007-09-06, 05:43:25 AM »
Then I guess the card is just too old.  Based on the information athttp://en.wikipedia.org/wiki/RIVA_TNT2 it looks like that card came out in the days of Direct3D 6.  So my guess is the hardware simply isn't supported for the features SGDK2 uses.  If you look at the bottom of that page, you'll see various versions of Direct3D and the NVidia cards associated with them.  Direct3D 9 is the ideal choice for SGDK2, though the Direct3D 10 cards would probably work too.  I myself have a GeForce FX card, which falls into the Direct3D 9 category.  I guess I'm going to have to try collecting a list of supported video cards like they have for other games (like http://www.worldwindcentral.com/wiki/Video_Card_Compatibility).  What a pain... hope I can find a lot of beta testers to provide this info.

NobodysSon

  • Visitor
  • *
  • Posts: 8
    • View Profile
    • Email
Re: Unhandled Exception Error in Tutorial
« Reply #9 on: 2007-09-06, 10:50:05 AM »
Heh, looks like I have become the source of a pain in the neck for the SGDK2 project :-[ I guess the problem would have come to light sooner or later though.

Thank you for the help. I have been planning on getting a new video card for a while now anyway so this is the perfect time to do it. Until then, would my current system support SGDK 1? Something to keep my busy until I upgrade.

Jam0864

  • Contributor
  • Fanatic
  • **
  • Posts: 744
    • MSN Messenger - marmalade0864@hotmail.com
    • View Profile
    • Jam0864's Content Dump
    • Email
Re: Unhandled Exception Error in Tutorial
« Reply #10 on: 2007-09-07, 12:29:20 AM »
have you tried it? Seems to be the easiest method...

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Unhandled Exception Error in Tutorial
« Reply #11 on: 2007-09-07, 05:06:37 AM »
It would probably work because version 1 was designed on DirectX 5 (I think), but I'm with Jam0864 - the best way to find out is just to try.

NobodysSon

  • Visitor
  • *
  • Posts: 8
    • View Profile
    • Email
Re: Unhandled Exception Error in Tutorial
« Reply #12 on: 2007-09-08, 11:06:21 PM »
It does indeed work :) And I ordered a GEFORCE 6200 yesterday. I should thank SGDK2 for giving me the kick in the butt I needed to get around to finally upgrading.