If I move or minimize my program's window it crashes?

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

Post Reply
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

If I move or minimize my program's window it crashes?

Post by dandymcgee »

I have an OpenGL / SDL program I wrote that closes itself when you drag the window for more than half a second or minimize the window. Any ideas why this would happen? There are a ton of things being drawn and updated per second, but I don't believe there are any memory leaks.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
User avatar
RyanPridgeon
Chaos Rift Maniac
Chaos Rift Maniac
Posts: 447
Joined: Sun Sep 21, 2008 1:34 pm
Current Project: "Triangle"
Favorite Gaming Platforms: PC
Programming Language of Choice: C/C++
Location: UK
Contact:

Re: If I move or minimize my program's window it crashes?

Post by RyanPridgeon »

Well often when you move the window, it freezes the program.

This can fuck up your game logic severely if you're using difference in time to control the game. Just a thought.
Ryan Pridgeon
C, C++, C#, Java, ActionScript 3, HaXe, PHP, VB.Net, Pascal
Music | Blog
User avatar
avansc
Respected Programmer
Respected Programmer
Posts: 1708
Joined: Sun Nov 02, 2008 6:29 pm

Re: If I move or minimize my program's window it crashes?

Post by avansc »

no its not that. its most likely code in the redraw function.

edit: debuggin it would probably help...
Some person, "I have a black belt in karate"
Dad, "Yea well I have a fan belt in street fighting"
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

Re: If I move or minimize my program's window it crashes?

Post by dandymcgee »

I'm pretty sure it's time. It segfaults at a vector.erase() call, which is called from within a loop governed by ticks. I guess for now I'll just not move or minimize the window...
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
Post Reply