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. question to the pros: nasty ASSERTION in BOOST

question to the pros: nasty ASSERTION in BOOST

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpquestionannouncementsales
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.
  • A Offline
    A Offline
    andreas schaerer
    wrote on last edited by
    #1

    Hy there! i have a hughe problem in my company. i have a quite complex application (distributed, corba, mulithreaded, Boost, QT 3.3) and after closing the program (int closeevent() pApp->exit()) the program closes but after ca 5 sec. there comes an ASSERTION attached_thread_count == 0 in tss_hooks.cpp the code in boost looks like that: attached_threadcount == 0 in tss_hooks.cpp. the code there looks like this: it is in on_process_exit().. catch( ... ) { boost::call_once(init_threadmon_mutex, once_init_threadmon_mutex); boost::mutex::scoped_lock lock(*threadmon_mutex); BOOST_ASSERT(attached_thread_count == 0); return -1; even with the help of some c++ gurus and DevPartnerStudio we could not find the problem. actually it isnt that annoying because only at exit it happens. but we cant deliver it to the customer like that. does enyone has an idea what to do against it, even a trick to just dont show the assertion? unfortunately i cant make a release-version for different reasons. ideas? suggestions?? thanx for any input!! p.s. someone gave me the following input in an other board: Anyway, the assertion comes from the thread_specific_ptr machinery. It means that something registered a thread-exit handler but it wasn't called. This might happen if, for example, you use a thread_specific_ptr from a thread that wasn't created with boost::threads. andreas

    M N 2 Replies Last reply
    0
    • A andreas schaerer

      Hy there! i have a hughe problem in my company. i have a quite complex application (distributed, corba, mulithreaded, Boost, QT 3.3) and after closing the program (int closeevent() pApp->exit()) the program closes but after ca 5 sec. there comes an ASSERTION attached_thread_count == 0 in tss_hooks.cpp the code in boost looks like that: attached_threadcount == 0 in tss_hooks.cpp. the code there looks like this: it is in on_process_exit().. catch( ... ) { boost::call_once(init_threadmon_mutex, once_init_threadmon_mutex); boost::mutex::scoped_lock lock(*threadmon_mutex); BOOST_ASSERT(attached_thread_count == 0); return -1; even with the help of some c++ gurus and DevPartnerStudio we could not find the problem. actually it isnt that annoying because only at exit it happens. but we cant deliver it to the customer like that. does enyone has an idea what to do against it, even a trick to just dont show the assertion? unfortunately i cant make a release-version for different reasons. ideas? suggestions?? thanx for any input!! p.s. someone gave me the following input in an other board: Anyway, the assertion comes from the thread_specific_ptr machinery. It means that something registered a thread-exit handler but it wasn't called. This might happen if, for example, you use a thread_specific_ptr from a thread that wasn't created with boost::threads. andreas

      M Offline
      M Offline
      Maxwell Chen
      wrote on last edited by
      #2

      The problem isn't the ASSERT but what thread is not terminated. It's the 1st priority to check which thread and what line in the thread is still busy when the exit signal has been fired. And why does it enter the catch block?! What throws?

      Maxwell Chen

      1 Reply Last reply
      0
      • A andreas schaerer

        Hy there! i have a hughe problem in my company. i have a quite complex application (distributed, corba, mulithreaded, Boost, QT 3.3) and after closing the program (int closeevent() pApp->exit()) the program closes but after ca 5 sec. there comes an ASSERTION attached_thread_count == 0 in tss_hooks.cpp the code in boost looks like that: attached_threadcount == 0 in tss_hooks.cpp. the code there looks like this: it is in on_process_exit().. catch( ... ) { boost::call_once(init_threadmon_mutex, once_init_threadmon_mutex); boost::mutex::scoped_lock lock(*threadmon_mutex); BOOST_ASSERT(attached_thread_count == 0); return -1; even with the help of some c++ gurus and DevPartnerStudio we could not find the problem. actually it isnt that annoying because only at exit it happens. but we cant deliver it to the customer like that. does enyone has an idea what to do against it, even a trick to just dont show the assertion? unfortunately i cant make a release-version for different reasons. ideas? suggestions?? thanx for any input!! p.s. someone gave me the following input in an other board: Anyway, the assertion comes from the thread_specific_ptr machinery. It means that something registered a thread-exit handler but it wasn't called. This might happen if, for example, you use a thread_specific_ptr from a thread that wasn't created with boost::threads. andreas

        N Offline
        N Offline
        Nemanja Trifunovic
        wrote on last edited by
        #3

        andreas.schaerer wrote:

        even a trick to just dont show the assertion?

        abort[^] should do the trick, but I would ask the question on a Boost mailing list to properly fix the problem.

        Programming Blog utf8-cpp

        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