<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<b><span
style="font-size: 10pt; font-family: "Arial","sans-serif"; color: black;"
lang="EN-GB">Rémi,<br>
I can't offer any more advice than what Werner has already mentioned.
Turning on the debug mode in TRNSYS does two things (mainly). Every
time control is returned from a component to the kernel, the outputs
that were set by the component are checked to make sure that none of
them have been set to "NaN" (not a number) through dividing by zero or
something and the kernel checks to make sure that the component did not
write any of its outputs outside the space that it reserved for itself.
For example, if the component reserved 10 outputs for itself and then
wrote to an 11th one. It surprises me a bit that turning on the debug
mode would change the behavior of the component and it does sound as
though your component is using some of the same memory space that
TRNExe.exe has reserved for the online plotter. Type65 collects that
data that is to be plotted and passes it back to the TRNExe.exe to do
the actual plotting.<br>
Best,<br>
David<br>
<br>
</span></b><br>
On 7/23/2010 08:19, keilholz, werner wrote:
<blockquote
cite="mid:E334C7DA1828844EBDEAB036EE93D62C0122BF11@MAUDE.cstb.local"
type="cite">
<meta http-equiv="Content-Type"
content="text/html; charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
span.EmailStyle18
{mso-style-type:personal;
font-family:"Arial","sans-serif";
color:windowtext;}
span.EmailStyle19
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle20
{mso-style-type:personal;
font-family:"Arial","sans-serif";
color:navy;}
span.EmailStyle21
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:595.3pt 841.9pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
-->
</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"
lang="EN-US">Rémi, <o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"
lang="EN-US">I wouldn’t go as far as saying that there is a bug in
type
65. It could be that your type does something that only screws up type
65 (and
no others).<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"
lang="EN-US">Type 65 has the particularity of opening a window, that’s
why I suggested to look into MFC-related problems, but it could be a
thousand
other things. That’s why the lives of us programmers are so much misery
and toil </span><span
style="font-size: 11pt; font-family: Wingdings; color: rgb(31, 73, 125);"
lang="EN-US">J</span><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"
lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"
lang="EN-US">Werner<o:p></o:p></span></p>
<div>
<div
style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0cm 0cm;">
<p class="MsoNormal"><b><span
style="font-size: 10pt; font-family: "Tahoma","sans-serif";"
lang="EN-US">De :</span></b><span
style="font-size: 10pt; font-family: "Tahoma","sans-serif";"
lang="EN-US"> PERRIER Rémi 226004
[<a class="moz-txt-link-freetext" href="mailto:remi.perrier@cea.fr">mailto:remi.perrier@cea.fr</a>] <br>
<b>Envoyé :</b> vendredi </span><span
style="font-size: 10pt; font-family: "Tahoma","sans-serif";">23
juillet 2010 14:59<br>
<b>À :</b> keilholz, werner; <a class="moz-txt-link-abbreviated" href="mailto:trnsys-users@cae.wisc.edu">trnsys-users@cae.wisc.edu</a><br>
<b>Objet :</b> RE: [TRNSYS-users] problem using plotter : Type65<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: "Arial","sans-serif"; color: navy;"
lang="EN-GB">It appears that simply turning on the “debug mode”
control card makes the bug disappear… Since this component is meant to
be
used by other users, I’d like to make it operational in any situation.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: "Arial","sans-serif"; color: navy;"
lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: "Arial","sans-serif"; color: navy;"
lang="EN-GB">It seems the stack is pointing to TREXE.EXE. There is no
problem
with any other component (I tried randomly some types), including the
printer.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: "Arial","sans-serif"; color: navy;"
lang="EN-GB">If I understood correctly your previous message, you mean
that the
problem is coming from the Type65 itself? And that Type65 can’t be used
with the type I developed?<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: "Arial","sans-serif"; color: navy;"
lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: "Arial","sans-serif"; color: navy;"
lang="EN-GB">Thanks a lot,<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: "Arial","sans-serif"; color: navy;"
lang="EN-GB"><o:p> </o:p></span></p>
<p style="margin: 0cm 0cm 0.0001pt;"><b><span
style="font-size: 10pt; font-family: "Arial","sans-serif"; color: black;"
lang="EN-GB">Rémi
PERRIER</span></b><span style="color: navy;" lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: "Arial","sans-serif"; color: navy;"
lang="EN-GB">***************************************<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: "Arial","sans-serif"; color: navy;"
lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: "Arial","sans-serif"; color: navy;"
lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);">Hi
Rémi,<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"
lang="EN-US">This sounds like your component corrupted memory that
type 65 is
trying to use. <o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"
lang="EN-US">Did you start TRNEXE.EXE from within your C++ project?
Then you
should get a call stack and be able to identify where the problem is
caused.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"
lang="EN-US">If it is inside TRNEXE, you can open then TRNDLL
(FORTRAN)
workspace and run your project from there – in case it is due to some
weird behavior inside TRNDLL, it shows you what goes wrong on the
FORTRAN side.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"
lang="EN-US">If you get the stack pointing to something in TRNEXE.EXE
both
times, you’re in trouble (then it is linked to the Online component
itself). In that case, I would try to reproduce the problem with
another
component (plain printer, …).<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"
lang="EN-US">Be sure to have debugging on everywhere while hunting for
the
bug: C++ workspace, TRNDLL workspace, Deck (NAN_CHECK 1,
OVERWRITE_CHECK 1 =
Var 9 ‘debug mode’ = true in Simulation Studio).<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"
lang="EN-US">Finally, if your C++ component uses graphical elements
via MFC,
there might be a problem handling state ( AFX_MANAGE_STATE, </span><a
moz-do-not-send="true"
href="http://msdn.microsoft.com/en-us/library/ba9d5yh5%28VS.80%29.aspx"><span
lang="EN-US">http://msdn.microsoft.com/en-us/library/ba9d5yh5(VS.80).aspx</span></a><span
lang="EN-US"> ).</span><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"
lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"
lang="EN-US">Good luck,<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"
lang="EN-US">Werner<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"
lang="EN-US"><o:p> </o:p></span></p>
<div>
<div
style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0cm 0cm;">
<p class="MsoNormal"><b><span
style="font-size: 10pt; font-family: "Tahoma","sans-serif";">De :</span></b><span
style="font-size: 10pt; font-family: "Tahoma","sans-serif";"> PERRIER
Rémi 226004
[<a class="moz-txt-link-freetext" href="mailto:remi.perrier@cea.fr">mailto:remi.perrier@cea.fr</a>] <br>
<b>Envoyé :</b> vendredi 23 juillet 2010 12:31<br>
<b>À :</b> <a class="moz-txt-link-abbreviated" href="mailto:trnsys-users@cae.wisc.edu">trnsys-users@cae.wisc.edu</a><br>
<b>Objet :</b> [TRNSYS-users] problem using plotter : Type65<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: "Arial","sans-serif";">Hi
</span><span
style="font-size: 10pt; font-family: "Arial","sans-serif";"
lang="EN-US">everybody</span><span
style="font-size: 10pt; font-family: "Arial","sans-serif";">,<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: "Arial","sans-serif";"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: "Arial","sans-serif";"
lang="EN-GB">I
just developed a new component in C++. When I put a Type65 in my deck
and
launch the simulation I receive the “invalid floating point” error
message, even if Type65 is not linked to my component. Strange thing is
that if
I right click two times on the plotter (like “pause” and
“resume” the simulation) everything works correctly. I checked in
debug mode and with a printer, all variables and outputs are correct.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: "Arial","sans-serif";"
lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: "Arial","sans-serif";"
lang="EN-GB">I
use global variables to stock my data so there may be a problem with
the
allocated memory…<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: "Arial","sans-serif";"
lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: "Arial","sans-serif";"
lang="EN-GB">Thanks
for your help.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: "Arial","sans-serif";"
lang="EN-GB"><o:p> </o:p></span></p>
<p style="margin: 0cm 0cm 0.0001pt;"><b><span
style="font-size: 10pt; font-family: "Arial","sans-serif"; color: black;">Rémi
PERRIER</span></b><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: "Arial","sans-serif"; color: navy;"><o:p> </o:p></span></p>
<p style="margin: 0cm 0cm 0.0001pt;"><b><span
style="font-size: 10pt; font-family: "Arial","sans-serif"; color: black;"><img
id="_x0000_i1025" src="cid:part1.04090109.02070604@tess-inc.com"
width="130" border="0" height="47"></span></b><o:p></o:p></p>
<p style="margin: 0cm 0cm 0.0001pt;"><b><span
style="font-size: 10pt; font-family: "Arial","sans-serif"; color: black;">CEA INES</span></b><b><span
style="font-size: 10pt; font-family: "Arial","sans-serif"; color: navy;"><o:p></o:p></span></b></p>
<p style="margin: 0cm 0cm 0.0001pt;"><span
style="font-size: 9pt; font-family: "Arial","sans-serif"; color: rgb(255, 153, 0);">Laboratoire
DTS / LETh</span><o:p></o:p></p>
<p style="margin: 0cm 0cm 0.0001pt;"><span
style="font-size: 7.5pt; font-family: "Arial","sans-serif"; color: black;">Bâtiment
PUMA 3, P112</span><span
style="font-size: 10pt; font-family: "Arial","sans-serif"; color: navy;"><o:p></o:p></span></p>
<p style="margin: 0cm 0cm 0.0001pt;"><span
style="font-size: 7.5pt; font-family: "Arial","sans-serif"; color: black;">BP
332 - 50, avenue du Lac Léman
- 73377 Le Bourget du Lac FRANCE</span><o:p></o:p></p>
<p style="margin: 0cm 0cm 0.0001pt;"><span
style="font-size: 7.5pt; font-family: "Arial","sans-serif"; color: black;">Mobile
: +33 (0)6 76 95 91 86</span><span
style="font-size: 10pt; font-family: "Arial","sans-serif"; color: navy;"><o:p></o:p></span></p>
<p style="margin: 0cm 0cm 0.0001pt;"><span
style="font-size: 7.5pt; font-family: "Arial","sans-serif"; color: black;">Email
: </span><span
style="font-size: 7.5pt; font-family: "Arial","sans-serif"; color: navy;"><a
moz-do-not-send="true" href="mailto:remi.perrier@cea.fr">remi.perrier@cea.fr</a></span><o:p></o:p></p>
<p style="margin: 0cm 0cm 0.0001pt;"> <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
TRNSYS-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:TRNSYS-users@cae.wisc.edu">TRNSYS-users@cae.wisc.edu</a>
<a class="moz-txt-link-freetext" href="https://www-old.cae.wisc.edu/mailman/listinfo/trnsys-users">https://www-old.cae.wisc.edu/mailman/listinfo/trnsys-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
***************************
David BRADLEY
Principal
Thermal Energy Systems Specialists, LLC
22 North Carroll Street - suite 370
Madison, WI 53703 USA
P:+1.608.274.2577
F:+1.608.278.1475
<a class="moz-txt-link-abbreviated" href="mailto:bradley@tess-inc.com">bradley@tess-inc.com</a>
<a class="moz-txt-link-freetext" href="http://www.tess-inc.com">http://www.tess-inc.com</a>
<a class="moz-txt-link-freetext" href="http://www.trnsys.com">http://www.trnsys.com</a></pre>
</body>
</html>