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.


Messages - GaborKovacs

Pages: [1]
1
DotNet / Error message after closing application with SFML objects
« on: November 11, 2011, 01:18:52 pm »
Thanks! Funny I've never thought of versions that way but I'll bear that in mind! :)

Gabor

2
DotNet / Error message after closing application with SFML objects
« on: November 10, 2011, 05:47:44 pm »
Well, in that case, I'll go back to version 1.6 until this is fixed. Am I right in assuming that SFML 1.6 does not have this bug?

You say in your github post that you plan to fix this for version 2.x.

I think this should really be put right in the first official release of SFML 2.0, since there is no way to prevent the AudioDevice destructor from being called, so anyone using the SFML audio library will run into this issue (at least on some systems).

You said in the post that fixing this problem is not top priority for the time being; is that because it only and specifically affects XP users?

I think SFML is cleanest and most intuitive multimedia API I've ever seen (and it seems I'm not alone with this opinion), so I would very much welcome a robust and stable version 2.0 I could work with.

Thanks for all the effort you've put in this project so far.

Gabor

3
DotNet / Error message after closing application with SFML objects
« on: November 08, 2011, 09:57:23 am »
All right, thanks.

Until the bug is fixed, is there a workaround so that my app exits in a more elegant way for the time being?

Gabor

4
DotNet / Error message after closing application with SFML objects
« on: November 08, 2011, 09:45:40 am »
Thanks, anyway.

I've tried two things so far:

I put the Application.Run(...) call in a try/catch block, but it did not catch the exception, so it appears the problem occurs during CLR cleanup after the the application has shut down. So I though it might be related to the finalization of SFML objects.

I also tried calling GC.SuppressFinalize(...) after disposing of the relevant objects, but again it didn't help.

If this problem has never come up in native C++ or C applications, I think it might have something to do with the .NET binding handling unmanaged code. I've looked at the binding files and see nothing suspicious there, although I have to admit I'm not an expert in low-level .NET issues...

Gabor

5
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

6
DotNet / Building the SFML.net solution: debug or release build?
« on: October 24, 2011, 12:28:17 pm »
Thanks!

Gabor

7
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

8
Graphics / Strange graphics behaviour at very low frame rates
« on: October 19, 2011, 08:58:33 pm »
Thanks. So it cannot be a multithreading issue, then...

I suppose I'll do a little bit of testing (on other machines as well) to see under what circumstances these problems tend to occur. I'll tell you if I find something.

Best regards,
Gabor

9
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

10
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

11
Graphics / Rendering special unicode characters in the .NET binding
« on: September 12, 2011, 09:46:05 am »
Thank you. I'll have a go with the v2.0 snapshot then!

Gabor

12
Graphics / Rendering special unicode characters in the .NET binding
« on: September 12, 2011, 08:29:01 am »
No, I haven't. I thought since version 1.6 was the current official version, it should be reasonably stable. Since all other features I'm using appear to work beautifully, I've been wondering if there's a possible workaround for displaying unicode characters with this version.

When is version 2.0 due to be officially released (just as a rough estimate)? Is the currently available snapshot reasonably close to what we can expect to see then?

Thanks for your help again.

Gabor

13
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