Very strange problem

Started by
3 comments, last by Srbin013 16 years, 2 months ago
I am using debug mode in code::block ide and sdl api. When i quit my program, the console remain open. If i press any key, no problem, console closses and code::blocks report no error. But, if i close console using its top-right close button, i get this error message: Process terminated with status:-1073741510 What is the problem? I am pretty sure everything was freed back to the system. Is there some way to check if i skipped some things?
Advertisement
Quote:Original post by Srbin013
I am using debug mode in code::block ide and sdl api. When i quit my program, the console remain open.


What do you mean here? That you #include <iostream>? If yes, you should not include it.

Go into the O/S process manager and simply check what processes/threads are still running. You should get used to doing that anyway if you write a lot of code. Some code looks like it's exited but is still going in the background and if you ever accidentally write a loop with no exit then you'll need to know how to get into the process manager real fast to kill it.

I was tired and accidentally pasted a loop that loaded a 20 mb graphic file into my render handler that updates roughly 200 times a second. That turned my laptop to toast real fast.

m0ng00se
Quote:Original post by sheep19
Quote:Original post by Srbin013
I am using debug mode in code::block ide and sdl api. When i quit my program, the console remain open.


What do you mean here? That you #include <iostream>? If yes, you should not include it.


I am not using iostream, every output is redirected to console using this:
freopen( "CON", "w", stdout );
freopen( "CON", "w", stderr );



Quote:Original post by m0ng00se
Go into the O/S process manager and simply check what processes/threads are still running. You should get used to doing that anyway if you write a lot of code. Some code looks like it's exited but is still going in the background and if you ever accidentally write a loop with no exit then you'll need to know how to get into the process manager real fast to kill it.

m0ng00se


All fine. As soon as my program exits, it is not in the system anymore.


This topic is closed to new replies.

Advertisement