• Create Account

#ActualBaneTrapper

Posted 30 November 2012 - 01:30 PM

How old is your SFML2 library? Their was a bug in the RC that caused a similar crash on exit related to the default font used by sf::Text. Explicitly providing a font may solve your crash.
Another common-ish error could be coming from your global objects. The OpenGL context is created along with your sf::RenderWindow. But if one of your globals ends up creating a sf::Texture before your window, then it may cause some problems as the texture depends on the OpenGL context.

I will try to update sfml.

line 18 is closing bracket for main...
so segmentation error comes after that, but there is no code run after that.

None of your code is run after that, true, but the OS is still doing some cleanup of its own after main exits. This sort of error usually indicates that you're stomping memory somewhere. It's at this point that the OS is freeing up resources, including unloading shared libraries and releasing any remaining memory allocated by the program. It has certain markers it uses to manage this stuff. And if corruption has occurred, for example one of those markers has been overwritten, situations like this can arise where the problem does not manifest during runtime but, rather, at exit. In your particular case, the problem is occurring when the graphics driver is being shutdown, which indicates that memory in driver's space has been corrupted somehow.

There are a number of ways to cause this sort of corruption, but they can be hard to find. If you are using VisualC++, you might be able to get more info by calling _CrtSetDbgFlag(_CrtSetDbgFlag(_CRTDBG_REPORT_FLAG_DF)|_CRTDBG_CHECK_ALWAYS_DF) during startup. If that doesn't help, another technique is to comment out most of the program, recompile with only a do-nothing main function, and run it. Then you keep uncommenting more functionality, recompiling, and running again until you get the crash. That will help you hone in on the place where the corruption is occurring.

Commenting out the program... Seems like optimal solution. Thanks on help, its work time now.

EDIT::
He...Hello?
Em i allive???
My code is a spaghetti. After a long commenting out code here are resaults.
int main()
{
sf::Music audio;
return 0;
}

Process returned -2147418113 <0x8000FFFF> execution time : 0.100s
Press any key to continue.

Same return value with a basic setup like this one
int main()
{
sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
sf::CircleShape shape(100.f);
shape.setFillColor(sf::Color::Green);

sf::Music audio;
audio.openFromFile("Mus.ogg");
audio.play();

while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}

window.clear();
window.draw(shape);
window.display();
}

return 0;
}


So declaring a sf::Music gro... me!!!
I have downloaded newest data from sfml, build it with cmake - MinGW and i still get this error
Am gonna make a new thread on sfml forum. If by any chance you can help am glad to hear it.
Thanks on support you two, keep up the good work!

EDIT 924:
Error is removed by replacing OpenAL32.dll dll file with one from interet. Tho now my application takes 10-15 second to start up.

#5BaneTrapper

Posted 30 November 2012 - 01:29 PM

How old is your SFML2 library? Their was a bug in the RC that caused a similar crash on exit related to the default font used by sf::Text. Explicitly providing a font may solve your crash.
Another common-ish error could be coming from your global objects. The OpenGL context is created along with your sf::RenderWindow. But if one of your globals ends up creating a sf::Texture before your window, then it may cause some problems as the texture depends on the OpenGL context.

I will try to update sfml.

line 18 is closing bracket for main...
so segmentation error comes after that, but there is no code run after that.

None of your code is run after that, true, but the OS is still doing some cleanup of its own after main exits. This sort of error usually indicates that you're stomping memory somewhere. It's at this point that the OS is freeing up resources, including unloading shared libraries and releasing any remaining memory allocated by the program. It has certain markers it uses to manage this stuff. And if corruption has occurred, for example one of those markers has been overwritten, situations like this can arise where the problem does not manifest during runtime but, rather, at exit. In your particular case, the problem is occurring when the graphics driver is being shutdown, which indicates that memory in driver's space has been corrupted somehow.

There are a number of ways to cause this sort of corruption, but they can be hard to find. If you are using VisualC++, you might be able to get more info by calling _CrtSetDbgFlag(_CrtSetDbgFlag(_CRTDBG_REPORT_FLAG_DF)|_CRTDBG_CHECK_ALWAYS_DF) during startup. If that doesn't help, another technique is to comment out most of the program, recompile with only a do-nothing main function, and run it. Then you keep uncommenting more functionality, recompiling, and running again until you get the crash. That will help you hone in on the place where the corruption is occurring.

Commenting out the program... Seems like optimal solution. Thanks on help, its work time now.

EDIT::
He...Hello?
Em i allive???
My code is a spaghetti. After a long commenting out code here are resaults.
int main()
{
sf::Music audio;
return 0;
}

Process returned -2147418113 <0x8000FFFF> execution time : 0.100s
Press any key to continue.

Same return value with a basic setup like this one
int main()
{
sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
sf::CircleShape shape(100.f);
shape.setFillColor(sf::Color::Green);

sf::Music audio;
audio.openFromFile("Mus.ogg");
audio.play();

while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}

window.clear();
window.draw(shape);
window.display();
}

return 0;
}


So declaring a sf::Music gro... me!!!
I have downloaded newest data from sfml, build it with cmake - MinGW and i still get this error
Am gonna make a new thread on sfml forum. If by any chance you can help am glad to hear it.
Thanks on support you two, keep up the good work!

EDIT 924:
Error is removed by replacing OpenAL32.dll dll file with one from interet. Tho now my application takes 10-15 second to start up.

#4BaneTrapper

Posted 30 November 2012 - 11:48 AM

How old is your SFML2 library? Their was a bug in the RC that caused a similar crash on exit related to the default font used by sf::Text. Explicitly providing a font may solve your crash.
Another common-ish error could be coming from your global objects. The OpenGL context is created along with your sf::RenderWindow. But if one of your globals ends up creating a sf::Texture before your window, then it may cause some problems as the texture depends on the OpenGL context.

I will try to update sfml.

line 18 is closing bracket for main...
so segmentation error comes after that, but there is no code run after that.

None of your code is run after that, true, but the OS is still doing some cleanup of its own after main exits. This sort of error usually indicates that you're stomping memory somewhere. It's at this point that the OS is freeing up resources, including unloading shared libraries and releasing any remaining memory allocated by the program. It has certain markers it uses to manage this stuff. And if corruption has occurred, for example one of those markers has been overwritten, situations like this can arise where the problem does not manifest during runtime but, rather, at exit. In your particular case, the problem is occurring when the graphics driver is being shutdown, which indicates that memory in driver's space has been corrupted somehow.

There are a number of ways to cause this sort of corruption, but they can be hard to find. If you are using VisualC++, you might be able to get more info by calling _CrtSetDbgFlag(_CrtSetDbgFlag(_CRTDBG_REPORT_FLAG_DF)|_CRTDBG_CHECK_ALWAYS_DF) during startup. If that doesn't help, another technique is to comment out most of the program, recompile with only a do-nothing main function, and run it. Then you keep uncommenting more functionality, recompiling, and running again until you get the crash. That will help you hone in on the place where the corruption is occurring.

Commenting out the program... Seems like optimal solution. Thanks on help, its work time now.

EDIT::
He...Hello?
Em i allive???
My code is a spaghetti. After a long commenting out code here are resaults.
int main()
{
sf::Music audio;
return 0;
}

Process returned -2147418113 <0x8000FFFF> execution time : 0.100s
Press any key to continue.

Same return value with a basic setup like this one
int main()
{
sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
sf::CircleShape shape(100.f);
shape.setFillColor(sf::Color::Green);

sf::Music audio;
audio.openFromFile("Mus.ogg");
audio.play();

while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}

window.clear();
window.draw(shape);
window.display();
}

return 0;
}


So declaring a sf::Music gro... me!!!
I have downloaded newest data from sfml, build it with cmake - MinGW and i still get this error
Am gonna make a new thread on sfml forum. If by any chance you can help am glad to hear it.
Thanks on support you two, keep up the good work!

#3BaneTrapper

Posted 30 November 2012 - 11:47 AM

How old is your SFML2 library? Their was a bug in the RC that caused a similar crash on exit related to the default font used by sf::Text. Explicitly providing a font may solve your crash.
Another common-ish error could be coming from your global objects. The OpenGL context is created along with your sf::RenderWindow. But if one of your globals ends up creating a sf::Texture before your window, then it may cause some problems as the texture depends on the OpenGL context.

I will try to update sfml.

line 18 is closing bracket for main...
so segmentation error comes after that, but there is no code run after that.

None of your code is run after that, true, but the OS is still doing some cleanup of its own after main exits. This sort of error usually indicates that you're stomping memory somewhere. It's at this point that the OS is freeing up resources, including unloading shared libraries and releasing any remaining memory allocated by the program. It has certain markers it uses to manage this stuff. And if corruption has occurred, for example one of those markers has been overwritten, situations like this can arise where the problem does not manifest during runtime but, rather, at exit. In your particular case, the problem is occurring when the graphics driver is being shutdown, which indicates that memory in driver's space has been corrupted somehow.

There are a number of ways to cause this sort of corruption, but they can be hard to find. If you are using VisualC++, you might be able to get more info by calling _CrtSetDbgFlag(_CrtSetDbgFlag(_CRTDBG_REPORT_FLAG_DF)|_CRTDBG_CHECK_ALWAYS_DF) during startup. If that doesn't help, another technique is to comment out most of the program, recompile with only a do-nothing main function, and run it. Then you keep uncommenting more functionality, recompiling, and running again until you get the crash. That will help you hone in on the place where the corruption is occurring.

Commenting out the program... Seems like optimal solution. Thanks on help, its work time now.

EDIT::
He...Hello?
Em i allive???
My code is a spaghetti. After a long commenting out code here are resaults.
int main()
{
sf::Music audio;
return 0;
}

Process returned -2147418113 <0x8000FFFF> execution time : 0.100s
Press any key to continue.

Same return value with a basic setup like this one
int main()
{
sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
sf::CircleShape shape(100.f);
shape.setFillColor(sf::Color::Green);

sf::Music audio;
audio.openFromFile("Mus.ogg");
audio.play();

while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}

window.clear();
window.draw(shape);
window.display();
}

return 0;
}


So declaring a sf::Music groped me!!!
I have downloaded newest data from sfml, build it with cmake - MinGW and i still get this error
Am gonna make a new thread on sfml forum. If by any chance you can help am glad to hear it.
Thanks on support you two, keep up the good work!

#2BaneTrapper

Posted 30 November 2012 - 11:42 AM

How old is your SFML2 library? Their was a bug in the RC that caused a similar crash on exit related to the default font used by sf::Text. Explicitly providing a font may solve your crash.
Another common-ish error could be coming from your global objects. The OpenGL context is created along with your sf::RenderWindow. But if one of your globals ends up creating a sf::Texture before your window, then it may cause some problems as the texture depends on the OpenGL context.

I will try to update sfml.

line 18 is closing bracket for main...
so segmentation error comes after that, but there is no code run after that.

None of your code is run after that, true, but the OS is still doing some cleanup of its own after main exits. This sort of error usually indicates that you're stomping memory somewhere. It's at this point that the OS is freeing up resources, including unloading shared libraries and releasing any remaining memory allocated by the program. It has certain markers it uses to manage this stuff. And if corruption has occurred, for example one of those markers has been overwritten, situations like this can arise where the problem does not manifest during runtime but, rather, at exit. In your particular case, the problem is occurring when the graphics driver is being shutdown, which indicates that memory in driver's space has been corrupted somehow.

There are a number of ways to cause this sort of corruption, but they can be hard to find. If you are using VisualC++, you might be able to get more info by calling _CrtSetDbgFlag(_CrtSetDbgFlag(_CRTDBG_REPORT_FLAG_DF)|_CRTDBG_CHECK_ALWAYS_DF) during startup. If that doesn't help, another technique is to comment out most of the program, recompile with only a do-nothing main function, and run it. Then you keep uncommenting more functionality, recompiling, and running again until you get the crash. That will help you hone in on the place where the corruption is occurring.

Commenting out the program... Seems like optimal solution. Thanks on help, its work time now.

EDIT::
He...Hello?
Em i allive???
My code is a spaghetti. After a long commenting out code here are resaults.
int main()
{
sf::Music audio;
return 0;
}

Process returned -2147418113 <0x8000FFFF> execution time : 0.100s
Press any key to continue.

Same return value with a basic setup like this one
int main()
{
sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
sf::CircleShape shape(100.f);
shape.setFillColor(sf::Color::Green);

sf::Music audio;
audio.openFromFile("Mus.ogg");
audio.play();

while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}

window.clear();
window.draw(shape);
window.display();
}

return 0;
}


So declaring a sf::Music groped me!!!
I have downloaded newest data from sfml, build it with cmake - MinGW and i still get this error
Am gonna make a new thread on sfml forum. If by any chance you can help am glad to hear it.
Thanks on support you two, keep up the good work!

#1BaneTrapper

Posted 30 November 2012 - 02:06 AM

How old is your SFML2 library? Their was a bug in the RC that caused a similar crash on exit related to the default font used by sf::Text. Explicitly providing a font may solve your crash.
Another common-ish error could be coming from your global objects. The OpenGL context is created along with your sf::RenderWindow. But if one of your globals ends up creating a sf::Texture before your window, then it may cause some problems as the texture depends on the OpenGL context.

I will try to update sfml.

line 18 is closing bracket for main...
so segmentation error comes after that, but there is no code run after that.

None of your code is run after that, true, but the OS is still doing some cleanup of its own after main exits. This sort of error usually indicates that you're stomping memory somewhere. It's at this point that the OS is freeing up resources, including unloading shared libraries and releasing any remaining memory allocated by the program. It has certain markers it uses to manage this stuff. And if corruption has occurred, for example one of those markers has been overwritten, situations like this can arise where the problem does not manifest during runtime but, rather, at exit. In your particular case, the problem is occurring when the graphics driver is being shutdown, which indicates that memory in driver's space has been corrupted somehow.

There are a number of ways to cause this sort of corruption, but they can be hard to find. If you are using VisualC++, you might be able to get more info by calling _CrtSetDbgFlag(_CrtSetDbgFlag(_CRTDBG_REPORT_FLAG_DF)|_CRTDBG_CHECK_ALWAYS_DF) during startup. If that doesn't help, another technique is to comment out most of the program, recompile with only a do-nothing main function, and run it. Then you keep uncommenting more functionality, recompiling, and running again until you get the crash. That will help you hone in on the place where the corruption is occurring.

Commenting out the program... Seems like optimal solution. Thanks on help, its work time now.

PARTNERS