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

Author Topic: SVN DestroyWindow Crash  (Read 4567 times)

0 Members and 1 Guest are viewing this topic.

dewyatt

  • Jr. Member
  • **
  • Posts: 75
    • View Profile
    • http://dewyatt.blogspot.com
SVN DestroyWindow Crash
« on: August 25, 2008, 12:46:21 am »
Alright, I've been avoiding this.
My app has been crashing on exit randomly, maybe 1/100 times.
I just upgraded to the most recent SVN, hoping the crash would disappear, but it just crashed again.

It's always, always, on this line 224 in WindowImplWin32.cpp:
Code: [Select]

if (myHandle)
    DestroyWindow(myHandle); //Crash


Call stack:
Quote

    6d1812e0()   
    user32.dll!7e418734()    
    [Frames below may be incorrect and/or missing, no symbols loaded for user32.dll]   
    user32.dll!7e418816()    
    nvoglnt.dll!69710e86()    
    user32.dll!7e41b50c()    
    ntdll.dll!7c90eae3()    
    user32.dll!7e41daf6()    
>   Game_Debug.exe!sf::priv::WindowImplWin32::~WindowImplWin32()  Line 224 + 0x12 bytes   C++
    90909090()   


Hopefully the cause of this can be unearthed as it's been driving me crazy.
It seems to happen regardless of video mode (resolution/fullscreen/etc).
IIRC it happens in Debug as well as Release modes.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
SVN DestroyWindow Crash
« Reply #1 on: August 25, 2008, 09:15:31 am »
Hmm sorry, I've never seen this kind of crash. I think you're the only one to get it, so the problem might be on your side.

What is your hardware configuration ? OS ? Does it happen even with the simplest program ?
Laurent Gomila - SFML developer

dewyatt

  • Jr. Member
  • **
  • Posts: 75
    • View Profile
    • http://dewyatt.blogspot.com
SVN DestroyWindow Crash
« Reply #2 on: August 25, 2008, 10:19:27 pm »
Darn, I was afraid of that.
It probably is on my side but I can't imagine what is causing it.
I just rewrote my entire app recently and was very careful in doing so.
I thought that might take care of it but I guess not.

It is pretty rare.
I tested just now and had to run it at least 30 times for it to crash once.
The fact that it's happening sporadically makes me think it could be a threading issue.
I see there are 2 threads running (Besides the main app thread. I don't explicitly create any).
What are these for? I don't use any audio yet, only graphics.
So what is SFML using the 2 threads for?
Also, one thread always exits with code 1 (which indicates failure by convention).

My hardware is:
OS: Windows XP SP2 (32-bit)
CPU: AMD Sempron 2600+
Video: GeForce4 MX 4000

I haven't tested with the simplest programs yet.
I will do that now.
I suspect this may be caused by CEGUI.

dewyatt

  • Jr. Member
  • **
  • Posts: 75
    • View Profile
    • http://dewyatt.blogspot.com
SVN DestroyWindow Crash
« Reply #3 on: August 25, 2008, 11:38:15 pm »
Well I can't reproduce this anymore.
My original RenderWindow was a boost::scoped_ptr heap variable.
I changed it to a stack variable and it won't crash anymore.
I changed it back to a boost::scoped_ptr and it still won't crash anymore.

I've run it over 300 times.
I just don't know what's up with this.
But if it crashes again, I'll post here.

dewyatt

  • Jr. Member
  • **
  • Posts: 75
    • View Profile
    • http://dewyatt.blogspot.com
SVN DestroyWindow Crash
« Reply #4 on: August 26, 2008, 12:50:22 am »
Well, I had it crash on me again.
If I can get it to a point where it's easily reproducable, I'll let you know.

Also, for additional information:
Quote

Unhandled exception at 0x6d1812e0 in Game_Debug.exe: 0xC0000005: Access violation reading location 0x6d1812e0

dewyatt

  • Jr. Member
  • **
  • Posts: 75
    • View Profile
    • http://dewyatt.blogspot.com
SVN DestroyWindow Crash
« Reply #5 on: August 26, 2008, 01:18:36 am »
Well I did discover a bit more information.
It seems my windows virtual desktop manager, Virtual Dimension, launches at least a few threads through its hook.
I'm going to be running it without Virtual Dimension to see if it ever crashes.