View Issue Details

IDProjectCategoryView StatusLast Update
0033140Open CASCADEPRODUCTS:JT Importpublic2023-03-19 22:47
ReporterddzamaAssigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformWindowsOSVC++ 2022 
Product Version7.7.0 
Target Version7.7.0Fixed in Version7.7.0 
Summary0033140: Coding, Jt Import - Incrorrect layer's string conversion [REGRESSION since 0033125]
DescriptionThere is danger piece of code after changing type of `myActiveLayer` from
`TCollection_ExtendedString` to `TCollection_AsciiString`.

myActiveLayer = aLFProperty->Value;
myActiveLayer.Remove(1, aAFName.Length() + 1);

The problem is that the length of myActiveLayer could not
equal the length of `aLFProperty->Value`.
So, we should firstly trim `TCollection_ExtendedString` string,
and only after this casting it to `TCollection_AsciiString`.
Steps To ReproduceNot required
TagsNo tags attached.
Test case numberNot required

Activities

dpasukhi

2022-09-13 13:17

administrator   ~0111011

Last edited: 2022-09-13 13:17

@ddzama
somethins wrong with issue summery and with commit description
For example: 0032748
I thins the discription should be -> 033140: Coding, JtImport - Incrorrect layer's string conversion" or something equal.
I think we can not use a "033140: Coding, JtImport - Incrorrect layer's string conversion [REGRESSION]" but you can. The important thing - this thicket should be *Child of * ticket contains regression

ddzama

2022-09-15 01:02

developer   ~0111053

Last edited: 2022-09-15 01:03

@dpasukhi, i have fully recycled the commit title and commit message,
as BUG title / message. Please, see it.

dpasukhi

2022-09-23 13:00

administrator   ~0111207

Branch CR33140 was reviewed

smoskvin

2022-09-25 13:31

administrator   ~0111246

Combination -
OCCT branch : IR-2022-09-23
master SHA - changes and them, and you can discard any commits you make in this
b3284f3ba911e4d18477ff1788ace3d7201a8827
changes and them, and you can discard any commits you make in this
e0ceb716c70188b98130b1550914140d0502a6f9
Products branch : IR-2022-09-23 SHA - f1708bcb12b969ae6e6578ab6d46bb65e135a733
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:
Debian80-64:
OCCT
Total CPU difference: 18666.730000000585 / 18776.180000000597 [-0.58%]
Products
Total CPU difference: 11867.75000000012 / 11959.870000000119 [-0.77%]
Windows-64-VC14:
OCCT
Total CPU difference: 20851.8125 / 20857.796875 [-0.03%]
Products
Total CPU difference: 14092.984375 / 14084.640625 [+0.06%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

Related Changesets

occt-products: master fe27126e

2022-09-12 11:14:05

ddzama


Committer: smoskvin Details Diff
0033140: Coding, Jt Import - Incrorrect layer's string conversion [REGRESSION since 0033125].

There is danger piece of code after changing type of `myActiveLayer` from
`TCollection_ExtendedString` to `TCollection_AsciiString`.

myActiveLayer = aLFProperty->Value;
myActiveLayer.Remove(1, aAFName.Length() + 1);

The problem is that the length of myActiveLayer could not
equal the length of `aLFProperty->Value`.
So, we should firstly trim `TCollection_ExtendedString` string,
and only after this casting it to `TCollection_AsciiString`.
Affected Issues
0033140
mod - src/JTCAFControl/JTCAFControl_Reader.cxx Diff File

Issue History

Date Modified Username Field Change
2022-09-13 10:20 ddzama New Issue
2022-09-13 10:20 ddzama Assigned To => ddzama
2022-09-13 10:27 ddzama Assigned To ddzama => dpasukhi
2022-09-13 10:27 ddzama Status new => resolved
2022-09-13 10:27 ddzama Steps to Reproduce Updated
2022-09-13 13:17 dpasukhi Note Added: 0111011
2022-09-13 13:17 dpasukhi Note Edited: 0111011
2022-09-14 00:00 dpasukhi Assigned To dpasukhi => ddzama
2022-09-14 00:00 dpasukhi Status resolved => assigned
2022-09-15 00:58 ddzama Summary [Regression]: 0033125: Coding, TKXDEJT - fix msvc compiler error C2666 "number overloads have similar conversions" => Coding, TKXDEJT - type casting potentially may cause a problem [regression since 0033125]
2022-09-15 00:58 ddzama Description Updated
2022-09-15 01:02 ddzama Note Added: 0111053
2022-09-15 01:02 ddzama Note Edited: 0111053
2022-09-15 01:03 ddzama Note Edited: 0111053
2022-09-15 01:07 ddzama Assigned To ddzama => dpasukhi
2022-09-15 01:07 ddzama Status assigned => resolved
2022-09-15 01:09 ddzama Description Updated
2022-09-15 01:15 ddzama Summary Coding, TKXDEJT - type casting potentially may cause a problem [regression since 0033125] => Coding, Jt Import - Incrorrect layer's string conversion [REGRESSION since 0033125]
2022-09-15 01:17 ddzama Description Updated
2022-09-23 13:00 dpasukhi Assigned To dpasukhi => bugmaster
2022-09-23 13:00 dpasukhi Status resolved => reviewed
2022-09-23 13:00 dpasukhi Note Added: 0111207
2022-09-25 13:31 smoskvin Status reviewed => tested
2022-09-25 13:31 smoskvin Note Added: 0111246
2022-09-25 13:36 smoskvin Test case number => Not required
2022-09-25 13:38 smoskvin Changeset attached => occt-products master fe27126e
2022-09-25 13:38 ddzama Assigned To bugmaster => ddzama
2022-09-25 13:38 ddzama Status tested => verified
2022-09-25 13:38 ddzama Resolution open => fixed
2022-10-25 17:22 szy Assigned To ddzama => bugmaster
2022-11-09 16:53 szy Category PRODUCTS:Coding => PRODUCTS:JT Import
2023-03-19 22:47 vglukhik Status verified => closed
2023-03-19 22:47 vglukhik Fixed in Version => 7.7.0