This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 69812 - Coediting can break shared files.
Summary: Coediting can break shared files.
Status: VERIFIED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: collab (show other bugs)
Version: 5.x
Hardware: All All
: P1 blocker (vote)
Assignee: Petr Nejedly
URL:
Keywords:
: 69392 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-12-03 11:39 UTC by _ alexlamsl
Modified: 2006-01-28 09:32 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ alexlamsl 2005-12-03 11:39:03 UTC
We've run collab for a week now, and we're getting into the habit of unshare / 
reshare, rejoin channel or even restart NB on a round the clock basis. Worse 
yet, for most of the time when out-of-sync happens the file is only edited by 
a single remote user!

Ctrl+Z sometimes helps as a workaround.

Tested on NB5 QBuild 200512011057 and Collab as of 01/12
Comment 1 Petr Nejedly 2005-12-05 16:08:26 UTC
Did you take into account the delay before unlocking the region?
It takes several seconds (configurable) and there was at least one version with
20s region unlock time, IIRC.
Comment 2 _ alexlamsl 2005-12-07 15:24:30 UTC
Not particularly sure about what do you mean by that; we have been giving a 
few minutes every time in hope of a "self-repair" (see below).

When files are out-of-sync we mean that extra characters / lines (even up to a 
whole repetition section of javadocs + method signature) creeps into the code 
and destroy the integrity of the whole source file, definitely not the restuls 
of any intermediate state of normal (intended) editting.
Comment 3 Petr Nejedly 2006-01-09 12:15:13 UTC
Simple scenario for reproducing this problem is:
1. Share (well known) SwingWorker class
2. Open the file (not necessary to be opened on both sides at once)
3. Quickly delete all javadocs from top to bottom (select block, delete, select..)

The file on other size will have wrong lines missing, so it seems like wrong
offsets are computed in case more than one block is locked at once.
This "wrong offset" problem seems to cause other issues, I'll dup them to this one.
Comment 4 Petr Nejedly 2006-01-09 12:16:52 UTC
*** Issue 69392 has been marked as a duplicate of this issue. ***
Comment 5 Petr Nejedly 2006-01-11 08:19:16 UTC
The problem occurs in case you create two overlapping regions. Example:
1. you delete line 3, lines 1-5 get locked
2. you delete line 7, lines 5-9 get locked
the line 5 is part of two regions, which confuses the system.
Comment 6 Petr Nejedly 2006-01-13 16:06:00 UTC
It is slightly better in trunk now (#69392 part fixed at least), but it is still
possible to break the document coherrency.
Comment 7 Marian Mirilovic 2006-01-17 12:08:03 UTC
reproducible on Lin
Comment 8 Petr Nejedly 2006-01-21 15:53:06 UTC
Fixed
collab/filesharing/src/org/netbeans/modules/collab/channel/filesharing/eventhandler/DocumentChangeHandler.java,v1.3
collab/filesharing/src/org/netbeans/modules/collab/channel/filesharing/filehandler/CollabFileHandlerSupport.java,v1.7
collab/filesharing/src/org/netbeans/modules/collab/channel/filesharing/filehandler/CollabRegionSupport.java,v1.5
and few other files already commited before.
Comment 9 Petr Nejedly 2006-01-21 17:56:37 UTC
Fix backported to release50 with the other modified files:
collab/filesharing/src/org/netbeans/modules/collab/channel/filesharing/eventhandler/DocumentChangeHandler.java,v1.2.4.1
collab/filesharing/src/org/netbeans/modules/collab/channel/filesharing/filehandler/CollabFileHandlerSupport.java,v1.4.2.1
collab/filesharing/src/org/netbeans/modules/collab/channel/filesharing/filehandler/CollabJavaFileHandler.java,v1.2.4.1
collab/filesharing/src/org/netbeans/modules/collab/channel/filesharing/filehandler/CollabRegionSupport.java,v1.2.4.1
collab/filesharing/src/org/netbeans/modules/collab/channel/filesharing/filehandler/CollabTextFileHandler.java,v1.1.20.1
collab/filesharing/src/org/netbeans/modules/collab/channel/filesharing/filehandler/CollabXMLFileHandler.java,v1.1.20.1
Comment 10 Petr Nejedly 2006-01-21 18:02:01 UTC
The fix should be available on Dev AU as Collab/filesharing v1.5
and 5.0 beta AU as Collab/filesharing v1.1.3
Comment 11 _ alexlamsl 2006-01-21 20:03:34 UTC
will perform testings once these files are published on AUC ;)
Comment 12 Petr Nejedly 2006-01-25 13:15:47 UTC
One additional fix was added, Dev AU: Collab/filesharing v1.6
5.0beta AU:  Collab/filesharing v1.1.4
Comment 13 _ alexlamsl 2006-01-25 15:51:14 UTC
Ok - but until I can successfully download the Collab module from the dev AUC 
(which is currently not possible with NB5.1 200601231900) I couldn't quite go 
round and test it ^^"
Comment 14 Petr Nejedly 2006-01-25 16:03:17 UTC
I know.
I've been told by release engineering the modules will be built/pushed today
(this night prague time), so stay tuned.
Comment 15 Petr Nejedly 2006-01-26 14:28:32 UTC
OK, the 5.0 modules are now available at 5.0beta AU.
The trunk (5.5dev) modules are still not available :-(
Please try to verify with 5.0
Comment 16 _ alexlamsl 2006-01-26 14:57:17 UTC
erm.... does it mean the 5.0 RC2 build?

coz my friend claims to be unable to find the collab on the AUC there...
Comment 17 Petr Nejedly 2006-01-26 16:41:44 UTC
Yes, 5.0RC2, but _beta_ AU, that is, you have to invoke the update center and
check the (by default unchecked) beta AU (the last entry).

Once we verify the modules, they'll move to official stable AU...
Comment 18 _ alexlamsl 2006-01-28 09:32:03 UTC
Tried hard to break it, but failed ;)

Thanks very much for the hard work~