Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - GaborKovacs

Pages: [1]
1
DotNet / Error message after closing application with SFML objects
« on: November 07, 2011, 02:11:13 am »
Hi!

I'm using the .NET binding of SFML 2.0.

My application has a  class (a Windows.Forms.Form-based dialog) which contains the following SFML members:

Code: [Select]
private SoundBufferRecorder sBufRecorder = new SoundBufferRecorder();
private Sound sound = new Sound();


If I run the app and open this dialog at least once (and therefore the objects are created) I get the following error message after the application closes:

Quote
The instruction at "0x04b053cc" referenced memory at "0x05c1be80". The memory could not be read.

This happens whether or not I dispose of the objects explicitly.

The error goes away, if I do not actually create the objects (leave them as null):

Code: [Select]
private SoundBufferRecorder sBufRecorder;
private Sound sound;


but if either one of the two objects is created, the error message appears.

Could this have something to do with the CLR finalizer finding these objects in an invalid state?

Interestingly, I do not get the error message when I run the application in debug mode from the VS C# 2010 Express IDE.

The error occurs, however, if I run the exe in either the bin/Debug or the bin/Release folder, or publish and install the application with ClickOnce.

I've been wondering if you can give me a hint as to what might cause this problem, and how I could get rid of it.

Thanks in advance,

Gabor

2
DotNet / Building the SFML.net solution: debug or release build?
« on: October 23, 2011, 10:21:20 pm »
Hi!

This is a pretty general question which has recently given me some thought. I'm developing a fairly complex project which is supposed be in the "Debug" phase for several months to come. For this reason, I built the SFML.net solution (v2.0 snapshot) using the "Debug" configuration and thus referenced the debug build of the assemblies.

When I'm finished, should I rebuild the SFML assemblies as "Release", change my project's references to these release versions, and then rebuild my own project as "Release"? Or is this too much of a hassle and I can start working with the release build of the SFML assemblies right from the start?

In other words, is there any advantage in using the debug build of the SFML.net solution while it is also still in development?

Thanks for your tips.

Best regards,

Gabor

3
Graphics / Strange graphics behaviour at very low frame rates
« on: October 18, 2011, 10:50:17 am »
Hi! I'm using SMFL (both 1.6 and 2.0, the latter through its .NET binding) to create software for psychology experiments, so the general architecture of my apps is typically different from that of a game. Most importantly, since there is no need for animation, I do not redraw the screen (render window) for each and every frame.

In terms of pseudocode, the main loop normally looks like this:

Code: [Select]
while (running)
{
    ClearScreenAndDrawElements();
    DisplayScreen();
    WaitForUserInputOrTimeOut(); // this can take several seconds
}


99% of the time everything goes fine, but sometimes, quite unpredictably, the frame displayed does not appear the way it should. This happens most often in the first couple of frames, right after creating the SFML RenderWin. As I said in another post, sometimes the OS system tray appears on top of a full screen RenderWin, at other times, only some of the elements appear on a black background, and at yet other times, missing elements appear on the next frame as if the drawing operation could not finish and were deferred.

Obviously, these issues normally go unnoticed if you write a game and redraw your screen at 30 FPS.

I've been wondering if the Draw and Display methods run on different threads, and these phenomena could be due to some subtle synchronization issue...

Or, maybe what I do is simply not the way SFML is meant to be used?

Thanks for your help in advance.

Gabor

4
Graphics / OS system tray is sometimes drawn on full screen RenderWin
« on: October 05, 2011, 08:42:53 am »
So far I've been using SFML 1.6 with C++, and recently I've tried the .NET binding of version 2.0: this problem seems to have remained.

If I create a full screen RenderWindow, clear it (all white), (and maybe draw an intro-screen), display it and wait, sometimes the Win XP system tray appears at the bottom. This does not happen often, approximately 1 time out of 10, so it may be due to some subtle timing/initialization issue.

My current solution is to keep redrawing the title screen in a loop (with vertical sync on). While it appears to be a waste of resources to redraw the same static screen numerous times, this has worked so far: if the system tray appeared on one of the frames, the next frame made it go away, so the user could only see a single flash of the system tray.

Recently, however, on a single occasion, the very same code produced a different result. Despite the redrawing loop (with some animation), the system tray persisted for about a second. It was either redrawn on top of the RenderWindow each frame, or the RenderWindow was unable to clear it. I've been wondering if this could happen at other times (i.e. not right after starting the application): that would be rather disturbing.

Is there a way to make sure the system tray does not ever appear on top of my full screen application?

Thanks for your help in advance,

Gabor

5
Graphics / Rendering special unicode characters in the .NET binding
« on: September 11, 2011, 11:11:22 pm »
I've recently done a C++ SFML project in which I was able to configure Font objects with custom unicode character sets with no problem. Now I'm using SFML in a .NET project and the same thing does not appear to work: the non-Latin-1 characters (specifically: Ű, Ő, ű, ő) are not rendered. The relevant C# code is as follows:

Code: [Select]
string hungChars = @"AÁBCDEÉFGHIÍJKLMNOÓÖŐPQRSTUÚÜŰVWXYZaábcdeéfghiíjklmnoóöőpqrstuúüűvwxyz0123456789.?!,:;-()";
SFML.Graphics.Font arial = new SFML.Graphics.Font(@"C:\WINDOWS\Fonts\arial.ttf", 48, hungChars);
String2D text = new String2D("Does this work? áéíóöőúüű ÁÉÍÓÖŐÚÜŰ", arial);


Am I getting something wrong here?

Thanks for your help in advance,

Gabor

Pages: [1]
anything