Skip to content

Commit

Permalink
Testing - Removing direct DCAF loading #147
Browse files Browse the repository at this point in the history
DCAF require VISUALIZATION for correct work.
  In some scenario DRAWEXE can generate a dublicates of the
  internal static singletons. This means each dynamic library
  will have their own instance of the static singleton.
Update all direct library loading to use the DCAF plugin
  mechanism. This will ensure that the DCAF plugin is loaded
  only once and that the correct instance is used.
Originally issue is reproduced only Linux with dlopen with "RTLD_LAZY".
Can be resolved additionally adding "RTLD_LAZY | RTLD_GLOBAL" for dlopen
  • Loading branch information
dpasukhi committed Nov 5, 2024
1 parent e09563c commit ea86bfe
Show file tree
Hide file tree
Showing 77 changed files with 76 additions and 77 deletions.
2 changes: 1 addition & 1 deletion tests/bugs/caf/begin
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pload DCAF
pload OCAF

set subgroup caf

Expand Down
2 changes: 1 addition & 1 deletion tests/bugs/caf/bug24164_1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pload DCAF
pload OCAF

if { [info exists imagedir] == 0 } {
set imagedir .
Expand Down
2 changes: 1 addition & 1 deletion tests/bugs/caf/bug24164_2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pload DCAF
pload OCAF

set BugNumber OCC24164
if { [info exists imagedir] == 0 } {
Expand Down
2 changes: 1 addition & 1 deletion tests/bugs/caf/bug26229_1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ puts ""
# Add the possibility in OCAF to open/save a document from/to a stream object (BinOcaf format)
###################################################################################################

pload DCAF
pload OCAF

NewDocument D BinOcaf

Expand Down
2 changes: 1 addition & 1 deletion tests/bugs/caf/bug26229_2
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ puts ""
# Add the possibility in OCAF to open/save a document from/to a stream object (XmlOcaf format)
###################################################################################################

pload DCAF
pload OCAF

NewDocument D XmlOcaf

Expand Down
2 changes: 1 addition & 1 deletion tests/bugs/fclasses/bug23852
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ puts ""
# OSD_Path interprets unc paths incorrectly
#######################################################################

pload DCAF
pload OCAF

set BugNumber OCC23852

Expand Down
2 changes: 1 addition & 1 deletion tests/bugs/fclasses/bug984_1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ puts ""
## LDOM hangs-up attempting to read a file which contains a reference to "*dtd"file
####################################################

pload DCAF
pload OCAF
set BugNumber OCC984
cpulimit 60

Expand Down
2 changes: 1 addition & 1 deletion tests/bugs/iges/bug33327
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ puts "============"
puts "0033327: Data Exchange, IGES Import - SubfigureDef can't read string"
puts "============"

pload DCAF
pload OCAF

Close D -silent

Expand Down
2 changes: 1 addition & 1 deletion tests/bugs/modalg_4/bug8228
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ puts ""
set BugNumber OCC8228

catch {pload XDE}
catch {pload DCAF}
catch {pload OCAF}

# Create a new document and set UndoLimit

Expand Down
2 changes: 1 addition & 1 deletion tests/bugs/modalg_5/bug24849_1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ puts ""
## Crash on Pipe creation
###############################################

pload DCAF
pload OCAF

Open [locate_data_file bug24849_Study1_GEOM.cbf] D

Expand Down
2 changes: 1 addition & 1 deletion tests/bugs/modalg_5/bug24849_1_std
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ puts ""
## Crash on Pipe creation
###############################################

pload DCAF
pload OCAF

Open [locate_data_file bug24849_Study1_GEOM.sgd] D

Expand Down
2 changes: 1 addition & 1 deletion tests/bugs/modalg_5/bug24849_2
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ puts ""
## Crash on Pipe creation
###############################################

pload DCAF
pload OCAF

Open [locate_data_file bug24849_Study1_GEOM.cbf] D

Expand Down
2 changes: 1 addition & 1 deletion tests/bugs/modalg_5/bug24849_2_std
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ puts ""
## Crash on Pipe creation
###############################################

pload DCAF
pload OCAF

Open [locate_data_file bug24849_Study1_GEOM.sgd] D

Expand Down
2 changes: 1 addition & 1 deletion tests/bugs/modalg_6/bug26576_2
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ puts ""
## Wrong result obtained by intersection algorithm.
###############################

pload DCAF
pload OCAF

Open [locate_data_file bug26576_study1_new_geom.cbf] D

Expand Down
2 changes: 1 addition & 1 deletion tests/bugs/modalg_6/bug26588
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ puts ""
## SIGSEGV in BRepFeat_MakeDPrism::Perform()
###############################################

pload DCAF
pload OCAF

Open [locate_data_file bug26588_Study1_new_GEOM.cbf] D

Expand Down
2 changes: 1 addition & 1 deletion tests/bugs/moddata_1/bug22694
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ puts "==========="

set BugNumber OCC22694

catch {pload DCAF}
catch {pload OCAF}
catch {pload XDE}

# Create a new document and set UndoLimit
Expand Down
2 changes: 1 addition & 1 deletion tests/bugs/moddata_3/bug23733
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ puts ""
## PCurve for edge on face creation failure
###############################################

pload DCAF TOPTEST
pload OCAF TOPTEST

Open [locate_data_file bug_glue_edges_GEOM.cbf] D

Expand Down
2 changes: 1 addition & 1 deletion tests/bugs/moddata_3/bug23733_std
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ puts ""
## PCurve for edge on face creation failure
###############################################

pload DCAF TOPTEST
pload OCAF TOPTEST

Open [locate_data_file bug_glue_edges_GEOM.sgd] D

Expand Down
2 changes: 1 addition & 1 deletion tests/bugs/step/bug26342
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ puts ""
# No materials are read from STEP
#######################################################################

pload DCAF
pload OCAF

ReadStep D [locate_data_file OCC23251-dm1-oc-214.stp]

Expand Down
2 changes: 1 addition & 1 deletion tests/bugs/step/bug26657
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ puts "OCC26657: STEP OCAF writers should keep hierarchy and colors when saving n
puts "========"
puts ""

pload DCAF TOPTEST XDE XDEDRAW
pload OCAF TOPTEST XDE XDEDRAW
ReadStep D1 [locate_data_file bug26657.stp]

set aTmpFile ${imagedir}/${casename}_temp.stp
Expand Down
2 changes: 1 addition & 1 deletion tests/bugs/step/bug26925
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ puts "# 0026925: Data Exchange - Exceptions can be raised if assembly is empty"
puts "# ====================================================================="
puts ""

pload DCAF
pload OCAF
XNewDoc D
XNewShape D
box a 0 0 0 10 10 10
Expand Down
2 changes: 1 addition & 1 deletion tests/bugs/step/bug27313
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ puts ""
# Exception during WriteStep with PMI
##########################################################################

pload DCAF
pload OCAF

box b 10 10 10
explode b
Expand Down
2 changes: 1 addition & 1 deletion tests/bugs/step/bug28345
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ puts "# 0028345: Data Exchange - Reading STEP model using STEPCAF crashes"
puts "# ====================================================================="
puts ""

pload DCAF
pload OCAF
ReadStep D_1 [locate_data_file bug28345_30338.stp]

# Check imported names
Expand Down
2 changes: 1 addition & 1 deletion tests/bugs/step/bug29240
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ puts " 0029240: Data Exchange - Crash during reading STEP file"
puts "=========="
puts ""

pload DCAF
pload OCAF

ReadStep D_First [locate_data_file nist_ctc_05_asme1_ap242-1.stp]
XGetOneShape result D_First
Expand Down
2 changes: 1 addition & 1 deletion tests/bugs/step/bug29403
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ puts ""
param read.stepcaf.subshapes.name 1
param write.stepcaf.subshapes.name 1

pload DCAF
pload OCAF

ReadStep doc [locate_data_file bug29403_ECOR030312.stp]
set info1 [XStat doc]
Expand Down
2 changes: 1 addition & 1 deletion tests/bugs/step/bug30053
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ puts " 0030533: STEP read fails due to comment string "
puts "==================================================="
puts ""

pload DCAF
pload OCAF

ReadStep D [locate_data_file bug30053.stp]

Expand Down
2 changes: 1 addition & 1 deletion tests/bugs/step/bug30362
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ puts ""
# Writing dimensions with inches produced invalid file
#########################################################

pload DCAF
pload OCAF

ReadStep D [locate_data_file bug26689_nist_ctc_01_asme1_ap242.stp]
param write.step.unit 1
Expand Down
2 changes: 1 addition & 1 deletion tests/bugs/step/bug30533
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ puts " 0030533: Data Exchange - Crash during STEP import."
puts "==================================================="
puts ""

pload DCAF
pload OCAF

param read.stepcaf.subshapes.name On

Expand Down
2 changes: 1 addition & 1 deletion tests/bugs/step/bug30789
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ puts ""

# Load file

pload DCAF
pload OCAF
ReadStep D [locate_data_file bug30789.stp]

# Check several names came from problematic entities
Expand Down
2 changes: 1 addition & 1 deletion tests/bugs/step/bug30856
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ puts "========================"
puts "0030856: Wrong colors after STEP file import"
puts "========================"

pload DCAF
pload OCAF

ReadStep D1 [locate_data_file bug30856_SOT223-4P230_700X190L65X72.step]
WriteStep D1 $imagedir/${casename}.stp
Expand Down
2 changes: 1 addition & 1 deletion tests/bugs/step/bug31489
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ puts "0031489: Data Exchange - STEP Reader can't read a big file"
puts "===================================="
puts ""

pload DCAF
pload OCAF

# Read file
ReadStep D [locate_data_file bug31489.stp]
Expand Down
2 changes: 1 addition & 1 deletion tests/bugs/step/bug31568
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ puts "================================================================="
puts "0031568: Data Exchange - invalid model produced after STEP import"
puts "================================================================="

pload DCAF
pload OCAF

ReadStep D [locate_data_file bug31568_Konecranes_Sample_3D.stp]
set ref [XGetReferredShape D 0:1:1:41:11]
Expand Down
2 changes: 1 addition & 1 deletion tests/bugs/step/bug31675
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ puts "0031675: Er-ror opening the STEP-file"
puts "===================================="
puts ""

pload DCAF
pload OCAF

# Read file
ReadStep D [locate_data_file bug31675.stp]
Expand Down
2 changes: 1 addition & 1 deletion tests/bugs/step/bug31685_1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ puts " 0031685: Data Exchange, STEPCAFControl_Reader - NULL dereference on trans
puts "==================================================="
puts ""

pload DCAF
pload OCAF

# Read file
ReadStep D [locate_data_file bug31685_1.stp]
Expand Down
2 changes: 1 addition & 1 deletion tests/bugs/step/bug31685_2
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ puts " 0031685: Data Exchange, STEPCAFControl_Reader - NULL dereference on trans
puts "==================================================="
puts ""

pload DCAF
pload OCAF

# Read file
ReadStep D [locate_data_file bug31685_2.stp]
Expand Down
2 changes: 1 addition & 1 deletion tests/bugs/step/bug31685_3
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ puts " 0031685: Data Exchange, STEPCAFControl_Reader - NULL dereference on trans
puts "==================================================="
puts ""

pload DCAF
pload OCAF

# Read file
ReadStep D [locate_data_file bug31685_3.stp]
Expand Down
2 changes: 1 addition & 1 deletion tests/bugs/step/bug32310
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ puts "0032310: Data Exchange - Invalid STEP export/import of backslashes in name
puts "===================================="
puts ""

pload DCAF
pload OCAF
Close D -silent

XNewDoc D
Expand Down
2 changes: 1 addition & 1 deletion tests/bugs/step/bug32681
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ puts "0032681: Data Exchange - Missed dimension after STEP export"
puts "Check adding of dimension"
puts "=================================="

pload DCAF
pload OCAF

ReadStep D [locate_data_file bug32681.stp]
XGetOneShape s D
Expand Down
2 changes: 1 addition & 1 deletion tests/bugs/step/bug33331
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ puts "0033331: Data Exchange, Step Import - Unsupported Representation Items"
puts "===================================="
puts ""

pload DCAF
pload OCAF
catch {Close D}

param "read.stepcaf.subshapes.name" 1
Expand Down
2 changes: 1 addition & 1 deletion tests/bugs/xde/bug1669
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ puts ""

set BugNumber OCC1669

catch {pload DCAF}
catch {pload OCAF}

XNewDoc SA

Expand Down
2 changes: 1 addition & 1 deletion tests/bugs/xde/bug16740
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ puts ""
# XCAFDoc_ShapeMapTool is not restored
########################################

pload DCAF
pload OCAF

# Check the output file and delete it if necessary
set anOutputFile ${imagedir}/${casename}.xbf
Expand Down
2 changes: 1 addition & 1 deletion tests/bugs/xde/bug1747
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ puts ""

set BugNumber OCC1747

catch {pload DCAF}
catch {pload OCAF}

XNewDoc SA

Expand Down
2 changes: 1 addition & 1 deletion tests/bugs/xde/bug21046
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ puts ""
# XShow raises an exception
#######################################################################

pload DCAF
pload OCAF

set BugNumber OCC21046

Expand Down
2 changes: 1 addition & 1 deletion tests/bugs/xde/bug22776
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ puts ""
# XCAFPrs_AISObject does not support transparency
######################################################################################

catch {pload DCAF}
catch {pload OCAF}
pload QAcommands

NewDocument D BinXCAF
Expand Down
2 changes: 1 addition & 1 deletion tests/bugs/xde/bug22962
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ puts ""

set BugNumber OCC22962
set check_value 97
pload DCAF
pload OCAF

ReadStep D1 [locate_data_file OCC22962-dm1-oc-214.stp]
set dump_info [ XDumpDF D1 ]
Expand Down
Loading

0 comments on commit ea86bfe

Please sign in to comment.