matPutVariable() -> matrix::se​rialize::W​rongSize at memory location

조회 수: 5 (최근 30일)
J VR
J VR 2015년 4월 14일
편집: Philip Borghesani 2015년 4월 14일
I'm using Microsoft Visual Studio 2012 . I copied ' matcreat.c ' (from Matlab examples), I compiled it (succesfully), and I tried to run it in debug mode.
At first, it seems to work correctly. It generates an output file 'mattest.mat' containing the variables 'GlobalDouble', 'LocalDouble' and 'Localstring'.
But when I look at the 'output window' in VS, I notice that there are problems while executing the matPutVariable() function :
_First-chance exception at 0x000007FEFD83940D in Project1.exe: Microsoft C++ exception: matrix::serialize::WrongSize at memory location 0x00000000002DED90.
First-chance exception at 0x000007FEFD83940D in Project1.exe: Microsoft C++ exception: matrix::serialize::WrongSize at memory location 0x00000000002DED90.
First-chance exception at 0x000007FEFD83940D in Project1.exe: Microsoft C++ exception: matrix::serialize::WrongSize at memory location 0x00000000002DEDA0.
First-chance exception at 0x000007FEFD83940D in Project1.exe: Microsoft C++ exception: matrix::serialize::WrongSize at memory location 0x00000000002DEDA0.
First-chance exception at 0x000007FEFD83940D in Project1.exe: Microsoft C++ exception: matrix::serialize::WrongSize at memory location 0x00000000002DEDA0.
First-chance exception at 0x000007FEFD83940D in Project1.exe: Microsoft C++ exception: matrix::serialize::WrongSize at memory location 0x00000000002DEDA0._
What is causing this, and more important : how can I fix it?
With kind regards.

답변 (1개)

Philip Borghesani
Philip Borghesani 2015년 4월 14일
편집: Philip Borghesani 2015년 4월 14일
First-chance exceptions are frequently normal. If you were to debug MATLAB you would see many thousand first chance exceptions. Matcreat has no try catch blocks and checks status returns so it is unlikely that this is an actual problem. Uncaught exceptions known as second-chance exceptions will cause program termination and an error message.
This looks normal to me. I compiled and ran matcreat.c with R2015a and saw 3 WrongSize first-chance exceptions, other MATLAB versions may have a different number of exceptions.

카테고리

Help CenterFile Exchange에서 C Shared Library Integration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by