MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000287JANAFeature Requestpublic2012-09-24 07:052012-09-24 07:48
Reporterdavidl 
Assigned Todavidl 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Summary0000287: Add catch for std::exception to JFactory::Get
DescriptionThis comes from Paul. Here is the original e-mail:

In JFactory<T>::Get(vector<const T*> &d), could you please add catch statements for "std" exceptions (and set the busy flag to zero there too!). If nothing else it helps me track down where std::bad_alloc is thrown from by looking at the factory call stack.

Also, and this may be a bad idea, but maybe if the framework could call JApplication::RootUnLock() (and any other unlocks) when an exception was thrown, it would help trying to recover from them.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0000441)
davidl (administrator)
2012-09-24 07:45

Modified the catch statements in JFactory.h to catch std::exception instead. Since JException inherits from std::exception, it will be caught as well.

Committed in revision 1053. This will appear in JANA 0.6.6
(0000442)
davidl (administrator)
2012-09-24 07:48

We cannot unlock all mutexes in the catch block because we don't know if they are locked or who holds them and most importantly, if they will be unlocked after we return. Unlocking a mutex you do not own is "undefined" according to the pthreads documentation. Unlocking twice and unlocking an un-locked or un-owned mutex would all lead to undefined behavior.

- Issue History
Date Modified Username Field Change
2012-09-24 07:05 davidl New Issue
2012-09-24 07:45 davidl Note Added: 0000441
2012-09-24 07:45 davidl Status new => resolved
2012-09-24 07:45 davidl Resolution open => fixed
2012-09-24 07:45 davidl Assigned To => davidl
2012-09-24 07:48 davidl Note Added: 0000442


Copyright © 2000 - 2024 MantisBT Team
Powered by Mantis Bugtracker