Re: [Freeciv-Dev] (PR#39868) [regression] unit woken up from sentry not properly deselected

2007-11-18 Thread Jason Dorje Short

http://bugs.freeciv.org/Ticket/Display.html?id=39868 >

William Allen Simpson wrote:
> http://bugs.freeciv.org/Ticket/Display.html?id=39868 >
> 
> Found it!  After straightening the code, and getting some sleep, the answer
> leaped right out.  When taking a unit out of sentry by client instead of
> server, it is already in the focus, and should not be added to the queue.
> 
> Committed S2_1 revision 13990.
> Committed S2_2 revision 13991.
> Committed trunk revision 13992.
> 
> Please verify.

Nicely done.

Further random gameplay will be needed to verify everything works but 
this looks like the exact cause of what we're seeing.

-jason



___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] (PR#39868) [regression] unit woken up from sentry not properly deselected

2007-11-18 Thread William Allen Simpson

http://bugs.freeciv.org/Ticket/Display.html?id=39868 >

Found it!  After straightening the code, and getting some sleep, the answer
leaped right out.  When taking a unit out of sentry by client instead of
server, it is already in the focus, and should not be added to the queue.

Committed S2_1 revision 13990.
Committed S2_2 revision 13991.
Committed trunk revision 13992.

Please verify.


Index: client/packhand.c
===
--- client/packhand.c   (revision 13989)
+++ client/packhand.c   (working copy)
@@ -1083,6 +1083,7 @@
   && unit_owner(punit) == game.player_ptr
   && punit->activity == ACTIVITY_SENTRY
   && packet_unit->activity == ACTIVITY_IDLE
+ && !unit_is_in_focus(punit)
  && is_player_phase(game.player_ptr, game.info.phase)) {
 /* many wakeup units per tile are handled */
 urgent_unit_focus(punit);
___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] (PR#39868) [regression] unit woken up from sentry not properly deselected

2007-11-17 Thread William Allen Simpson

http://bugs.freeciv.org/Ticket/Display.html?id=39868 >

Jason Dorje Short wrote:
> This was introduced in 39817.
> 
I've been over and over my code in PR#39817 today.  I don't see the problem.
Apparently, it needs more eyeballs.  I'll leave this to Jason.



___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] (PR#39868) [regression] unit woken up from sentry not properly deselected

2007-11-17 Thread William Allen Simpson

http://bugs.freeciv.org/Ticket/Display.html?id=39868 >

I have verified that a unit sentried and then moved does not lose focus.
The report accurately describes the problem.

I have not yet found the problem.  Unfortunately, there seem to be several
methods used for every test, and for every action.  I'm going blind trying
to understand the subtle differences (usually, there's no good reason).

The root cause appears to be documented in packhand.c:

   Exception: When the client puts a unit in focus, it's status is set to
   idle immediately, before informing the server about the new status. This
   is because the server can never deny a request for idle, and should not
   be concerned about which unit the client is focusing on.

Unfortunately, this means the client and server fields are unsynchronized,
while elsewhere code always assumes they are the same.  I'm going blind
trying to find these subtle differences, too.



___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] (PR#39868) [regression] unit woken up from sentry not properly deselected

2007-11-16 Thread Jason Dorje Short

http://bugs.freeciv.org/Ticket/Display.html?id=39868 >

This was introduced in 39817.

I'm not sure why but at a guess the unsentried unit is being put onto 
the urgent-focus queue then refocused later when it runs out of moves 
and unit focus is supposed to advance.

-jason



___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] (PR#39868) [regression] unit woken up from sentry not properly deselected

2007-11-16 Thread Daniel Markstedt

http://bugs.freeciv.org/Ticket/Display.html?id=39868 >

On 11/16/07, Christian Prochaska <[EMAIL PROTECTED]> wrote:
>
> http://bugs.freeciv.org/Ticket/Display.html?id=39868 >
>
> > [wsimpson - Fr 16. Nov 2007, 09:32:20]:
> >
> > Daniel Markstedt wrote:
> > > Not necessarily. It may also be something that has ceased to work as
> > > intended, regardless of having been previously reported as a bug or
> > > not.
> > >
> > Sorry, perhaps you're not a native English speaker (although I've no
> > previous cause to complain), but these terms have specific meanings in
> > computer science.  Sometimes, new bugs are just broken code
> >
> > Regression testing is usually a suite of tests, usually developed by
> > experience with previous bugs.  For more background, the en.wikipedia
> > article isn't too bad.
> >
>
> Your suggested en.wikipedia article
> (http://en.wikipedia.org/wiki/Regression_testing) says:
>
> "Regression bugs occur whenever software functionality that previously
> worked as desired, stops working or no longer works in the same way that
> was previously planned. Typically regression bugs occur as an unintended
> consequence of program changes."
>
> And from http://en.wikipedia.org/wiki/Software_regression:
>
> "A software regression is a software bug which makes a feature stop
> working after a certain event (system upgrade, system patching, daylight
> saving time switch, etc.)"
>
> This doesn't read like "re-introduction of a previously existing bug" to
> me. It might be a special meaning of the word "regression", but
> obviously not the "one and only".
>
>

Perhaps the term is used differently in different branches of the
software engineering field/business. Where I happen to work (web
browser) the term is used in the sense I described.

 ~Daniel



___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


Re: [Freeciv-Dev] (PR#39868) [regression] unit woken up from sentry not properly deselected

2007-11-16 Thread William Allen Simpson

http://bugs.freeciv.org/Ticket/Display.html?id=39868 >

Christian Prochaska wrote:
> And from http://en.wikipedia.org/wiki/Software_regression: 
> 
> "A software regression is a software bug which makes a feature stop
> working after a certain event (system upgrade, system patching, daylight
> saving time switch, etc.)"
> 
By that definition, every bug (or even a power failure) would also be a
regression.  This latter is a "stub" and is manifestly technically incorrect
and unsupported by references.  With wikipedia, you have to sort the wheat
from the chaff; it's not reliable, it's just a million monkeys

(Speaking as a long-time contributor.)

In this case, of course, the feature didn't work at all.  Anyway, finding
the actual bug would be helpful.



___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] (PR#39868) [regression] unit woken up from sentry not properly deselected

2007-11-16 Thread Christian Prochaska

http://bugs.freeciv.org/Ticket/Display.html?id=39868 >

> [wsimpson - Fr 16. Nov 2007, 09:32:20]:
> 
> Daniel Markstedt wrote:
> > Not necessarily. It may also be something that has ceased to work as
> > intended, regardless of having been previously reported as a bug or
> > not.
> > 
> Sorry, perhaps you're not a native English speaker (although I've no
> previous cause to complain), but these terms have specific meanings in
> computer science.  Sometimes, new bugs are just broken code
> 
> Regression testing is usually a suite of tests, usually developed by
> experience with previous bugs.  For more background, the en.wikipedia
> article isn't too bad.
> 

Your suggested en.wikipedia article
(http://en.wikipedia.org/wiki/Regression_testing) says:

"Regression bugs occur whenever software functionality that previously
worked as desired, stops working or no longer works in the same way that
was previously planned. Typically regression bugs occur as an unintended
consequence of program changes."

And from http://en.wikipedia.org/wiki/Software_regression: 

"A software regression is a software bug which makes a feature stop
working after a certain event (system upgrade, system patching, daylight
saving time switch, etc.)"

This doesn't read like "re-introduction of a previously existing bug" to
me. It might be a special meaning of the word "regression", but
obviously not the "one and only".


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] (PR#39868) [regression] unit woken up from sentry not properly deselected

2007-11-15 Thread Daniel Markstedt

http://bugs.freeciv.org/Ticket/Display.html?id=39868 >

> [dmarks - Thu Nov 15 12:26:01 2007]:
> 
> S2_1 r13945:
> 
> Put unit in sentry, then wake it up and move it somewhere using up all
> its moves.
> 
> Expected behavior:
> Unit gets deselected and the next unit is selected.
> 
> Actual behavior:
> Unit stays selected. If you try to move one more tile it will get a
> goto order to the tile and the next unit will finally be selected.
> 
> 
>  ~Daniel
> 
> 
> 

Also, I'm pretty sure this is a regression between 2.1.0 and S2_1-devel.

 ~Daniel

___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev