MATLAB: Do I receive a Segmentation Violation when I try to use Multibyte characters in tlc files with Real Time Workshop 5.1 (R13SP1)

charactererrorjapanesemulitbytenewr13sp1realrtwsegmentationsimulinksimulink codertimetlcviolationworkshop

I am running Real-Time Workshop and I am trying to include multibyte Japanese characters in my .tlc file. But when I use the TLC command:
tlc -v mytest.tlc
I receive the following crash report:
----------
Segmentation violation detected at Wed Oct 15 20:03:35 2003
----------
Configuration:
MATLAB Version: 6.5.1.199709 (R13) Service Pack 1
Operating System: Microsoft Windows 2000
Window System:Version 5.0 (Build 2195: Service Pack 4)
Processor ID: x86 Family 6 Model 11 Stepping 1, GenuineIntel
Virtual Machine:Java 1.3.1_01 with Sun Microsystems Inc. Java HotSpot(TM) Client VM
(mixed mode)
Register State:
EAX = 00000000EBX = 00dfc424
ECX = 2d582e00EDX = 26deddd0
ESI = 2d582e00EDI = 00000003
EBP = 00dfc36cESP = 00dfc360
EIP = 1393b07fFLG = 00210206
Stack Trace:
[0] tlc_new.dll:0x1393b07f(0x26d7a7b8, 3, 0x00dfc43c, 0x26d7a7b8)
[1] tlc_new.dll:0x1393cd27(0x26d3fe20, 262, 0x139610e8 "execstring", 0)
[2] tlc_new.dll:0x1393d238(0x26d7a7b8, 262, 0x139610e8 "execstring", 0)
[3] tlc_new.dll:0x13958092(0x00dfc424 "%setcommandswitch "-ma"", 0x00dfc424 "%setcommandswitch "-ma"", 0, 0)
[4] tlc_new.dll:0x13957df0(0, 0x00dfc810, 2, 0x00dfc914)
[5] libmex.dll:_mexRunMexFile(0, 0x00dfc810, 2, 0x00dfc914) + 71 bytes
[6] m_interpreter.dll:void __cdecl inCallMexFunction(int,struct mxArray_tag * * const,int,struct mxArray_tag * * const,void (__cdecl*)(int,struct mxArray_tag * * const,int,struct mxArray_tag * * const),struct _mex_context *,struct mexfiles *)(0, 0x00dfc810, 2, 0x00dfc914) + 476 bytes
[7] m_interpreter.dll:void __cdecl inRunMexFile(int,struct mxArray_tag * * const,int,struct mxArray_tag * * const,struct mexfiles *)(0, 0x00dfc810, 2, 0x00dfc914) + 126 bytes
[snip]
Also, TLC gives a wrong result on multi-byte characters. The multibyte strings are being truncated.
I was able to use TLC without problem with Real-Time Workshop 5.0 (R13).

Best Answer

  • This bug has been fixed for Release 14 (R14). A bug in Release 13 Service Pack 1 caused wrong answers and possibly crashes to occur when multi-byte characters (Unicode) were included in TLC scripts. This has been fixed, restoring the correct handling found in R13. Also, insufficient memory allocation was causing the truncation of multi-byte strings. This behavior has been fixed.