zacaj's picture

very simple program crashes in SDL event manager

I installed OpenTK just yesterday, and was following http://neokabuto.blogspot.com/2013/02/opentk-tutorial-1-opening-windows-..., although the 'get started in 15 minutes' tutorial also had this problem. My code is just

using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using OpenTK;
using OpenTK.Graphics;
using OpenTK.Graphics.OpenGL;
using OpenTK.Input;
 
namespace Program
{
    class Program : GameWindow
    {
        static void Main(string[] args)
        {
            using (Program game = new Program())
            {
                game.Run(30.0);
            }
        }
    }
}

When I run it, it crashes in game.Run(). Following the debugger deeper, it crashes in SDL_events.c:313: "if (entry->event.type == SDL_SYSWMEVENT) {".


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture

Which operating system are you using?

zacaj's picture

Windows 8 x64

zacaj's picture

After some playing around with the project settings, I have discovered that, by default, Visual Studio 2013 was creating new projects with "Prefer 32bit" enabled in the Build settings page. Disabling this allows the example program to run properly.