uci-sdcl/CalicoClient — Issue #60: Failed to process packet CONSISTENCY_FINISH() on startup
Author: waynehuang3
Created: 2012-02-07 00:38:56+00:00
State: open

The cause for this has been found.

The static values for mouse commands conflict with the Consistency values.

public static final int ACTION_PRESSED	= MouseEvent.MOUSE_PRESSED; //501
public static final int ACTION_DRAGGED	= MouseEvent.MOUSE_DRAGGED; //506
public static final int ACTION_RELEASED	= MouseEvent.MOUSE_RELEASED; //502
public static final int ACTION_CLICKED	= MouseEvent.MOUSE_CLICKED; //500
public static final int ACTION_SCROLL	= MouseEvent.MOUSE_WHEEL; //507

// Consistency
public static final int CONSISTENCY_CHECK	= 500; // Requests that the server send you a consistency check.
public static final int CONSISTENCY_FINISH	= 501; // The consistency check is done, redraw the screen (S->C)
public static final int CONSISTENCY_CHECK_CONTINUE = 503;
public static final int CONSISTENCY_FAILED	= 504;
public static final int CONSISTENCY_RESYNC_CANVAS = 505;
public static final int CONSISTENCY_DEBUG	= 506;

public static final int GRID_SIZE	= 502; // (this is server->client)

Possible solution is to simply add 10 to each of the Consistency values/GRID_SIZE

It is unknown what other issues may be caused by this bug, however it does NOT cause lost sync because CONSISTENCY_FAILED does not conflict.

Whatever the values are changed to, it must be applied to both the client and the server.