Why do I receive a segmentation violation when using the GET_PARAM function on my masked block in Simulink 6.2 (R14SP2)?

1 view (last 30 days)
I have a masked block in my custom library. When using the following commands:
find_system('LIBRARY_NAME','LookUnderMasks','on','FollowLinks','on','Mask','on');
get_param('MASKED_BLOCK_NAME','ObjectParameters')
I receive the following segmentation violation:
------------------------------------------------------------------------
Segmentation violation detected at Wed Mar 16 11:43:08 2005
------------------------------------------------------------------------
Configuration:
MATLAB Version: 7.0.4.365 (R14) Service Pack 2
MATLAB License: unknown
Operating System: Microsoft Windows XP
Window System: Version 5.1 (Build 2600: Service Pack 2)
Processor ID: x86 Family 15 Model 2 Stepping 9, GenuineIntel
Virtual Machine: Java 1.5.0 with Sun Microsystems Inc. Java HotSpot(TM) Client VM
(mixed mode, sharing)
Default Charset: ibm-5348_P100-1997
Register State:
EAX = 00000002 EBX = 0889d860
ECX = 083f83f0 EDX = 023b3dc0
ESI = 00000002 EDI = 01325c38
EBP = 00cddbb0 ESP = 00cddbac
EIP = 784629db FLG = 00010202
Stack Trace:
[0] libmx.dll:_mxDestroyArray(2, 6, 0x79eaf650, 0) + 11 bytes
[1] simulink.dll:struct mxArray_tag * __cdecl get_simulink_object_parameters(void const *)(0x06478de0, 6, 0x032767cc, 0xffffffff) + 1254 bytes
[2] simulink.dll:_get_param(0x06478de0, 0x084164e0 "ObjectParameters", 0x00cddfec, 0x7a14b898) + 895 bytes
[3] simulink.dll:struct slErrMsg_tag * __cdecl get_block_object_param(void *,char const *,struct mxArray_tag * *)(0x06478de0, 0x084164e0 "ObjectParameters", 0x00cddfec, 0) + 751 bytes
[4] simulink.dll:struct slErrMsg_tag * __cdecl get_param_switchyard(void *,char const *,struct mxArray_tag * *)(0x084164e0 "ObjectParameters", 0x00cddfec, 1, 0x030dc500) + 164 bytes
[5] simulink.dll:_matl_get_param(1, 0x00cddfec, 0x06478de0, 0x00cde04c) + 593 bytes
<snip>

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
This bug has been fixed in Release 14 Service Pack 3 (R14SP3). For previous product releases, read below for any possible workarounds:
We have verified that there is a bug in Simulink 6.2 (R14SP2) in the way that the GET_PARAM function handles masked blocks when the mask and the block being masked have parameters that use the same variable names.
To work around this issue, avoid using variable names for mask parameters that are being used for parameters of the masked block.

More Answers (0)

Categories

Find more on Author Block Masks in Help Center and File Exchange

Products


Release

R14SP2

Community Treasure Hunt

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

Start Hunting!