Menu

Crash when raining

2014-04-15
2014-04-19
  • Mark Clayton

    Mark Clayton - 2014-04-15

    Hi,

    I have been seeing a crash when it begins raining. I ran owwnogui (version oww-0.86.5) through gdb and found that the crash is a divide by zero at line 146 of rainint.c. I added a band-aid by testing for zero before the division like such:

      if(0 != list->events[0].delta_t)
         if (list->events[0].delta_rain / list->events[0].delta_t > 2)
            list->events[0].delta_rain = 1;
    

    I didn't investigate where this code path was coming from.

    The crash only recently cropped up when I changed my installation. I used to run owwnogui on Linux box with the RS232 dongle. When the motherboard smoked (dang static electricity!), I moved my weather station to a BeagelBone Black with a USB dongle. The BBB only interfaces with the WS. A second instance of owwnogui is running on a "server" (Ubuntu 13.10 in a virtualbox on a laptop) which polls the BBB instance and uploads to WUnder.com. It is this second instance that kept crashing.

    If you need more info, I'll do what I can!

    Thanks,
    Mark Clayton

     

    Last edit: Mark Clayton 2014-04-15
    • Dr. Simon J. Melhuish

      So you're getting your data over the owwl protocol? I think I see where it's not updating delta_t. I've just done a fix to oww_trx.c on CVS:

      http://oww.cvs.sourceforge.net/viewvc/oww/oww/src/oww_trx.c

      Perhaps you could temporarily undo your fix and see if it's gone away with that change.

      This is completely untested (barely any rain here today), but at least it seems to build.

      Simon

       
      • Mark Clayton

        Mark Clayton - 2014-04-15

        I'm not sure how to answer the protocol question. Does owwnogui use owwl internally? Basically, the BBB instance of owwnogui is serving up port 8899 which my "server" based instance of owwnogui connects to. I gave this instance the ip address of the BBB and a poll interval of 10 seconds. So I'm using whatever protocol one owwnogui instance would use to talk to another owwnogui? FWIW, with the client I developed using oww_client-0.5.10, I'm not seeing this issue.

        I've reversed my change to rainint.c, compiled in your oww_trx.c file and am running it now. The chance of rain is diminishing over next next few hours so let's wait and see. Radar shows a band of sleet/freezing rain that just might hit here in an hour. I'll post more as it develops...

        Many Thanks,
        Mark

        On Apr 15, 2014, at 11:21, Dr. Simon J. Melhuish sjmelhuish@users.sf.net wrote:

        So you're getting your data over the owwl protocol? I think I see where it's not updating delta_t. I've just done a fix to oww_trx.c on CVS:

        http://oww.cvs.sourceforge.net/viewvc/oww/oww/src/oww_trx.c

        Perhaps you could temporarily undo your fix and see if it's gone away with that change.

        This is completely untested (barely any rain here today), but at least it seems to build.

        Simon

        Crash when raining

        Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/oww/discussion/296766/

        To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

         
        • Mark Clayton

          Mark Clayton - 2014-04-18

          Ok so we finally got some rain to test the change. Owwnogui did not crash so I would say this fix is working.

          I'll post back if anything develops.

          Thanks!

          Mark

          On Apr 15, 2014, at 12:49, Mark Clayton clayton256@users.sf.net wrote:

          I'm not sure how to answer the protocol question. Does owwnogui use owwl internally? Basically, the BBB instance of owwnogui is serving up port 8899 which my "server" based instance of owwnogui connects to. I gave this instance the ip address of the BBB and a poll interval of 10 seconds. So I'm using whatever protocol one owwnogui instance would use to talk to another owwnogui? FWIW, with the client I developed using oww_client-0.5.10, I'm not seeing this issue.

          I've reversed my change to rainint.c, compiled in your oww_trx.c file and am running it now. The chance of rain is diminishing over next next few hours so let's wait and see. Radar shows a band of sleet/freezing rain that just might hit here in an hour. I'll post more as it develops...

          Many Thanks,
          Mark

          On Apr 15, 2014, at 11:21, Dr. Simon J. Melhuish sjmelhuish@users.sf.net wrote:

          So you're getting your data over the owwl protocol? I think I see where it's not updating delta_t. I've just done a fix to oww_trx.c on CVS:

          http://oww.cvs.sourceforge.net/viewvc/oww/oww/src/oww_trx.c

          Perhaps you could temporarily undo your fix and see if it's gone away with that change.

          This is completely untested (barely any rain here today), but at least it seems to build.

          Simon

          Crash when raining

          Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/oww/discussion/296766/

          To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

          Crash when raining

          Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/oww/discussion/296766/

          To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

           
  • Dr. Simon J. Melhuish

    Thanks for the report Mark.

    That makes a couple of things in the queue for a release. I'll do a new package after Easter.

    Simon

     

Log in to post a comment.