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. SEH problem between debug and release version

SEH problem between debug and release version

Scheduled Pinned Locked Moved C / C++ / MFC
announcementdebugginghelpquestion
2 Posts 2 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.
  • C Offline
    C Offline
    crazyzhou
    wrote on last edited by
    #1

    hi! several days ago,I wrote my program with seh filter function using "_set_se_translator()",the debug version worked well as my expectation that it turned to my own exception filter specified in _set_se_translator() when the exception happened;but the release version did it as if there was no try_catch statement.why? thanks!

    B 1 Reply Last reply
    0
    • C crazyzhou

      hi! several days ago,I wrote my program with seh filter function using "_set_se_translator()",the debug version worked well as my expectation that it turned to my own exception filter specified in _set_se_translator() when the exception happened;but the release version did it as if there was no try_catch statement.why? thanks!

      B Offline
      B Offline
      Brad Sokol
      wrote on last edited by
      #2

      You need to provide a bit more context about your code. That said, I ran into something similar which may be the problem you're having. I had code similar to this: int* pi = NULL; int i = *pi; // Generates an access violation In debug builds, an exception was thrown from my SE handler and caught, but not in release builds. As it turned out, in release builds, the optimiser was correctly removing this code because it had no effect. :doh: Not sure what you're doing, but if it's simple test case like mine, you might want to turn off the optimiser for that block of code: #pragma optimize("", off) Brad

      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