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 - myl

Pages: [1]
1
DotNet / System.AccessViolation
« on: July 16, 2013, 11:39:50 am »
After creating a RenderWindow and rendering lots of pretty things, i randomly had this piece of code throwing AccessViolations from the Text constructor.

public int GetTextWidthPixels(string text, Font font, uint fontSize)
{
       var textShape = new Text(text, font, fontSize);
       var bounds = textShape.FindCharacterPos((uint)(text.Length));
       textShape.Dispose();
       return (int)bounds.X;
}

The font is a static loaded resource, but to make sure, I've tested that the constructor doesn't misbehave if I pass null or a disposed Font, so this is not the issue.

I'm wondering if you could share any insight into the things that could be causing this behavior, so i know what to look for.

2
Feature requests / Progressive jpeg support?
« on: June 28, 2013, 04:17:15 pm »
Hey Laurent.

Are there any plans to support progressive jpegs or should I work around it?

Merci!

3
General / Dead view when returning from standby on windows
« on: June 27, 2013, 05:42:05 pm »
Hey.

I'm experiencing a black screen issue when my windows machine returns from standby. It is not related to my code, because it also happens with the precompiled SFML win32 spinning troll example.

After the view enters this dead state i get an error message when attempting to load textures:
Failed to create texture, its internal size is too high (180x61, maximum is 0x0).

I tried solving it by spawning a new renderwindow (although i would need a way to detect deadness for this approach do any good), but new renderwindows are just as dead.

setActive on RenderWindow does no good.
 
Eergh?

4
DotNet / Error handling in .Net
« on: June 14, 2013, 03:52:12 pm »
Hey Laurent and other SFML users.

I'm currently moving a project from SDL to SFML. Happy times, except when it comes to error handling. Going through forum threads on the topic I understand this is not an easy fix. Typed errors is a luxury, but I would be happy if I can just reroute or catch the messages in std err somehow. Has anyone had luck with this? This does not work for me: http://stackoverflow.com/questions/1579074/redirect-stdoutstderr-on-a-c-sharp-windows-service

I've attempted to make a wrapper around the sf::err stream in the excluded SFML System module, but with no luck, as a am merely a mortal C# developer.

Help! I need my errors!

Pages: [1]