japazilian / multitype

Automatically exported from code.google.com/p/multitype
0 stars 0 forks source link

BackendClient gets Null Pointer with cursor positions enabled and host closes file #42

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Uncomment lines 107-119 in Editors/Document.java to re-enable cursor 
positions
2. Become host and share a file that already has some text (no other users 
needed)
3. Click anywhere in the file to generated a cursor FEU
4. Right-click on file in Shared Files and close shared file
5. Do something else as host, like share another file

** Null Pointer exception at this point, see below **

Please provide any additional information below.

*** Eclipse Application Output ***

!SESSION 2011-06-12 14:26:24.108 -----------------------------------------------
eclipse.buildId=M20110210-1200
java.version=1.6.0_24
java.vendor=Apple Inc.
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments:  -product org.eclipse.sdk.ide
Command-line arguments:  -product org.eclipse.sdk.ide -data 
/Users/rvmiller89/eclipse/plugin_dev/../runtime-EclipseApplication -dev 
file:/Users/rvmiller89/eclipse/plugin_dev/.metadata/.plugins/org.eclipse.pde.cor
e/Eclipse Application/dev.properties -os macosx -ws cocoa -arch x86_64 
-consoleLog

!ENTRY org.eclipse.core.net 1 0 2011-06-12 14:26:33.920
!MESSAGE System property http.nonProxyHosts has been set to 
local|*.local|169.254/16|*.169.254/16 by an external source. This value will be 
overwritten using the values from the preferences
Received: FEU: NF | Type: Connection_Succeed | ASGN ID: 0

GetUpdate: FEU: NF | Type: Connection_Succeed | ASGN ID: 0
Sent: FEU: NF | Type: User_Connected | UID: 0 | UNAME: Ryan

Received: FEU: NF | Type: User_Connected | UID: 0 | UNAME: Ryan

Received: FEU: NF | Type: User_Connected | UID: 0 | UNAME: Ryan

GetUpdate: FEU: NF | Type: User_Connected | UID: 0 | UNAME: Ryan
Received: FEU: NF | Type: New_Host | UID: -1 | FID: -1 | CONTENT:  | 

GetUpdate: FEU: NF | Type: User_Connected | UID: 0 | UNAME: Ryan
GetUpdate: FEU: NF | Type: New_Host | UID: -1 | FID: -1 | CONTENT:  | 
Sent: FEU: NF | Type: Request_Host | UID: 0 | FID: -1 | CONTENT: Ryan | 

Received: FEU: NF | Type: New_Host | UID: 0 | FID: -1 | CONTENT:  | 

GetUpdate: FEU: NF | Type: New_Host | UID: 0 | FID: -1 | CONTENT:  | 
Sent: FEU: NF | Type: New_Shared_File | UID: 0 | FID: 0 | CONTENT: Test.txt | 

Received: FEU: NF | Type: New_Shared_File | UID: 0 | FID: 0 | CONTENT: Test.txt 
| 

GetUpdate: FEU: NF | Type: New_Shared_File | UID: 0 | FID: 0 | CONTENT: 
Test.txt | 
Sent: FEU: MU | FID: 0 | UID: 0 | RVN: 0 | FEUID: 0 | Type: Cursor | SLOC: 6

Received: FEU: MU | FID: 0 | UID: 0 | RVN: 1 | FEUID: 0 | Type: Cursor | SLOC: 6

*** Closing shared file: 0 - Test.txt
Sent: FEU: NF | Type: Close_Shared_File | UID: 0 | FID: 0 | CONTENT: Test.txt | 

Received: FEU: NF | Type: Close_Shared_File | UID: 0 | FID: 0 | CONTENT: 
Test.txt | 

GetUpdate: FEU: NF | Type: Close_Shared_File | UID: 0 | FID: 0 | CONTENT: 
Test.txt | 
java.lang.NullPointerException
    at multitype.BackendClient$2.run(BackendClient.java:178)
    at java.lang.Thread.run(Thread.java:680)
GetUpdate: FEU: NF | Type: Server_Disconnect | UID: -1 | FID: -1 | CONTENT: 
java.lang.NullPointerException
multitype.BackendClient$2.run(BackendClient.java:178)
java.lang.Thread.run(Thread.java:680)
 | 

*** Server Output ***

Server Running.
Accepted Client
Sending: --------------------
Notification FEU:
type: Connection_Succeed
assign id: 0
---------------------
Sent client UID: 0
Client Added
Received: --------------------
Notification FEU:
type: User_Connected
user id: 0
username: Ryan
---------------------
Sending 1 users to client 0
Sending: --------------------
Notification FEU:
type: User_Connected
user id: 0
username: Ryan
---------------------
Sending: --------------------
Notification FEU:
type: User_Connected
user id: 0
username: Ryan
---------------------
Sending: --------------------
Notification FEU:
type: New_Host
---------------------
Received: --------------------
Notification FEU:
type: Request_Host
---------------------
Sending: --------------------
Notification FEU:
type: New_Host
---------------------
Received: --------------------
Notification FEU:
type: New_Shared_File
---------------------
Sending: --------------------
Notification FEU:
type: New_Shared_File
---------------------
Added a new file. FID: 0
Received: --------------------
Markup FEU:
file id: 0
user id: 0
rev: 0
type: Cursor
start loc: 6
---------------------
Taking feu: FEU: MU | FID: 0 | UID: 0 | RVN: 1 | FEUID: 0 | Type: Cursor | 
SLOC: 6

Sending: --------------------
Markup FEU:
file id: 0
user id: 0
rev: 1
type: Cursor
start loc: 6
---------------------
Received: --------------------
Notification FEU:
type: Close_Shared_File
---------------------
Removed file 0
Sending: --------------------
Notification FEU:
type: Close_Shared_File
---------------------

Original issue reported on code.google.com by rvmille...@gmail.com on 12 Jun 2011 at 6:29

GoogleCodeExporter commented 9 years ago
NOTE:

After my last commit, the affected code lines are now 84-88.

Also, another problem on our part is the resource model that client editors 
use.  Right now, they're using StringEditorInput's as backends, which have no 
concept of persistence, and markers need this.  We're going to have to 
re-design the resource model so these are stored somewhere (temporarily) on 
disk....

Original comment by rvmille...@gmail.com on 12 Jun 2011 at 8:15

GoogleCodeExporter commented 9 years ago
I'm confused. Can you elaborate for the rest of us what a StringEditorInput
and marker is? Is this related to the filed bug or should it be a separate
bug entirely?

Original comment by rharagut...@gmail.com on 13 Jun 2011 at 9:50

GoogleCodeExporter commented 9 years ago
Yeah, that issue is unrelated.  But it will also prevent Cursor positions from 
working.

So I figured I'd work on re-doing the resource model later, but the 
BackendClient has its own problem described above.  You can replicate it by 
un-commenting the designated lines.  Using only the host for now will avoid the 
other issue.

Original comment by rvmille...@gmail.com on 14 Jun 2011 at 12:59

GoogleCodeExporter commented 9 years ago
See issue 43 for the other problem.

Original comment by rvmille...@gmail.com on 14 Jun 2011 at 1:28