MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0030875Community[OCCT] OCCT:Foundation Classespublic2019-08-07 15:362019-08-24 09:51
Reporterdrazmyslovich 
Assigned Toabv 
PrioritynormalSeverityminor 
StatusfeedbackResolutionopen 
PlatformWindowsOSVC++ 2015OS Version64 bit
Product Version[OCCT] 7.4.0* 
Target Version[OCCT] 7.4.0*Fixed in Version 
Summary0030875: Foundation Classes - BSplCLib crashes in case of infinite upper knot
DescriptionBSplCLib crashes in case of infinite upper knot
Steps To ReproduceN/A
TagsNo tags attached.
Test case number
Attached Files

- Relationships
related to 0026308closedbugmaster Community Segmentation fault in BSplCLib::LocateParameter 
related to 0025602assignedgka Open CASCADE Data Exchange - It is important for IGES and STEP file format to add check, if wrong data are read from the file 

-  Notes
(0086068)
git (administrator)
2019-08-07 15:37

Branch CR30875 has been created by drazmyslovich.

SHA-1: be00a0482ba0bb382f27dae7afee660cbe4219a5


Detailed log of new commits:

Author: drazmyslovich
Date: Wed Aug 7 14:35:20 2019 +0200

    0030875: BSplCLib - check if an upper know is infinite
(0086069)
drazmyslovich (developer)
2019-08-07 15:38

The changes are submitted for review
(0086076)
kgv (developer)
2019-08-07 19:54
edited on: 2019-08-07 19:54

+template<typename T> bool myisfinite(T arg)
+{
+  return arg == arg && arg != std::numeric_limits<T>::infinity() && arg != -std::numeric_limits<T>::infinity();

+}

Looks like function actually checks IsNotInfinite(), isn't it?

Do you have some test data for reproducing the issue?
Maybe it contains also NaNs?

(0086078)
drazmyslovich (developer)
2019-08-07 20:29

Dear kgv,

unfortunately, I have no test data for it.

Yes, NaNs are also considered in this case. So, it's basically std::isfinite, which is a part of C++11.

Regards,
Dima
(0086079)
kgv (developer)
2019-08-07 20:47

Ah, I have misread the name "myisfinite"...

> So, it's basically std::isfinite, which is a part of C++11.
The better place for this method is IsFinite( or IsRealFinite) in Standard_Real.hxx.
(0086182)
abv (manager)
2019-08-12 13:49

Hello Dmitry,

Can you please provide more details on why you need to work with such ill-formed BSplines, and whether you expect other algorithms to deal with them gracefully?

Was this infinite knot encoded for purpose or due to error?
If this is error, perhaps it is quite reasonable and expected that LocateParameter() triggers signal.

Do you expect that protecting single function LocateParameter will be sufficient for OCCT to deal safely with such b-splines?

Andrey
(0086262)
drazmyslovich (developer)
2019-08-15 14:11

Hello Andrey,

I have a similar situation as in the related ticket 25602 - the illformed bspline comes from step file in my case. LocateParameter function was in my case a milestone, which enabled OCCT library to proceed working with the whole model instead of producing some useless output values. Also, I would like to point out, that considering of upper knot during epsilon calculation was introduced recently in the context of 0026308...

Regards,
Dima

- Issue History
Date Modified Username Field Change
2019-08-07 15:36 drazmyslovich New Issue
2019-08-07 15:36 drazmyslovich Assigned To => abv
2019-08-07 15:36 drazmyslovich Assigned To abv => drazmyslovich
2019-08-07 15:37 git Note Added: 0086068
2019-08-07 15:38 drazmyslovich Note Added: 0086069
2019-08-07 15:38 drazmyslovich Assigned To drazmyslovich => abv
2019-08-07 15:38 drazmyslovich Status new => resolved
2019-08-07 15:38 drazmyslovich Steps to Reproduce Updated View Revisions
2019-08-07 19:54 kgv Note Added: 0086076
2019-08-07 19:54 kgv Note Edited: 0086076 View Revisions
2019-08-07 19:54 kgv Note Edited: 0086076 View Revisions
2019-08-07 20:29 drazmyslovich Note Added: 0086078
2019-08-07 20:47 kgv Note Added: 0086079
2019-08-12 13:49 abv Note Added: 0086182
2019-08-12 13:49 abv Assigned To abv => drazmyslovich
2019-08-12 13:49 abv Status resolved => feedback
2019-08-13 12:57 kgv Relationship added related to 0025602
2019-08-15 14:11 drazmyslovich Note Added: 0086262
2019-08-15 14:11 drazmyslovich Assigned To drazmyslovich => abv
2019-08-16 10:53 kgv Summary BSplCLib crashes in case of infinite upper knot => Foundation Classes - BSplCLib crashes in case of infinite upper knot
2019-08-24 09:51 abv Relationship added related to 0026308


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker