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

Author Topic: How do I obtain error messages from within SFML graphics?  (Read 1554 times)

0 Members and 1 Guest are viewing this topic.

jeffordsm

  • Newbie
  • *
  • Posts: 1
    • View Profile
How do I obtain error messages from within SFML graphics?
« on: August 07, 2012, 05:46:10 pm »
Hi all, 

I have been working with SFML 2.0 for about a month now and its very usable, but have found a potential showstopper issue for my project that I cannot seem to track down. I have a bug that shows up on a Panasonic CF-H2 with Intel HD3000 after running and reloading textures several times (it has never happened on Nvidia). I am developing on a desktop and remote debugging on a Panasonic CF-H2 (Windows 7 tablet computer - I know its video card has several issues and the driver is forced to be about 2 years old but its what I have to work with).

My code is based on the sfml Effect sample but I have included it in a larger Win32 project and I have it working in a threaded environment where I am using sf::Mutex to lock the textures when I am performing updates or when drawing. It works unless I try to restart/recreate a number of times. I have also tried to prevent all the resources from being destroyed and recreated with the same results. It usually takes me several minutes to cause the failure.

After the issue occurs the objects continue to render but all the textures for both my sprites and my text disappear. The sprites then either appear solid white or solid black and the absent text scrolls across the screen which indicate that the underlying objects are in fact drawing. Although I believe that I am completely deleting and recreating the window, the textures, the shaders I have been researching it for over a week and have not figured it out.

Once it occurs the only option is to close and reopen the program.

Is there a way to debug the OpenGL last error messages? I would like to find a way to output all the OpenGL last error messages for the first 5 seconds whenever I am trying to delete and recreate all the resources.

Any suggestions as to what generally might be causing the issue? I figure that I either am running out of video memory or I am losing my context (or its parameters are not changing).  I cannot figure out where/how to look.

Thanks!

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10883
    • View Profile
    • development blog
    • Email
Re: How do I obtain error messages from within SFML graphics?
« Reply #1 on: August 07, 2012, 06:30:03 pm »
This really sounds like a driver issue, so don't blame SFML... :P

Anyways it sounds like all the textures get deleted, but verify if it's caused by your code, SFML or some other strange driver issue, you'll need to create a minimal, but complete example that reproduces the error.
Since I've not really any knowledge with OpenGL I can't help you there any further...
Have you ever experienced similar errors with other OpenGL applications?

What's your exact version of SFML 2? RC? Commit XYZ?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

kurasu1415

  • Newbie
  • *
  • Posts: 37
    • View Profile
    • Email
Re: How do I obtain error messages from within SFML graphics?
« Reply #2 on: August 08, 2012, 07:35:32 pm »
There are a lot of debugging tools out there for OpenGL. Just do a quick google search. This isn't exactly a SFML-related issue. There are some OpenGL calls you can run as well, but im not sure off the top of my head.

 

anything