Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. release mode crashes when creating tool bar

release mode crashes when creating tool bar

Scheduled Pinned Locked Moved C / C++ / MFC
debuggingquestionannouncement
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rayjoslyn
    wrote on last edited by
    #1

    BOOL result = tb->CreateEx( this ,TBSTYLE_TRANSPARENT | TBSTYLE_FLAT ,WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ,toolBarBorder ,TB_ID); For some reason this crashes in release mode but not debug, where should I be looking for some un-initialized pointers. I can't seem to isolate where it is happening. Can anyone give me some pointers? Using VS2008, by the way no crashes in release or debug in VS2003 Thanks Ray

    S A 2 Replies Last reply
    0
    • R rayjoslyn

      BOOL result = tb->CreateEx( this ,TBSTYLE_TRANSPARENT | TBSTYLE_FLAT ,WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ,toolBarBorder ,TB_ID); For some reason this crashes in release mode but not debug, where should I be looking for some un-initialized pointers. I can't seem to isolate where it is happening. Can anyone give me some pointers? Using VS2008, by the way no crashes in release or debug in VS2003 Thanks Ray

      S Offline
      S Offline
      Stephen Hewitt
      wrote on last edited by
      #2

      First thing, when you build a release build you should still include debug information. Using Visual Studio 2008: the "Debug Information Format" setting in C++ node of the project properties should be set to "Program Database (/Zi)" for release builds (and "Program Database for Edit & Continue(/ZI)" on debug builds); On the "Linker->Debugging" node set "Generate Debug Info" to "Yes". Once you've got all that set-up debug the program as you normally would - you can't trust the debugger as much as you can in a release build, but all generally works well.

      Steve

      1 Reply Last reply
      0
      • R rayjoslyn

        BOOL result = tb->CreateEx( this ,TBSTYLE_TRANSPARENT | TBSTYLE_FLAT ,WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ,toolBarBorder ,TB_ID); For some reason this crashes in release mode but not debug, where should I be looking for some un-initialized pointers. I can't seem to isolate where it is happening. Can anyone give me some pointers? Using VS2008, by the way no crashes in release or debug in VS2003 Thanks Ray

        A Offline
        A Offline
        Alan Balkany
        wrote on last edited by
        #3

        You need this: Surviving the Release Version[^]

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups