MantisBT - Community
View Issue Details
0031690Community[OCCT] OCCT:Application Frameworkpublic2020-07-27 11:432020-07-27 12:13
BenjaminBihler 
akaftasev 
normalminor 
assignedopen 
ALL
 
[OCCT] 7.5.0* 
0031690: Application Framework - Default Arguments for Document Opening Lead to Segmentation Faults
With commit 6d8f9f4a49bbe113c47c9fff37d8984c5c516508 the signature of TDocStd_Application::Open(...) has changed. It takes now a handle to a Message_ProgressIndicator which is by default initialized to be a null handle.

I consider this a bad design, because BinLDrivers_DocumentRetrievalDriver::Read accesses this progress indicator without performing a null handle check. Old code that is not passing a valid progress indicator will therefore crash because of a segmentation fault.

My proposal would be to add null handle checks everywhere or remove the default argument.

(Please not that the same issue is most probably also true for the Save(...) methods.)
No tags attached.
child of 0031353verified bugmaster Open CASCADE TDocStd_Application does not have api to set progress indicator. 
Issue History
2020-07-27 11:43BenjaminBihlerNew Issue
2020-07-27 11:43BenjaminBihlerAssigned To => mpv
2020-07-27 11:43BenjaminBihlerRelationship addedchild of 0031353
2020-07-27 12:13msvNote Added: 0093371
2020-07-27 12:13msvAssigned Tompv => akaftasev
2020-07-27 12:13msvStatusnew => assigned

Notes
(0093371)
msv   
2020-07-27 12:13   
Andrey, please take care of this issue. I think it will be solved along with 25748.