[TRNSYS-users] problem using plotter : Type65

keilholz, werner werner.keilholz at cstb.fr
Fri Jul 23 06:19:54 PDT 2010


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(VS.80).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

 

 

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


More information about the TRNSYS-users mailing list