Why do I receive a segmentation violation error when I run a Simulink model containing blocks from SimDriveline 1.0.1 (R14SP1)?

12 views (last 30 days)
I receive the following segmentation violation error when I run the simulation for a model containing the blocks from SimDriveline 1.0.1 (R14SP1). This error is reproducible specifically when I run a SimMechanics model first and then run a SimDriveline model:
<snip>
Register State:
EAX = 01f85005 EBX = 3337c200
ECX = 00000000 EDX = 33f93460
ESI = 3337c2f0 EDI = 33f938b0
EBP = 00cda7c4 ESP = 00cda7b8
EIP = 7a1c1ee4 FLG = 00010206
Stack Trace:
[0] simulink.dll:struct ListItem_tag * __cdecl visit(int,struct
Connection_tag const *,enum NodeStatus *,bool)(5, 0x3337c200, 0x33f938b0,
0) + 84 bytes
[1] simulink.dll:struct ListItem_tag * __cdecl visit(int,struct
Connection_tag const *,enum NodeStatus *,bool)(0, 0x3337c200, 0x33f938b0,
1) + 100 bytes
[2] simulink.dll:struct slErrMsg_tag * __cdecl
pmCountConnectedComponents(struct Connection_tag *,int,struct
slBlockDiagram_tag *,struct ListItem_tag * *,int *)(0x3337c200, 2,
0x2fffab10, 0x00cda84c) + 192 bytes
[3] simulink.dll:struct slErrMsg_tag * __cdecl compileEvent(struct
slBlockDiagram_tag *,struct PMBackDoor_tag *)(0x2fffab10, 0, 0, 0x2fffab10)
+ 231 bytes
<snip>

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
This bug has been fixed in Release 14 Service Pack 2 (R14SP2). For previous releases, please read below for any possible workarounds:
This problem has been fixed in SimDriveline 1.0.2 (R14SP2). If you are using a previous version, read the following:
We have verified that there is a bug in SimDriveline 1.0.1 (R14SP1) in the way that it handles memory after the simulation of a SimMechanics model. To work around this issue, download a revised version of the MDL-files. Here are the required steps:
1. Quit MATLAB
2. Rename the following MDL-files:
$MATLAB/toolbox/physmod/drive/drive/driveline.mdl
$MATLAB/toolbox/physmod/drive/drivedemos/drive_clutch_engage.mdl
$MATLAB/toolbox/physmod/drive/drivedemos/drive_full_car.mdl
$MATLAB/toolbox/physmod/drive/drivedemos/drive_hard_stop.mdl
$MATLAB/toolbox/physmod/drive/drivedemos/drive_sgear.mdl
$MATLAB/toolbox/physmod/drive/drivedemos/drive_simpson.mdl
$MATLAB/toolbox/physmod/drive/drivedemos/drive_spring.mdl
$MATLAB/toolbox/physmod/drive/drivedemos/drive_strans.mdl
$MATLAB/toolbox/physmod/drive/drivedemos/drive_vgear.mdl
(where $MATLAB is the MATLAB root directory on your machine, as returned by typing
matlabroot
at the MATLAB command prompt.)
Rename the files to filename.mdl.old
3. Download the attached files. Extract the archive file to the $MATLAB directory. The files should be placed in the same directories mentioned in step 2.
Place the fix_opaque.p file anywhere on the MATLAB path.
4. Restart MATLAB
5. After restarting MATLAB, issue the following command at the MATLAB prompt:
rehash toolboxcache
6. Run the command fix_opaque('<model_name>') in MATLAB on any model that you created before the change in this solution that is still displaying the problems described above. New models created with SimDriveline after replacing the files above will not exhibit the problems.

More Answers (0)

Categories

Find more on Simscape Driveline in Help Center and File Exchange

Products


Release

R14SP1

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!