NET.addAssembly given arithmetic overflow
Mostra commenti meno recenti
I am using a toolbox that makes use of a NET.addAssembly (developed by DHI namely to read in result files of their software). I am however not familiar with this NET.addAssembly programming and when I adjusted one of their files, I am getting the following error message when I try to read in the result file:
MATLAB:NET:CLRException:PropertyGet
Message: Arithmetic operation resulted in an overflow.
What can be causing this? The line that is called cannot lead to an overflow as it only contains 123 doubles as a result. I have also been careful to always close the file that I have opened with the close function provided (through an OnClean-up function).
First the problem only occurred after several calls to my function were made in the same matlab-session and it helped to close matlab and open again. But now I get this error message every time, even after restarting my computer!, so I cannot run my function any more.
What should I look for in my code?
13 Commenti
Ingrid
il 29 Ago 2014
Guillaume
il 29 Ago 2014
Can you show the portion of code that causes the error and which particular line results in the error?
Image Analyst
il 29 Ago 2014
What did DHI say when you asked them about their software?
Ingrid
il 4 Set 2014
Without you showing any bit of code, it's difficult to help you. Maybe show us the bit of code where the error occurs and since it seem to matters the source of the mex file.
Have a look at what properties(whicheverobjectiscausingtheerror) says when the error occurs. Maybe it'll give a clue.
Ingrid
il 4 Set 2014
Guillaume
il 4 Set 2014
Can you show the output of
superclasses(res11File.ItemInfo.Item(4))
and
methods(res11File.ItemInfo.Item(4))
From the name it's possible that it derives from System.Dynamic.DynamicObject and implements dynamic properties that for some reason are not always available.
Ingrid
il 4 Set 2014
Guillaume
il 4 Set 2014
You say that sometimes it is available and other times not as it is the same file that is being read in each time, but from your example it would appear that the property is always available for res11File.ItemInfo.Item(0) and never available for res11File.ItemInfo.Item(4) (for that particular file).
Can you confirm that's what you're seeing, or is it sometimes available for the same item and sometimes not?
Risposta accettata
Più risposte (1)
xu chen
il 26 Nov 2019
0 voti
I had the same problem as you. Excuse me, how did you solve it in the end? Thank you very much!
Categorie
Scopri di più su Get Started with Microsoft .NET in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!