[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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 ).

 

Good luck,

 

Werner

 

De : PERRIER Rémi 226004 [mailto:remi.perrier@cea.fr]
Envoyé : vendredi 23 juillet 2010 12:31
À : trnsys-users@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@cea.fr