View Issue Details

IDProjectCategoryView StatusLast Update
0033398CommunityOCCT:Modeling Algorithmspublic2023-08-08 14:47
ReporterLyndon Alcock Assigned Toakaftasev  
PrioritynormalSeveritycrash 
Status verifiedResolutionfixed 
PlatformWindowsOSVC++ 2022 
Product Version7.7.1 
Target Version7.7.3 
Summary0033398: Modeling Algorithms - ShapeUpgrade_UnifySameDomain throws exception on specific STEP model
DescriptionI have code that appears to throw error ```Unhandled exception at 0x00007FFAA0BFE468 (TKG2d.dll) in quad-remeshing-algorithm.exe: 0xC0000005: Access violation reading location 0x0000000000000000.``` along with this there should be a method on ShapeUpgrade_UnifySameDomain to check whether an operation is completed successfully.
Steps To ReproduceStep file in upload files, this is my code:
#include <iostream>
#include <fstream>
#include <ShapeUpgrade_UnifySameDomain.hxx>
#include <STEPControl_Reader.hxx>
#include <STEPControl_Writer.hxx>
#include <TopoDS.hxx>

int main()
{
    const char* inputPath = "ball-valve.step";
    const char* outputPath = "output.step";

    // Initialize the STEP reader
    STEPControl_Reader reader;
    if (reader.ReadFile(inputPath) != IFSelect_RetDone)
    {
        std::cout << "Error: cannot read file." << std::endl;
        return 1;
    }

    // Check the load status
    reader.PrintCheckLoad(true, IFSelect_ItemsByEntity);
    if (reader.TransferRoots() != reader.NbRootsForTransfer())
    {
        std::cout << "Error: roots transferred unsuccessfully." << std::endl;
        return 1;
    }

    // Get the shape from the reader
    TopoDS_Shape shape = reader.Shape();

    // Perform "unify domains" algorithm
    ShapeUpgrade_UnifySameDomain unifyDomains(shape);
    unifyDomains.Build();
    TopoDS_Shape unifiedShape = unifyDomains.Shape();

    // Write the unified shape to STEP file
    STEPControl_Writer writer;
    writer.Transfer(unifiedShape, STEPControl_AsIs);
    if (!writer.Write(outputPath))
    {
        std::cout << "Error: failed to write output file." << std::endl;
        return 1;
    }

    return 0;
}
TagsNo tags attached.
Test case number

Attached Files

  • ball-valve.step (1,421,303 bytes)

Activities

Lyndon Alcock

2023-05-25 11:48

reporter   ~0113586

ball-valve.step (1,421,303 bytes)

git

2023-08-01 17:05

administrator   ~0113821

Branch CR33398 has been created by andrey.kaftasev_159541.

SHA-1: 2db2ab6270d17c126e04f88c8c3142fe16d40d3b


Detailed log of new commits:

Author: akaftasev
Date: Tue Aug 1 15:05:10 2023 +0100

    0033398: Modeling Algorithms - ShapeUpgrade_UnifySameDomain throws exception on specific STEP model
    
    Added additional checking in static method FindCoordBounds to avoid processing null pcurves

akaftasev

2023-08-02 11:23

developer   ~0113845

Please review branch:
OCCT - CR33398

Results of testing:
http://jenkins-test-10.nnov.opencascade.com/view/CR33398-master-akaftasev/view/COMPARE/

dpasukhi

2023-08-02 12:09

administrator   ~0113848

Dear bugmaster,
please integrate:
OCCT: CR33398
PROD: no

jokwajeb

2023-08-08 13:58

administrator   ~0113929

Combination -
OCCT branch : SHA - IR-2023-08-04
Products branch : SHA - master
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Ubuntu2004-64:
OCCT
Total CPU difference: 18344.600000000195 / 18390.260000000217 [-0.25%]
Products
Total CPU difference: 12102.810000000003 / 12161.439999999999 [-0.48%]
Windows-64-VC142:
OCCT
Total CPU difference: 20332.1875 / 20298.859375 [+0.16%]
Products
Total CPU difference: 14548.515625 / 14604.578125 [-0.38%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

git

2023-08-08 14:47

administrator   ~0113939

Branch CR33398 has been deleted by mnt.

SHA-1: 2db2ab6270d17c126e04f88c8c3142fe16d40d3b

Related Changesets

occt: master 96d1fe2b

2023-08-01 17:05:10

akaftasev


Committer: jokwajeb Details Diff
0033398: Modeling Algorithms - ShapeUpgrade_UnifySameDomain throws exception on specific STEP model

Added additional checking in static method FindCoordBounds to avoid processing null pcurves
Affected Issues
0033398
mod - src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx Diff File
add - tests/bugs/heal/bug33398 Diff File

Issue History

Date Modified Username Field Change
2023-05-25 11:48 Lyndon Alcock New Issue
2023-05-25 11:48 Lyndon Alcock Assigned To => akaftasev
2023-05-25 11:48 Lyndon Alcock Note Added: 0113586
2023-05-25 11:48 Lyndon Alcock File Added: ball-valve.step
2023-05-25 19:14 dpasukhi Category PRODUCTS:Mesh Tools => OCCT:Modeling Algorithms
2023-05-25 19:14 dpasukhi Summary ShapeUpgrade_UnifySameDomain throws exception on specific STEP model => Modeling Algorithms - ShapeUpgrade_UnifySameDomain throws exception on specific STEP model
2023-05-25 20:15 dpasukhi Steps to Reproduce Updated
2023-08-01 17:05 git Note Added: 0113821
2023-08-01 17:09 dpasukhi Target Version => 7.7.3
2023-08-02 11:23 akaftasev Assigned To akaftasev => dpasukhi
2023-08-02 11:23 akaftasev Status new => resolved
2023-08-02 11:23 akaftasev Note Added: 0113845
2023-08-02 12:09 dpasukhi Assigned To dpasukhi => bugmaster
2023-08-02 12:09 dpasukhi Status resolved => reviewed
2023-08-02 12:09 dpasukhi Note Added: 0113848
2023-08-08 13:58 jokwajeb Note Added: 0113929
2023-08-08 14:23 jokwajeb Changeset attached => occt master 96d1fe2b
2023-08-08 14:23 akaftasev Assigned To bugmaster => akaftasev
2023-08-08 14:23 akaftasev Status reviewed => verified
2023-08-08 14:23 akaftasev Resolution open => fixed
2023-08-08 14:47 git Note Added: 0113939