mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-03 17:56:21 +03:00
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
71 lines
1.3 KiB
Plaintext
71 lines
1.3 KiB
Plaintext
pload OCAF
|
|
|
|
set BugNumber OCC24164
|
|
if { [info exists imagedir] == 0 } {
|
|
set imagedir .
|
|
}
|
|
|
|
#1 open new document
|
|
NewDocument D BinOcaf
|
|
UndoLimit D 10 0 0
|
|
|
|
#2 define set of labels
|
|
NewCommand D
|
|
set Lab1 [Label D 0:1:1]
|
|
set Lab2 [Label D 0:1:2]
|
|
set Lab3 [Label D 0:1:3]
|
|
set Lab4 [Label D 0:1:4]
|
|
set Lab5 [Label D 0:1:5]
|
|
set Lab6 [Label D 0:1:6]
|
|
|
|
#3 set references
|
|
SetRefArray D $Lab1 1 2 $Lab2 $Lab1
|
|
SetRefArray D $Lab2 1 2 $Lab3 $Lab4
|
|
SetRefArray D $Lab3 1 1 $Lab1
|
|
|
|
#4 set additional references
|
|
NewCommand D
|
|
SetRefArray D $Lab4 1 2 $Lab5 $Lab1
|
|
SetRefArray D $Lab5 1 1 $Lab6
|
|
SetRefArray D $Lab6 1 2 $Lab3 $Lab4
|
|
|
|
NewCommand D
|
|
|
|
#5 check references
|
|
GetRefArray D $Lab1
|
|
GetRefArray D $Lab2
|
|
GetRefArray D $Lab3
|
|
GetRefArray D $Lab4
|
|
GetRefArray D $Lab5
|
|
GetRefArray D $Lab6
|
|
|
|
#6 save the document
|
|
set aTmpFile ${imagedir}/${casename}.cbf
|
|
SaveAs D $aTmpFile
|
|
|
|
#7 close the document
|
|
set catch_status 0
|
|
if { [catch {Close D} catch_result] } {
|
|
set catch_status 1
|
|
}
|
|
if { ${catch_status} != 0 } {
|
|
puts "Faulty ${BugNumber}"
|
|
} else {
|
|
puts "OK ${BugNumber}"
|
|
}
|
|
|
|
#8 reopen just saved document with the same name
|
|
Open $aTmpFile D
|
|
file delete -force $aTmpFile
|
|
|
|
#9 close the document
|
|
if { [catch {Close D} catch_result] } {
|
|
set catch_status 1
|
|
}
|
|
|
|
if { ${catch_status} != 0 } {
|
|
puts "Faulty ${BugNumber}"
|
|
} else {
|
|
puts "OK ${BugNumber}"
|
|
}
|