[TRNSYS-users] Debugging own type with Microsoft Visual Studio 2010

Schreiner, Florian florian.schreiner2 at student.kit.edu
Wed Aug 7 04:06:58 PDT 2013


Dear TRNSYS Users,

I still have some problems with a new type that I have written and I don't really know how to solve them. 
Unfortunately I need this type pretty urgently for my diploma thesis.
  
The Simulation starts and proceeds to a certain simulation-time but then it stops and the whole “TRNExe.exe” 
gets stuck without any error message and chance to find the error. 
You even have to finish the “TRNExe.exe” in the Windows Task-Manager to be able to work again.
 
Therefore I have started to use the Microsoft Visual Studio 2010 Debugger to step through 
the code of my type and to be able to find possible errors. 
Assuming that the simulation gets stuck in my own code, I set a breakpoint at a simulation-time immediately 
before the error occurs and then step through the code lines. What happens is, that I can step to the end
of the code without finding any obvious error which could cause the problem. 

So I go on and step out of my type with button “F11” and a “CallTypes.f90” file opens in Visual Studio 2010. 
I also can step through the lines of this file and another file “Exec.f90” opens. 
In this file I can step till line 411 where a DO-loop is performed. The counter of this DO-loop starts with “1” 
and goes to a variable named “junits”. I guess it represents the number of units which are used in the simulation. 
And finally somewhere in this loop, it get stuck.

I don't really know what this DO-loop does exactly but I guess it calls all units in sequence and 
somewhere a problem occurs which crashes the whole simulation.  
I still assume that my own type is corrupted and causes the problem but 
I wonder why the simulation doesn't get stuck directly in the code of my type.

So I really hope that some TRNSYS-experts out there can help me and give me a hint 
where the problem could be or at least what this DO-loop does exactly.

Thanks in advance!

Best regards,
Florian


More information about the TRNSYS-users mailing list