[TRNSYS-users] problem using plotter : Type65

David Bradley bradley at tess-inc.com
Fri Jul 23 08:00:23 PDT 2010


*Rémi,
   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.
Best,
  David

*
On 7/23/2010 08:19, keilholz, werner wrote:
>
> Rémi,
>
> 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).
>
> 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 J
>
> Werner
>
> *De :* PERRIER Rémi 226004 [mailto:remi.perrier at cea.fr]
> *Envoyé :* vendredi 23 juillet 2010 14:59
> *À :* keilholz, werner; trnsys-users at cae.wisc.edu
> *Objet :* RE: [TRNSYS-users] problem using plotter : Type65
>
> 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.
>
> 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.
>
> 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?
>
> Thanks a lot,
>
> *Rémi PERRIER*
>
> ***************************************
>
> Hi Rémi,
>
> This sounds like your component corrupted memory that type 65 is 
> trying to use.
>
> 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.
>
> 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.
>
> 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, ...).
>
> 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).
>
> Finally, if your C++ component uses graphical elements via MFC, there 
> might be a problem handling state ( AFX_MANAGE_STATE, 
> http://msdn.microsoft.com/en-us/library/ba9d5yh5(VS.80).aspx 
> <http://msdn.microsoft.com/en-us/library/ba9d5yh5%28VS.80%29.aspx> ).
>
> Good luck,
>
> Werner
>
> *De :* PERRIER Rémi 226004 [mailto:remi.perrier at cea.fr]
> *Envoyé :* vendredi 23 juillet 2010 12:31
> *À :* trnsys-users at cae.wisc.edu
> *Objet :* [TRNSYS-users] problem using plotter : Type65
>
> Hi everybody,
>
> 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.
>
> I use global variables to stock my data so there may be a problem with 
> the allocated memory...
>
> Thanks for your help.
>
> *Rémi PERRIER*
>
> **
>
> *CEA INES***
>
> Laboratoire DTS / LETh
>
> Bâtiment PUMA 3, P112
>
> BP 332 - 50, avenue du Lac Léman - 73377 Le Bourget du Lac  FRANCE
>
> Mobile : +33 (0)6 76 95 91 86
>
> Email : remi.perrier at cea.fr <mailto:remi.perrier at cea.fr>
>
>
> _______________________________________________
> TRNSYS-users mailing list
> TRNSYS-users at cae.wisc.edu
> https://www-old.cae.wisc.edu/mailman/listinfo/trnsys-users
>    

-- 
***************************
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
bradley at tess-inc.com

http://www.tess-inc.com
http://www.trnsys.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20100723/48fd1cdc/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 2236 bytes
Desc: not available
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20100723/48fd1cdc/attachment-0001.jpeg>


More information about the TRNSYS-users mailing list