PDA

View Full Version : Girder crashed every morning at about 7:30.



VSDomotics
August 20th, 2009, 01:45 AM
After installing Girder on a new computer, it crashes every morning at about 7.30 (between 7.00 and 7.30). At this time of the day however, no events are scheduled as far as I know. I looked in the logger (after continuing from crash-pop-up) and did not see any event or log messages with datestamps of the crashtime.
It also does not matter if Girder has been restarted the evening before or has been running since the last crash at about 7.30.

I saved a bug report (and attached it).
It was a new Girder install of version 5.0.9.543. The configuration stayed the same.

Who can possibly point me in the good direction for solving this?

Ron
August 20th, 2009, 11:59 AM
Some piece of lua code is running and doing something odd at that time (floating pointer error). Can you check your schedules?

VSDomotics
August 20th, 2009, 12:39 PM
Ron, there is nothing scheduled near that critical time. It happens between 7.00 am and 7.30 am. Not exactly at the same time.
Is there any change you can find out which lua code is causing this? Or even a hint in the right direction would be very welcome.
General spoken; what causes a floiting point error?

Ron
August 20th, 2009, 01:02 PM
a division by zero might do it. I've seen this one before. Do you run any custom scripts?

VSDomotics
August 20th, 2009, 02:05 PM
If you mean if I run LUA-scripts? Yes I do. My whole project is for 98% LUA code runining accros multiple threads. Not the easiest thing to debug.

Is there a way to find out where it happens? Or at least in what thread?

Rob H
August 20th, 2009, 02:52 PM
It's unlikely to be a division by zero in Lua code though. It's almost certainly going to be in a DLL based plugin

VSDomotics
August 20th, 2009, 03:22 PM
Found it!!!
Had nothing to do with the transition to a new PC but with a change in the code (used a filecompare utility to see the changes).

The buggy code was

SKWH.Mean=(SKWH.Mean*(SKWH.current/5-1)+SKWH.current)/(SKWH.current/5)

The SKWH.current variable is the current generated power of my solar panels. During Night 0 of course. In the morning when the sun comes up , this codes gets triggered by the first pulse of a KWh meter of the solar panel. And there it goes wrong.

Thanks Ron, your suggestion pointed me in the right direction.

Ron
August 20th, 2009, 03:27 PM
Great!! How are those solar panels working out for you? Do you get any sort of return on investment?

VSDomotics
August 20th, 2009, 03:55 PM
Ron, I only have 600Watt of solar power installed. Power I generate is consumed by ourselves. Any surplus is delivered back to the Power Company. I get the same price for this energy as what I pay for it (as long as I don't deliver more than 5000KWh per year.)

For new installations there is a new Government regulation. They guarantee a certain price for every delivered KWh. But still the ROI is still quite long (15 years).

Ron
August 20th, 2009, 04:30 PM
That's very cool. I should really have one to, we get plenty of sun here.

Rob H
August 20th, 2009, 05:31 PM
So why is a div by zero causing a problem?