Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Graphics
»
Thread causes a crash in SFML/wxWidgets app *solved*
Print
Pages: [
1
]
Author
Topic: Thread causes a crash in SFML/wxWidgets app *solved* (Read 2132 times)
0 Members and 1 Guest are viewing this topic.
SpectreNectar
Newbie
Posts: 39
Thread causes a crash in SFML/wxWidgets app *solved*
«
on:
January 05, 2014, 01:52:43 am »
Hi
I'm making an application using SFML 2.0 and wxWidgets together. A level editor that opens a new window when the level is to be tested. Causing a crash why I'm unsure.
Main.cpp - -
http://pastebin.com/WHJuCM13
application.cpp - -
http://pastebin.com/GtEwB2ji
application.h - -
http://pastebin.com/TAyBFfGg
Help much appreciated
«
Last Edit: January 05, 2014, 02:11:47 pm by SpectreNectar
»
Logged
Omega
Newbie
Posts: 29
Re: Thread causes a crash in SFML/wxWidgets app
«
Reply #1 on:
January 05, 2014, 02:11:55 am »
Your thread object goes out of scope before it really has a chance to do anything. Put your thread object somewhere where its scope will outlast the execution of its callback.
Logged
SpectreNectar
Newbie
Posts: 39
Re: Thread causes a crash in SFML/wxWidgets app
«
Reply #2 on:
January 05, 2014, 02:26:04 am »
Exellent
Logged
Omega
Newbie
Posts: 29
Re: Thread causes a crash in SFML/wxWidgets app
«
Reply #3 on:
January 05, 2014, 02:36:12 am »
Does that solve your problem? If so, please mark it so.
Logged
Print
Pages: [
1
]
SFML community forums
»
Help
»
Graphics
»
Thread causes a crash in SFML/wxWidgets app *solved*
anything