Results 1 to 5 of 5

Thread: heap corruption detected error in run GUI_Layered sample.

  1. #1

    Question heap corruption detected error in run GUI_Layered sample.

    When I run sample GUI_Layered , there is error which is heap corruption detected:... , for detail information,please refer to attachment(picture).Name:  www.PNG
Views: 13
Size:  24.7 KB

    Could someone help to fix this issue or tell me why?

    In addition, I known that the debug version has this issue, but there is no error message in the release version .

    but when I run the release version, I can NOT see the GUI like http://clanlib.org/w/images/thumb/6/...x_layered2.png.
    Last edited by clanlib4d; 12-06-2011 at 04:16 AM.

  2. #2

    Lightbulb Call stack when the error occur.

    > GUI_Layered.exe!_free_dbg_nolock(void * pUserData, int nBlockUse) Line 1376 + 0x3b bytes C++
    GUI_Layered.exe!_free_dbg(void * pUserData, int nBlockUse) Line 1265 + 0xd bytes C++
    GUI_Layered.exe!_aligned_free_dbg(void * memblock) Line 3129 + 0xd bytes C++
    GUI_Layered.exe!_aligned_free(void * memblock) Line 3087 + 0x9 bytes C++
    GUI_Layered.exe!CL_PixelBuffer_Impl::~CL_PixelBuff er_Impl() Line 127 + 0x10 bytes C++
    GUI_Layered.exe!std::tr1::_Ref_count<CL_PixelBuffe r_Impl>::_Destroy() Line 1107 + 0xe bytes C++
    GUI_Layered.exe!CL_Win32Window::update_layered_wor ker_thread() Line 2003 + 0x7c bytes C++
    GUI_Layered.exe!CL_RunnableMember_v0<CL_Win32Windo w>::run() Line 108 + 0x4 bytes C++
    GUI_Layered.exe!CL_Thread_Win32::thread_main(void * data) Line 94 C++
    GUI_Layered.exe!_callthreadstartex() Line 314 + 0xf bytes C
    GUI_Layered.exe!_threadstartex(void * ptd) Line 297 C
    kernel32.dll!75fd339a()
    [Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]
    ntdll.dll!773a9ed2()
    ntdll.dll!773a9ea5()

  3. #3

    Default Env

    My OS: Win7 Pro
    My Visual studio is VS2010
    lib downloaded from clanlib.org, which are ClanLib-VC10Precompiled-static-mt-Win32-2.3.4 , External-VC10Precompiled-static-mt-Win32, etc.

  4. #4

    Default Sample in release ClanLib-2.2.12 is OK.

    Sample in release ClanLib-2.2.12 is OK.
    So this is bug in release 2.3.4, If ..., could fix it in new release (No meaning of push to our volunteer )?

  5. #5
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    I saw a similar error when trying out similar code for linux (now removed)

    I assumed that it was a graphics card driver problem, which it still could be?

    In: Sources/GL/WGL/opengl_window_provider_wgl.cpp -

    Code:
    void CL_OpenGLWindowProvider_WGL::flip(int interval)
    {
    	...
    	CL_PixelBuffer pixelbuffer(width, height, cl_r8);
    	glReadPixels(
    		0, 0,
    		width, height,
    		GL_ALPHA,
    		GL_BYTE, // use GL_BITMAP here for even less transfer?
    		pixelbuffer.get_data());
    	...
    
    }
    Changing cl_r8 to cl_rgba8 fixed the problem. Which was very strange, since glReadPixels is reading in a byte per pixel (alpha channel)

    I wonder if that fixes it on your computer?

Similar Threads

  1. ClanLib 2.3.3 Examples: GUI_Layered and Linux
    By dossjh in forum Official ClanLib SDK Forums
    Replies: 12
    Last Post: 11-28-2011, 10:57 AM
  2. Replies: 5
    Last Post: 07-06-2009, 01:35 PM
  3. Input from numpad keys never detected??
    By sacheie in forum Official ClanLib SDK Forums
    Replies: 10
    Last Post: 07-02-2009, 04:06 PM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •