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. ATL / WTL / STL
  4. Crashes in ATL conversion macros

Crashes in ATL conversion macros

Scheduled Pinned Locked Moved ATL / WTL / STL
c++csharpcssvisual-studioadobe
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.
  • A Offline
    A Offline
    Andrew Hain
    wrote on last edited by
    #1

    We have been encountering crashes in ATL conversion macros where the ATL library function pointer g_pfnGetThreadACP points not to an actual function but into thin air. The call through g_pfnGetThreadACP can be eliminated by compiling with _CONVERSION_DONT_USE_THREAD_LOCALE defined, but this loses the thread-specific code page in our multithreaded programs. There is no compiler option to simply use CP_THREAD_ACP, although the restriction to Windows 2000 and later would be more than enough for our needs. The programs that have been crashing are compiled with Visual Studio 2005 in release build; debugging builds and similar programs compiled with Visual Studio 2003 do not crash. All programs that have crashed use an in-house port of Objective Grid 9.02 to VS8 which we have used for over a year but programs only just started crashing so there must have been something else that has changed. All crashes have either been when the program has been initializing (MFC InitInstance()) or closing down. Has anyone got any ideas?

    S 1 Reply Last reply
    0
    • A Andrew Hain

      We have been encountering crashes in ATL conversion macros where the ATL library function pointer g_pfnGetThreadACP points not to an actual function but into thin air. The call through g_pfnGetThreadACP can be eliminated by compiling with _CONVERSION_DONT_USE_THREAD_LOCALE defined, but this loses the thread-specific code page in our multithreaded programs. There is no compiler option to simply use CP_THREAD_ACP, although the restriction to Windows 2000 and later would be more than enough for our needs. The programs that have been crashing are compiled with Visual Studio 2005 in release build; debugging builds and similar programs compiled with Visual Studio 2003 do not crash. All programs that have crashed use an in-house port of Objective Grid 9.02 to VS8 which we have used for over a year but programs only just started crashing so there must have been something else that has changed. All crashes have either been when the program has been initializing (MFC InitInstance()) or closing down. Has anyone got any ideas?

      S Offline
      S Offline
      Stuart Dootson
      wrote on last edited by
      #2

      1. Trace into the code and find why g_pfnGetThreadACP isn't being set. 2. Set a data breakpoint on g_pfnGetThreadACP and find what's zeroing it out.

      Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

      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