OpenGL Exception Problem

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: May 2008
Posts: 1
Reputation: beloveds is an unknown quantity at this point 
Solved Threads: 0
beloveds beloveds is offline Offline
Newbie Poster

OpenGL Exception Problem

 
0
  #1
May 4th, 2008
Hi, everybody

First of all, i should say i am new at OpenGL programming and thanks to those who may help to solve my problem

The thing is, i was developing an application which is named Articulated Robot Arm (some of you guys may familiar with this). Everything was going perfect, but last night i have upgraded my OS from WinXP to Vista Ultimate 64-bit. I have opened my project to keep going but, i got the following exception in my code.

  1. System.TypeInitializationException was unhandled
  2. Message="The type initializer for 'CsGL.OSLib' threw an exception."
  3. Source="csgl"
  4. TypeName="CsGL.OSLib"
  5. StackTrace:
  6. at CsGL.OSLib..ctor()
  7. at CsGL.OpenGL.OpenGL..ctor()
  8. at CsGL.OpenGL.OpenGL_Extension..ctor()
  9. at CsGL.OpenGL.GLU..ctor()
  10. at CsGL.OpenGL.GLUT..ctor()
  11. at CsGL.OpenGL.GL..ctor()
  12. at CsGL.OpenGL.OpenGLContext..ctor()
  13. at CsGL.OpenGL.ControlGLContext..ctor(Control c)
  14. at CsGL.OpenGL.OpenGLControl.CreateContext()
  15. at CsGL.OpenGL.OpenGLControl.get_Context()
  16. at CsGL.OpenGL.OpenGLControl.OnSizeChanged(EventArgs e)
  17. at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight)
  18. at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height)
  19. at System.Windows.Forms.Control.SetBoundsCore(Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified)
  20. at System.Windows.Forms.Control.System.Windows.Forms.Layout.IArrangedElement.SetBounds(Rectangle bounds, BoundsSpecified specified)
  21. at System.Windows.Forms.Layout.DefaultLayout.xLayoutDockedControl(IArrangedElement element, Rectangle newElementBounds, Boolean measureOnly, Size& preferredSize, Rectangle& remainingBounds)
  22. at System.Windows.Forms.Layout.DefaultLayout.LayoutDockedControls(IArrangedElement container, Boolean measureOnly)
  23. at System.Windows.Forms.Layout.DefaultLayout.xLayout(IArrangedElement container, Boolean measureOnly, Size& preferredSize)
  24. at System.Windows.Forms.Layout.DefaultLayout.LayoutCore(IArrangedElement container, LayoutEventArgs args)
  25. at System.Windows.Forms.Layout.LayoutEngine.Layout(Object container, LayoutEventArgs layoutEventArgs)
  26. at System.Windows.Forms.Control.OnLayout(LayoutEventArgs levent)
  27. at System.Windows.Forms.Control.PerformLayout(LayoutEventArgs args)
  28. at System.Windows.Forms.Control.PerformLayout()
  29. at System.Windows.Forms.Control.ResumeLayout(Boolean performLayout)
  30. at System.Windows.Forms.Layout.DefaultLayout.SetDock(IArrangedElement element, DockStyle value)
  31. at System.Windows.Forms.Control.set_Dock(DockStyle value)
  32. at ArticulatedRobotArm.Form1..ctor() in F:\asd\Desktop\ArticulatedRobotArm\ArticulatedRobotArm\ArticulatedRobotArm\Form1.cs:line 19
  33. at ArticulatedRobotArm.Program.Main() in F:\asd\Desktop\ArticulatedRobotArm\ArticulatedRobotArm\ArticulatedRobotArm\Program.cs:line 17
  34. at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
  35. at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
  36. at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
  37. at System.Threading.ThreadHelper.ThreadStart()
  38. InnerException: System.BadImageFormatException
  39. Message="An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)"
  40. Source="csgl"
  41. StackTrace:
  42. at CsGL.OSLib.csgl_sys_initAssert(ASSERT a, ASSERT_THROW at)
  43. at CsGL.OSLib..cctor()
  44. InnerException:

The exception is generated in this section of my code:
    public partial class Form1 : Form
    {
        MyView viewRef;
        public Form1()
        {
            InitializeComponent();
            viewRef = new MyView();
            this.viewRef.Parent = OpenGLPanel;
            this.viewRef.Dock = DockStyle.Fill; // <- Here
            
        }

I really have no idea what the problem is.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC