Posts: 136
Threads: 26
Joined: Aug 2017
Reputation:
5
I got the C# sample to run... I wonder if you set up the project correctly? Or if something changed in the Tilengine downloads since I tried it...
Posts: 673
Threads: 33
Joined: Jan 1970
Reputation:
13
I see that RexyDallas build is 32-bit windows. I can't test that setup because my Windows is 64-bit and the .NET runtime loads the dll that matches the OS version. To test it, one has to setup a 32-bit Windows.
Maybe the transition to the LGPL 2.0 relesase has touched some files that I haven't noticed... I'll check it
Posts: 9
Threads: 1
Joined: Dec 2017
Reputation:
2
08-30-2018, 02:36 PM
(This post was last modified: 08-30-2018, 02:52 PM by RexyDallas.)
This PC came with windows 10. Also, SharpDevelop doesn't support debugging 64-bit processes. Also, I simply copy-pasted the tilengine.dll that was included with the 32-bit version. Also, it only crashes when window.DrawFrame(frame); is called.
Also, when I comment out "engine.SetRasterCallback(callback);", it runs perfectly. However, when I comment out the contents of that function, it still crashes.
Posts: 12
Threads: 1
Joined: Aug 2018
Reputation:
0
are you using mono or .net
Posts: 9
Threads: 1
Joined: Dec 2017
Reputation:
2
08-30-2018, 05:18 PM
(This post was last modified: 08-30-2018, 05:30 PM by RexyDallas.)
I am using .net. The target framework is ".NET Framework 2.0". Also, I should note, the full frame is drawn.
Posts: 673
Threads: 33
Joined: Jan 1970
Reputation:
13
Seems to be related to the C# "delegates" (the equivalent of C function pointers).
The correct startup and render the full frame denotes correct matching of .net/native dll. If not, it wouldn' start at all.
The fact that it crashes when the delegate callback is called denotes a delegate managing problem, something that can be tricky.
The error happens only running from the debugger in SharpDevelop? Can you run the executable directly from the command line or double-clicking it? We have to discard the environment itself doing funny things. My test environment is Visual Studio (it's free) and it runs there.
Posts: 9
Threads: 1
Joined: Dec 2017
Reputation:
2
08-31-2018, 07:08 AM
(This post was last modified: 08-31-2018, 08:21 AM by RexyDallas.)
It even crashes when I run it without attached debugger. Also, I manually installed .net x64, even though windows comes with it. When I compile it with the SDK command prompt, it still gives me the error. Though, it gives me a warning about 'mscorlib.dll' targeting a different processor. However, I do not get that warning in SharpDevelop unless I change the target platform. Also, I can't figure out how to compile 64-bit.
Edit: I got the x64 version to run and work perfectly after copying sdl2.dll and tilengine.dll from SuperMarioClone. Though, doing the same for the 32-bit version leads to a white screen with the same crash.
Posts: 12
Threads: 1
Joined: Aug 2018
Reputation:
0
Just a test I downloaded sharpdevelop and created a new project it compiled and ran perfectly, there is clearly a setting in the project file that is messing things up