View Issue Details

IDProjectCategoryView StatusLast Update
0030541Open CASCADEOCCT:DRAWpublic2019-09-25 22:17
Reporterkgv Assigned Tokgv  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version7.3.0 
Target Version7.4.0Fixed in Version7.4.0 
Summary0030541: Draw Harness - impossible disabling signals
DescriptionOSD::SetSignal() is called unconditionally at Draw Harness startup.
Although this improves application stability, it doesn't allow simply reproducing crashes of applications that doesn't setup OSD::SetSignal().

Hence, it is proposed adding some extra option like CSF_FPE or Draw Harness parameter disabling signals.
Alternatively, new function OSD::UnsetSignal() can be implemented to disarm signals (and extended dsetsignal syntax).
Steps To Reproducedsetsignal unset
TagsNo tags attached.
Test case number

Relationships

related to 0029979 closedbugmaster Community Data Exchange - Crash by reading STEP file 
related to 0026329 closedkgv Open CASCADE Restore floating point signals handling in DRAW 

Activities

abv

2019-09-13 13:36

manager   ~0087053

The feature has been implemented within #30775: OSD::SetSignal() has got an option to unset handler instead of setting it. Thus calling DRAW command "dsetsignal unset" you will now get the state of the application with no handlers set. Please review.

Note however that application built on Windows with default option /EHa will be able to catch exceptions in "catch(...)" statement even without application-defined handlers installed. Thus signal like access violation will not kill DRAW.

kgv

2019-09-13 13:41

developer   ~0087054

The main purpose is to be able reproducing user reports like 0029979 in Draw Harness, since by default access violations issues are handled as "normal" exceptions by Data Exchange algorithms, so that they are hidden from report (if do not dig deep inside).

Related Changesets

occt: master 44b80414

2019-06-17 15:42:36

abv


Committer: abv Details Diff
0030775: Foundation Classes - Preserve application-defined top-level exception filter

New overload for method OSD::SetSignal() is added accepting argument specifying how to set or unset handlers.
New enum OSD_SignalMode describes different modes of signal handlers setting used in extended version of OSD::SetSignal().
Method OSD::SignalMode() returns mode set by the last call to SetSignal().
Method OSD::IsFloatingSignalSet() is changed to return value based on actual floating point exception flags (rather than on variable set by previous call to SetSignal()).

Added new method OSD::SetThreadLocalSignal() intended to setup thread-specific handlers (e.g. _set_se_translator() on Windows) and FPE settings.
OSD_ThreadPool and Media_PlayerContext now use new method instead of OSD::SetSignal(), to avoid overriding global handlers.

dsetsignal syntax has been extended to support choice of signal handling mode.

DRAW command OCC30775 is added allowing to test signal handling in multithreaded process.
Affected Issues
0030541
mod - src/Draw/Draw_BasicCommands.cxx Diff File
mod - src/Media/Media_PlayerContext.cxx Diff File
mod - src/OSD/FILES Diff File
mod - src/OSD/OSD.hxx Diff File
mod - src/OSD/OSD_signal.cxx Diff File
add - src/OSD/OSD_SignalMode.hxx Diff File
mod - src/OSD/OSD_ThreadPool.cxx Diff File
mod - src/QABugs/QABugs_11.cxx Diff File
add - tests/bugs/fclasses/bug30775 Diff File

Issue History

Date Modified Username Field Change
2019-03-06 11:52 kgv New Issue
2019-03-06 11:52 kgv Assigned To => abv
2019-03-06 11:52 kgv Relationship added related to 0029979
2019-03-06 11:53 kgv Relationship added related to 0026329
2019-09-13 13:36 abv Note Added: 0087053
2019-09-13 13:36 abv Assigned To abv => kgv
2019-09-13 13:36 abv Status new => resolved
2019-09-13 13:36 abv Steps to Reproduce Updated
2019-09-13 13:41 kgv Note Added: 0087054
2019-09-13 13:41 kgv Status resolved => reviewed
2019-09-25 22:17 abv Status reviewed => verified
2019-09-25 22:17 abv Fixed in Version => 7.4.0
2019-09-25 22:17 abv Resolution open => fixed
2019-09-25 22:17 abv Changeset attached => occt master 44b80414