SVat's picture

Problem OpenTK 1.1.1

Hello! Sorry for my english. I use Google Translate.

System: Windows XP SP3
Video card: GeForse 7300 LE (drivers updated)
.NET Framework: 2.0, 3.0, 3.5, 4
Install the latest version OpenTK: opentk-2014-03-17.exe

Problem 1:
Run Examples.exe: error - application is not configured.
This problem is also in the opentk-2013-11-22.

Problem 2:
Create example in vs2010: GameWindowSimple.cs
Build: OK
Run: after starting the program immediately closes.
Debug info: OpenGame.vshost.exe error -1073740791 (0xc0000409).


Comments

Comment viewing options

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

Can you please open OpenTK.sln and build OpenTK in debug mode? You can find this in the installation folder of OpenTK (by default "My Documents\OpenTK\1.1") or you can download the source code from github.

The debug version will write additional information to the "Application Output" window of Visual Studio - please post that here so we can understand what is going wrong.

Moreover, you can try using the SDL2 backend by copying SDL2.dll from Dependencies/x86 to the bin/Debug folder of your application. Does it work now?

SVat's picture

Sorry, my vs2010 only in Russian: opentk build info rus

flopoloco's picture

Can you try to get OpenTK into your project with nuget?
https://docs.nuget.org/docs/start-here/installing-nuget

the Fiddler's picture

@SVat:
Thanks, try running your application with the debug OpenTK.dll. It will print debug info that will help find the problem.

SVat's picture
the Fiddler wrote:

try running your application with the debug OpenTK.dll. It will print debug info that will help find the problem.

I think the problem in SDL. Application works, but the studio swears on exceptions and memory corruption.


System.AccessViolationException не обработано
Message=Попытка чтения или записи в защищенную память. Это часто свидетельствует о том, что другая память повреждена.
Source=OpenTK
StackTrace:
в OpenTK.Platform.SDL2.Sdl2NativeWindow.DestroyWindow() в C:\opentk-master\Source\OpenTK\Platform\SDL2\Sdl2NativeWindow.cs:строка 386
в OpenTK.Platform.SDL2.Sdl2NativeWindow.ProcessEvents() в C:\opentk-master\Source\OpenTK\Platform\SDL2\Sdl2NativeWindow.cs:строка 503
в OpenTK.NativeWindow.ProcessEvents(Boolean retainEvents) в C:\opentk-master\Source\OpenTK\NativeWindow.cs:строка 955
в OpenTK.NativeWindow.ProcessEvents() в C:\opentk-master\Source\OpenTK\NativeWindow.cs:строка 183
в OpenTK.GameWindow.Run(Double updates_per_second, Double frames_per_second) в C:\opentk-master\Source\OpenTK\GameWindow.cs:строка 427
в OpenGame.Game.Main() в C:\Documents and Settings\Admin\мои документы\visual studio 2010\Projects\OpenGame\OpenGame\Game.cs:строка 76
в System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
в System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
в Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
в System.Threading.ThreadHelper.ThreadStart_Context(Object state)
в System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
в System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
в System.Threading.ThreadHelper.ThreadStart()
InnerException:

SVat's picture
flopoloco wrote:

Can you try to get OpenTK into your project with nuget?

what does it help?

the Fiddler's picture

Two more things:
1. when running debug OpenTK.dll, can you post the output from the "application output" window? (You can open the "application output" window with ctrl-w-o).

2. try using the newest SDL2 version from http://libsdl.org/download-2.0.php

SVat's picture
Quote:

1. when running debug OpenTK.dll, can you post the output from the "application output" window? (You can open the "application output" window with ctrl-w-o).

opentk debug output

Quote:

2. try using the newest SDL2 version from http://libsdl.org/download-2.0.php

did not help

the Fiddler's picture

Thanks, this helps.

There are two separate issues here:
1. Visual Studio 2010 (.Net 4.0) does not like the app.manifest in OpenTK.Examples. If you remove this file and recompile then OpenTK.Examples will run.

2. There is an issue in the SDL2 backend of OpenTK. If you remove SDL2.dll, then everything appears to run correctly. Investigating.

the Fiddler's picture

The stack corruption issue is fixed by https://github.com/opentk/opentk/pull/111

Can you please test that and verify?