Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation

Search the Forums
See All Topics
Open CASCADEShowroomGet it!Developer CornerSupport and ProductsAbout us
Technical overview
Areas of use
Shape factory
Shape gallery
What's new
System requirements
Download Center
Public license
Getting started
Open Source community
Training and e-learning
A-la Carte Support
Value-added software
Complementary Components
Customer Corner
Company Profile
Marketing Materials
Contact Us
Home / Developer Corner / Forums / Installation and building / OCC 6.3 WOK produces garbage

OCC 6.3 WOK produces garbage

OCC 6.3 WOK produces garbage
Torsten Sadowski 2009/01/20 13:18

I had the problem that WOK from OpenCASCADE6.3.0 did not work for me. Luckily someone else fixed it for the Debian packages. I just don't know if it has been reported upstream as there was no mention in the forum.

P.S. Special thanks to Denis Barbier for fixing

Fix WOKStep_Extract::Execute

This step did put garbage into generated file, because a pointer was used
after it has been freed.

diff --git a/ros/src/CPPExt/CPPExt.cxx b/ros/src/CPPExt/CPPExt.cxx
index 4d96c47..a651607 100644
--- a/ros/src/CPPExt/CPPExt.cxx
+++ b/ros/src/CPPExt/CPPExt.cxx
@@ -397,7 +397,8 @@ void CPP_BuildMethod(const Handle(MS_MetaSchema)& aMeta,
const Handle(TCollection_HAsciiString)& aTypeName=retType->TypeName();
pTypeName=(char *)aTypeName->ToCString();
- pTypeRet=(char *)CPP_BuildType(aMeta,aTypeName)->ToCString();
+ const Handle(TCollection_HAsciiString)& aTypeRet=CPP_BuildType(aMeta,aTypeName);
+ pTypeRet=(char *)aTypeRet->ToCString();
//modified by NIZNHY-PKV Mon May 5 15:10:12 2008f
if (m->IsPtrReturn()) {
diff --git a/ros/src/WOKUnix/WOKUnix_Process.cxx b/ros/src/WOKUnix/WOKUnix_Process.cxx
index dd6caf6..fa649c7 100644
--- a/ros/src/WOKUnix/WOKUnix_Process.cxx
+++ b/ros/src/WOKUnix/WOKUnix_Process.cxx
@@ -373,6 +373,6 @@ void WOKUnix_Process::Kill()
void WOKUnix_Process::Destroy()
- delete myargv;
+ delete [] myargv;
Latest news
  • New features to enhance the development process
  • Open CASCADE Technology 6.7.1 is available for download!
  • Open CASCADE Technology 6.7.0 is available for download!

  • © OPEN CASCADE 2000 - 2014  |  Search  |  Contacts   |  Site map