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

Author Topic: Crash on window with no event handling  (Read 2277 times)

0 Members and 1 Guest are viewing this topic.

slotdev

  • Sr. Member
  • ****
  • Posts: 385
    • View Profile
Crash on window with no event handling
« on: November 13, 2012, 01:15:20 pm »
Hi

My game's 2nd window - which requires no event handling, it is just displaying statistics/information - "crashes" with "game.exe has stopped responding" when you click on the window. The thing is, the window keeps rendering even with Windows' semi-transparent white over the top for when it "crashes". So my guess is, its just an event handling issue.

Is this known, and if so, whats the fix? I guess just add a event handler to the other window?

Thanks
Ed
SFML 2.1

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Crash on window with no event handling
« Reply #1 on: November 13, 2012, 01:24:56 pm »
From tutorial:
Quote
A mistake that people often do is to forget the event loop, because they don't care yet about handling events (they use real-time inputs instead). But without an event loop, the window won't be responsive; indeed, the event loop has two roles: in addition to provide events to the user, it gives the window a chance to process its internal events too, which is required so that it can react to move or resize user actions.

Sometimes I wonder why I waste so much time writing tutorials. It blocks the release of SFML 2.0 and people never read them anyway.
Laurent Gomila - SFML developer

slotdev

  • Sr. Member
  • ****
  • Posts: 385
    • View Profile
Re: Crash on window with no event handling
« Reply #2 on: November 13, 2012, 01:28:12 pm »
Sorry Laurent :(

I guess people are lazy, and just want the answers quickly. I am lazy, this is for sure. Thanks for your help anyway :)
SFML 2.1