Loading ...
Sorry, an error occurred while loading the content.

Re: XP screen refresh

Expand Messages
  • rod_bird001
    If Liberty were blinking every eight seconds I think we might have heard about that issue by now. So it seems the problem is unique to your installation. How
    Message 1 of 8 , Dec 8, 2009
    • 0 Attachment
      If Liberty were blinking every eight seconds I think we might have heard about that issue by now. So it seems the problem is unique to your installation. How about checking your display drivers, are they up to date? How much ram is in use? 99% or less? I'm still focused on the fact that the code runs without error on another machine.

      --- In libertybasic@yahoogroups.com, "swetterlin" <swetterlin@...> wrote:
      >
      > With a little more experimentation, I discovered that the blinking occurs about every 8 seconds, even when the program is in a wait state. It is the entire window that gets redrawn, but most of the graphics have been "flushed" so that part doesn't disappear in the redraw. I'm not using any timers myself. Once in a wait state, my program does absolutely nothing until the user clicks something. Is it possible LB is doing some periodic action that causes this? In the background, partially behind my windows, is the window with the code being run, and that window doesn't seem to blink (or maybe it blinks but redraws fast enough that I can't notice).
      >
      > Sam W.
      >
      >
      >
      > --- In libertybasic@yahoogroups.com, "rod_bird001" <rodbird@> wrote:
      > >
      > > I think it more likely that you have a rogue call to redraw the background somewhere in the code. Perhaps a timer is not switched off. I just can't see XP redrawing partial windows. Perhaps you are only seeing it because of timing or speed issues between the to machines.
      > >
      > > --- In libertybasic@yahoogroups.com, "swetterlin" <swetterlin@> wrote:
      > > >
      > > > I have a real-time graph application in which data is continuously graphed, sweeping about once per 5 seconds. The user can stop and restart the graphing. The background of the graph is a grid; the graph itself is a single trace. The background is drawn and "flushed" when graphing starts, or restarts. The trace is not flushed point-by-point, but is fully redrawn and flushed when the user stops the sweep. This means that if the graph is covered with another window and then uncovered, the portion of the trace that got covered "disappears" until that portion is redrawn during the next sweep. That is OK, because the user is not supposed to be covering it with other windows.
      > > >
      > > > Everything worked great in Windows 2000. I switched to XP, and a few seconds after the graph starts, or restarts, there is a quick blink and the trace disappears (the background grid does not), just as though it had been covered by another window and then uncovered. The graphing continues and the new segments of the graph are drawn fine. If I halt the sweep, so the entire trace is redrawn, even the part that disappeared is restored.
      > > >
      > > > Apparently XP decided to refresh the window, and when it did so it used only the flushed graphics (which is normal). My question is: Why did XP decide to refresh the window, and how can I prevent it?
      > > >
      > > > The fall-back position is that I can flush point-by-point, but long ago that was the approach I used and it created other problems.
      > > >
      > > > Sam W.
      > > >
      > >
      >
    • rod_bird001
      Sorry, cross posted, glad you found the problem.
      Message 2 of 8 , Dec 8, 2009
      • 0 Attachment
        Sorry, cross posted, glad you found the problem.

        --- In libertybasic@yahoogroups.com, "rod_bird001" <rodbird@...> wrote:
        >
        > If Liberty were blinking every eight seconds I think we might have heard about that issue by now. So it seems the problem is unique to your installation. How about checking your display drivers, are they up to date? How much ram is in use? 99% or less? I'm still focused on the fact that the code runs without error on another machine.
        >
        > --- In libertybasic@yahoogroups.com, "swetterlin" <swetterlin@> wrote:
        > >
        > > With a little more experimentation, I discovered that the blinking occurs about every 8 seconds, even when the program is in a wait state. It is the entire window that gets redrawn, but most of the graphics have been "flushed" so that part doesn't disappear in the redraw. I'm not using any timers myself. Once in a wait state, my program does absolutely nothing until the user clicks something. Is it possible LB is doing some periodic action that causes this? In the background, partially behind my windows, is the window with the code being run, and that window doesn't seem to blink (or maybe it blinks but redraws fast enough that I can't notice).
        > >
        > > Sam W.
        > >
        > >
        > >
        > > --- In libertybasic@yahoogroups.com, "rod_bird001" <rodbird@> wrote:
        > > >
        > > > I think it more likely that you have a rogue call to redraw the background somewhere in the code. Perhaps a timer is not switched off. I just can't see XP redrawing partial windows. Perhaps you are only seeing it because of timing or speed issues between the to machines.
        > > >
        > > > --- In libertybasic@yahoogroups.com, "swetterlin" <swetterlin@> wrote:
        > > > >
        > > > > I have a real-time graph application in which data is continuously graphed, sweeping about once per 5 seconds. The user can stop and restart the graphing. The background of the graph is a grid; the graph itself is a single trace. The background is drawn and "flushed" when graphing starts, or restarts. The trace is not flushed point-by-point, but is fully redrawn and flushed when the user stops the sweep. This means that if the graph is covered with another window and then uncovered, the portion of the trace that got covered "disappears" until that portion is redrawn during the next sweep. That is OK, because the user is not supposed to be covering it with other windows.
        > > > >
        > > > > Everything worked great in Windows 2000. I switched to XP, and a few seconds after the graph starts, or restarts, there is a quick blink and the trace disappears (the background grid does not), just as though it had been covered by another window and then uncovered. The graphing continues and the new segments of the graph are drawn fine. If I halt the sweep, so the entire trace is redrawn, even the part that disappeared is restored.
        > > > >
        > > > > Apparently XP decided to refresh the window, and when it did so it used only the flushed graphics (which is normal). My question is: Why did XP decide to refresh the window, and how can I prevent it?
        > > > >
        > > > > The fall-back position is that I can flush point-by-point, but long ago that was the approach I used and it created other problems.
        > > > >
        > > > > Sam W.
        > > > >
        > > >
        > >
        >
      • Serengeti Lion
        It should probably be pointed out here that Windows can request that your application repaint itself at any time., and the reasons might not always be obvious
        Message 3 of 8 , Dec 9, 2009
        • 0 Attachment
          It should probably be pointed out here that Windows can request that your application repaint itself at any time., and the reasons might not always be obvious or visible. Because of this, good programming practice dictates that your application should be capable of responding to a repaint request at any time, and repainting itself correctly. If you are in a wait state where even background processes like repaint requests cannot be processed, then you are potentially going to run into problems like this.




          ________________________________
          From: rod_bird001 <rodbird@...>
          To: libertybasic@yahoogroups.com
          Sent: Tue, December 8, 2009 2:43:19 PM
          Subject: [libertybasic] Re: XP screen refresh


          If Liberty were blinking every eight seconds I think we might have heard about that issue by now. So it seems the problem is unique to your installation. How about checking your display drivers, are they up to date? How much ram is in use? 99% or less? I'm still focused on the fact that the code runs without error on another machine.

          --- In libertybasic@ yahoogroups. com, "swetterlin" <swetterlin@ ...> wrote:
          >
          > With a little more experimentation, I discovered that the blinking occurs about every 8 seconds, even when the program is in a wait state. It is the entire window that gets redrawn, but most of the graphics have been "flushed" so that part doesn't disappear in the redraw. I'm not using any timers myself. Once in a wait state, my program does absolutely nothing until the user clicks something. Is it possible LB is doing some periodic action that causes this? In the background, partially behind my windows, is the window with the code being run, and that window doesn't seem to blink (or maybe it blinks but redraws fast enough that I can't notice).
          >
          > Sam W.
          >
          >
          >
          > --- In libertybasic@ yahoogroups. com, "rod_bird001" <rodbird@> wrote:
          > >
          > > I think it more likely that you have a rogue call to redraw the background somewhere in the code. Perhaps a timer is not switched off. I just can't see XP redrawing partial windows. Perhaps you are only seeing it because of timing or speed issues between the to machines.
          > >
          > > --- In libertybasic@ yahoogroups. com, "swetterlin" <swetterlin@ > wrote:
          > > >
          > > > I have a real-time graph application in which data is continuously graphed, sweeping about once per 5 seconds. The user can stop and restart the graphing. The background of the graph is a grid; the graph itself is a single trace. The background is drawn and "flushed" when graphing starts, or restarts. The trace is not flushed point-by-point, but is fully redrawn and flushed when the user stops the sweep. This means that if the graph is covered with another window and then uncovered, the portion of the trace that got covered "disappears" until that portion is redrawn during the next sweep. That is OK, because the user is not supposed to be covering it with other windows.
          > > >
          > > > Everything worked great in Windows 2000. I switched to XP, and a few seconds after the graph starts, or restarts, there is a quick blink and the trace disappears (the background grid does not), just as though it had been covered by another window and then uncovered. The graphing continues and the new segments of the graph are drawn fine. If I halt the sweep, so the entire trace is redrawn, even the part that disappeared is restored.
          > > >
          > > > Apparently XP decided to refresh the window, and when it did so it used only the flushed graphics (which is normal). My question is: Why did XP decide to refresh the window, and how can I prevent it?
          > > >
          > > > The fall-back position is that I can flush point-by-point, but long ago that was the approach I used and it created other problems.
          > > >
          > > > Sam W.
          > > >
          > >
          >




          [Non-text portions of this message have been removed]
        • swetterlin
          The automatic repaints that occur when the window is covered and then uncovered are controlled by Liberty Basic, and will be handled even in a wait state.
          Message 4 of 8 , Dec 10, 2009
          • 0 Attachment
            The automatic repaints that occur when the window is covered and then uncovered are controlled by Liberty Basic, and will be handled even in a wait state. Likewise for the repaint that was being triggered by who-knows-what.

            The problem arises from the fact that LB repaints using all graphics commands that have been "flushed", which despite its name does not mean thrown away, but rather recorded. It is possible for my program to run all night and accumulate data sweeps on the screen. If I flush after every line segment is drawn, I ultimately run out of memory and crash. I could come up with a more complicated scheme that might work, but up until this issue with my graphics card, Windows did not seem to trigger any random repaints. Whatever I did by activating and deactivating the second monitor seems to have solved the problem for now.

            Sam W.

            --- In libertybasic@yahoogroups.com, Serengeti Lion <serengeti_lion@...> wrote:
            >
            > It should probably be pointed out here that Windows can request that your application repaint itself at any time., and the reasons might not always be obvious or visible. Because of this, good programming practice dictates that your application should be capable of responding to a repaint request at any time, and repainting itself correctly. If you are in a wait state where even background processes like repaint requests cannot be processed, then you are potentially going to run into problems like this.
            >
            >
            >
            >
            > ________________________________
            > From: rod_bird001 <rodbird@...>
            > To: libertybasic@yahoogroups.com
            > Sent: Tue, December 8, 2009 2:43:19 PM
            > Subject: [libertybasic] Re: XP screen refresh
            >
            >
            > If Liberty were blinking every eight seconds I think we might have heard about that issue by now. So it seems the problem is unique to your installation. How about checking your display drivers, are they up to date? How much ram is in use? 99% or less? I'm still focused on the fact that the code runs without error on another machine.
            >
            > --- In libertybasic@ yahoogroups. com, "swetterlin" <swetterlin@ ...> wrote:
            > >
            > > With a little more experimentation, I discovered that the blinking occurs about every 8 seconds, even when the program is in a wait state. It is the entire window that gets redrawn, but most of the graphics have been "flushed" so that part doesn't disappear in the redraw. I'm not using any timers myself. Once in a wait state, my program does absolutely nothing until the user clicks something. Is it possible LB is doing some periodic action that causes this? In the background, partially behind my windows, is the window with the code being run, and that window doesn't seem to blink (or maybe it blinks but redraws fast enough that I can't notice).
            > >
            > > Sam W.
            > >
            > >
            > >
            > > --- In libertybasic@ yahoogroups. com, "rod_bird001" <rodbird@> wrote:
            > > >
            > > > I think it more likely that you have a rogue call to redraw the background somewhere in the code. Perhaps a timer is not switched off. I just can't see XP redrawing partial windows. Perhaps you are only seeing it because of timing or speed issues between the to machines.
            > > >
            > > > --- In libertybasic@ yahoogroups. com, "swetterlin" <swetterlin@ > wrote:
            > > > >
            > > > > I have a real-time graph application in which data is continuously graphed, sweeping about once per 5 seconds. The user can stop and restart the graphing. The background of the graph is a grid; the graph itself is a single trace. The background is drawn and "flushed" when graphing starts, or restarts. The trace is not flushed point-by-point, but is fully redrawn and flushed when the user stops the sweep. This means that if the graph is covered with another window and then uncovered, the portion of the trace that got covered "disappears" until that portion is redrawn during the next sweep. That is OK, because the user is not supposed to be covering it with other windows.
            > > > >
            > > > > Everything worked great in Windows 2000. I switched to XP, and a few seconds after the graph starts, or restarts, there is a quick blink and the trace disappears (the background grid does not), just as though it had been covered by another window and then uncovered. The graphing continues and the new segments of the graph are drawn fine. If I halt the sweep, so the entire trace is redrawn, even the part that disappeared is restored.
            > > > >
            > > > > Apparently XP decided to refresh the window, and when it did so it used only the flushed graphics (which is normal). My question is: Why did XP decide to refresh the window, and how can I prevent it?
            > > > >
            > > > > The fall-back position is that I can flush point-by-point, but long ago that was the approach I used and it created other problems.
            > > > >
            > > > > Sam W.
            > > > >
            > > >
            > >
            >
            >
            >
            >
            > [Non-text portions of this message have been removed]
            >
          Your message has been successfully submitted and would be delivered to recipients shortly.