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

Author Topic: Basic rendering crashing  (Read 14438 times)

0 Members and 1 Guest are viewing this topic.

Ivan

  • Newbie
  • *
  • Posts: 32
  • IT geek
    • View Profile
Re: Basic rendering crashing
« Reply #15 on: January 18, 2015, 08:39:52 pm »
Thanks eXpl0it3r. Yes I'm sure  ;)

I tried that you say but doesn't work. Anyway i don't understand why the same project and configuration works on my laptop and not in desktop. Specially when with SFML 2.1 all works fine.



Additionally the window module depends on gdi32 and winmm, as such they need to be a least on after the window module, better yet put them after all the SFML libs.

You mean this way:



The problem still here  >:(

Thanks for your answers.
« Last Edit: January 18, 2015, 08:50:37 pm by Ivan »

Nybble

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: Basic rendering crashing
« Reply #16 on: February 11, 2015, 02:12:38 am »
Same here... My project works fine in 2.1 but made the switch and when I try to render anything it crashes... everything works fine except when I try to render...

I tried out your example Ivan and it does crash me, I'm guessing it's the graphics card... I do know I have an old graphics card:

radeon hd 4350:

Graphics Engine: Radeon HD 4350
Video Memory: 512MB memory
Memory Interface: 64-bit
DirectX® Support: 10.1
CrossFireX Support: Yes, (software mode)
Bus Standard: PCI Express x1 (works in x4, x8 and x16 PCIe slots)
Core Speed: 600MHz
Memory Speed: 400MHz x2 (800MHz effective)
Ports: 2 x DVI-I, 2 x VGA (with adapter), 1 TV Out
Output Ports: DMS59, TV Out
Number of Monitors Supported: Two DVI
Form Factor: Small Form Factor (SFF) Single Slot
Dimensions: 2.4" H x 6.7" D
Warranty: 3 year limited warranty8
« Last Edit: February 11, 2015, 03:39:57 am by Nybble »

Ivan

  • Newbie
  • *
  • Posts: 32
  • IT geek
    • View Profile
Re: Basic rendering crashing
« Reply #17 on: February 20, 2015, 10:14:43 pm »
Nobody knows how to fix it? Only crash with the SFML 2.2, 2.1 works fine.  :-[ 

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: Basic rendering crashing
« Reply #18 on: February 22, 2015, 01:40:21 am »
Download the gl_dev_new branch archive, build it and test whether it still crashes when you use it instead of the official 2.2 release.
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

miki151

  • Newbie
  • *
  • Posts: 30
    • View Profile
    • Email
Re: Basic rendering crashing
« Reply #19 on: April 16, 2015, 02:32:16 pm »
It seems I'm getting similar crashes. They come in crash reports from users, so I can't reproduce it or check with other SFML versions than 2.2.

Here's the stacktrace. It also looks very similar to this one: https://github.com/SFML/SFML/issues/618

Quote
#0  0x00000000 in ?? ()
#1  0x66998d6e in sf::RenderTarget::applyBlendMode(sf::BlendMode const&) () from C:\Program Files (x86)\Steam\steamapps\common\KeeperRL\sfml-graphics-2.dll
#2  0x66998f0d in sf::RenderTarget::resetGLStates() () from C:\Program Files (x86)\Steam\steamapps\common\KeeperRL\sfml-graphics-2.dll
#3  0x66999297 in sf::RenderTarget::draw(sf::Vertex const*, unsigned int, sf::PrimitiveType, sf::RenderStates const&) () from C:\Program Files (x86)\Steam\steamapps\common\KeeperRL\sfml-graphics-2.dll
#4  0x669a2a68 in sf::VertexArray::draw(sf::RenderTarget&, sf::RenderStates) const () from C:\Program Files (x86)\Steam\steamapps\common\KeeperRL\sfml-graphics-2.dll
#5  0x669989bd in sf::RenderTarget::draw(sf::Drawable const&, sf::RenderStates const&) () from C:\Program Files (x86)\Steam\steamapps\common\KeeperRL\sfml-graphics-2.dll
#6  0x6699f8a6 in sf::Shape::draw(sf::RenderTarget&, sf::RenderStates) const () from C:\Program Files (x86)\Steam\steamapps\common\KeeperRL\sfml-graphics-2.dll
#7  0x669989bd in sf::RenderTarget::draw(sf::Drawable const&, sf::RenderStates const&) () from

Here's the code that crashes:
  RectangleShape r(Vector2f(t.getW(), t.getH()));
  r.setPosition(t.getPX(), t.getPY());
  r.setFillColor(color);
  if (outline) {
    r.setOutlineThickness(-2);
    r.setOutlineColor(*outline);
  }
  addRenderElem([this, r] { display->draw(r); });
 

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: Basic rendering crashing
« Reply #20 on: April 16, 2015, 02:34:41 pm »
It's most likely fixed in the master branch. Rebuild SFML and relink your application.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: Basic rendering crashing
« Reply #21 on: April 16, 2015, 02:51:32 pm »
I've told you in the other thread already, the user is probably running the game on a graphics processor for which there is no acceleration.

To tell for sure whether that is really the case, after you create your sf::Window or sf::RenderWindow, use window.getSettings() to get the settings of the created context and check the OpenGL version, like this:
sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window");
sf::ContextSettings settings = window.getSettings();
std::cout << "Major: " << settings.majorVersion << " Minor: " << settings.minorVersion << std::endl;
In addition to that you can check the vendor and renderer strings that OpenGL returns:
#include <SFML/OpenGL.hpp>

std::string vendor = reinterpret_cast<const char*>(glGetString(GL_VENDOR));
std::string renderer = reinterpret_cast<const char*>(glGetString(GL_RENDERER));
std::cout << "Vendor: " << vendor << " Renderer: " << renderer << std::endl;
This was also what I said just a few days ago here, and mentioned a few weeks ago here.

Provide us with that information, and we'll tell you whether it is a problem with SFML, or your users' systems.
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

miki151

  • Newbie
  • *
  • Posts: 30
    • View Profile
    • Email
Re: Basic rendering crashing
« Reply #22 on: April 16, 2015, 05:10:08 pm »
It's most likely fixed in the master branch. Rebuild SFML and relink your application.

How stable is the master branch? This goes out to thousands of users, so I don't want to gamble with old vs new bugs.

Provide us with that information, and we'll tell you whether it is a problem with SFML, or your users' systems.

I will, thanks.

Jesper Juhl

  • Hero Member
  • *****
  • Posts: 1405
    • View Profile
    • Email
Re: Basic rendering crashing
« Reply #23 on: April 20, 2015, 07:09:44 pm »
I usually update my development systems with a fresh rebuild of master a few times a week and I've yet to discover any major breakage for my own projects - seems quite stable for me.

 

anything