japazilian / multitype

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

can't share files #38

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. tried with new server, as host, share file
2.
3.

What is the expected output? What do you see instead?

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: rharagut

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

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

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

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

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

GetUpdate: FEU: NF | Type: New_Host | UID: 0 | FID: -1 | CONTENT:  | 
!SESSION 2011-04-19 03:32:21.636 -----------------------------------------------
eclipse.buildId=I20100909-0800
java.version=1.6.0_22
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments:  -product org.eclipse.sdk.ide
Command-line arguments:  -product org.eclipse.sdk.ide -data 
/u/u94/rharagut/workspace/../runtime-New_configuration -dev 
file:/u/u94/rharagut/workspace/.metadata/.plugins/org.eclipse.pde.core/multitype
 plugin/dev.properties -os linux -ws gtk -arch x86_64 -consoleLog

!ENTRY org.eclipse.ui 4 0 2011-04-19 03:33:17.455
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    at java.lang.String.substring(String.java:1937)
    at multitype.editors.EditorManager.openDocument(EditorManager.java:198)
    at multitype.command.ShareFile.filesToOpen(ShareFile.java:82)
    at multitype.command.ShareFile.execute(ShareFile.java:32)
    at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
    at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
    at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
    at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
    at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
    at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
    at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:820)
    at org.eclipse.ui.menus.CommandContributionItem.access$19(CommandContributionItem.java:806)
    at org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(CommandContributionItem.java:796)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3540)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3161)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
    at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
Received: FEU: NF | Type: User_Connected | UID: 1 | UNAME: rharagut

GetUpdate: FEU: NF | Type: User_Connected | UID: 1 | UNAME: rharagut
Sent: FEU: NF | Type: User_Disconnected | UID: 0 | FID: -1 | CONTENT: rharagut 
| 

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

GetUpdate: FEU: NF | Type: Host_Disconnect | UID: 0 | FID: -1 | CONTENT:  | 
Received: FEU: NF | Type: Connection_Succeed | ASGN ID: 2

GetUpdate: FEU: NF | Type: Connection_Succeed | ASGN ID: 2
Sent: FEU: NF | Type: User_Connected | UID: 2 | UNAME: rharagut

Received: FEU: NF | Type: User_Connected | UID: 2 | UNAME: rharagut

Received: FEU: NF | Type: User_Connected | UID: 1 | UNAME: rharagut

Received: FEU: NF | Type: User_Connected | UID: 2 | UNAME: rharagut

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

GetUpdate: FEU: NF | Type: User_Connected | UID: 2 | UNAME: rharagut
GetUpdate: FEU: NF | Type: User_Connected | UID: 1 | UNAME: rharagut
GetUpdate: FEU: NF | Type: User_Connected | UID: 2 | UNAME: rharagut
GetUpdate: FEU: NF | Type: New_Host | UID: 1 | FID: -1 | CONTENT:  | 
Received: FEU: NF | Type: Host_Disconnect | UID: 1 | FID: -1 | CONTENT:  | 

GetUpdate: FEU: NF | Type: Host_Disconnect | UID: 1 | FID: -1 | CONTENT:  | 
Received: FEU: NF | Type: User_Disconnected | UID: 1 | FID: -1 | CONTENT:  | 

GetUpdate: FEU: NF | Type: User_Disconnected | UID: 1 | FID: -1 | CONTENT:  | 
Sent: FEU: NF | Type: Request_Host | UID: 2 | FID: -1 | CONTENT: rharagut | 

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

GetUpdate: FEU: NF | Type: New_Host | UID: 2 | FID: -1 | CONTENT:  | 

!ENTRY org.eclipse.ui 4 0 2011-04-19 03:36:59.749
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    at java.lang.String.substring(String.java:1937)
    at multitype.editors.EditorManager.openDocument(EditorManager.java:198)
    at multitype.command.ShareFile.filesToOpen(ShareFile.java:82)
    at multitype.command.ShareFile.execute(ShareFile.java:32)
    at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
    at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
    at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
    at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
    at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
    at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
    at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:820)
    at org.eclipse.ui.menus.CommandContributionItem.access$19(CommandContributionItem.java:806)
    at org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(CommandContributionItem.java:796)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3540)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3161)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
    at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1383)

!ENTRY org.eclipse.ui 4 0 2011-04-19 03:37:15.605
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    at java.lang.String.substring(String.java:1937)
    at multitype.editors.EditorManager.openDocument(EditorManager.java:198)
    at multitype.command.ShareFile.filesToOpen(ShareFile.java:82)
    at multitype.command.ShareFile.execute(ShareFile.java:32)
    at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
    at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
    at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
    at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
    at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
    at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
    at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:820)
    at org.eclipse.ui.menus.CommandContributionItem.access$19(CommandContributionItem.java:806)
    at org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(CommandContributionItem.java:796)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3540)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3161)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
    at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
Sent: FEU: NF | Type: User_Disconnected | UID: 2 | FID: -1 | CONTENT: rharagut 
| 

Received: FEU: NF | Type: Host_Disconnect | UID: 2 | FID: -1 | CONTENT:  | 

Received EOF, closing.
GetUpdate: FEU: NF | Type: Host_Disconnect | UID: 2 | FID: -1 | CONTENT:  | 

Please use labels and text to provide additional information.

Original issue reported on code.google.com by rharagut...@gmail.com on 19 Apr 2011 at 7:43

GoogleCodeExporter commented 9 years ago
wat.

Make this work again, it used to work.

Original comment by rvmille...@gmail.com on 19 Apr 2011 at 3:00

GoogleCodeExporter commented 9 years ago
Ok, i was hoping that restarting my computer would solve this. But as it 
stands, I can't even share newly created files and any other file in my 
workspace, which means that I can't continue to work on the concurrency issues. 
Can someone please fix this asap? Or at the very least give me some steps that 
guarentee being able to share a file?

Original comment by rharagut...@gmail.com on 19 Apr 2011 at 3:02

GoogleCodeExporter commented 9 years ago
I think a possible number of steps to break it was (though it was like 3 am at 
the time)
- before sharing, have a tab open
- edit tab, save
- then try to share, which fails 

Original comment by rharagut...@gmail.com on 19 Apr 2011 at 3:07

GoogleCodeExporter commented 9 years ago
also, it wasn't that all 3 of my files became unsharable at the same time, it 
seemed like they gradually became unsharable. 

Original comment by rharagut...@gmail.com on 19 Apr 2011 at 3:11

GoogleCodeExporter commented 9 years ago
was the server running on local host? just trying to reproduce the issue..

Original comment by azfarkha...@gmail.com on 19 Apr 2011 at 3:13

GoogleCodeExporter commented 9 years ago
It didn't seem to matter. I had one running on a pod, and both my laptop and 
the pod were giving the same errors

Original comment by rharagut...@gmail.com on 19 Apr 2011 at 3:15

GoogleCodeExporter commented 9 years ago
the error is on line 198 of content manager, the content string is ""

Original comment by rharagut...@gmail.com on 19 Apr 2011 at 3:18

GoogleCodeExporter commented 9 years ago
i cant recreated the issue....

i had a server on localhost and shared: (1) file without it being open on 
screen, (2) a file open on screen and (3) a file open on screen after editing 
but before sharing

do note that i only shared with myself because no other clients were connected, 
but that shouldnt be a problem...i also was able to share at least 4 files

everything seems to work fine on revision 454 on Multitype (check 
multitype.editors.EditorManager) and revision 445 of the server (check Server)

Original comment by azfarkha...@gmail.com on 19 Apr 2011 at 3:21

GoogleCodeExporter commented 9 years ago
This is really bizarre. 
I've stepped through the program, and everything looks fine up until 
openDocument in EditorManager, 
I don't really know what these things do, but here's what's happening:
on line 169, it does not go through the loop, i guess length=0,
Scanner is created (successfully it seems)
content intialized to ""
scanner.hasNext returns false as it doesn't go into the while loop
content attempts to substring ""

Original comment by rharagut...@gmail.com on 19 Apr 2011 at 3:26

GoogleCodeExporter commented 9 years ago
what are your revisions?

Original comment by azfarkha...@gmail.com on 19 Apr 2011 at 3:27

GoogleCodeExporter commented 9 years ago
also, this is probably more important, but my editormanager is on revision 457

Original comment by rharagut...@gmail.com on 19 Apr 2011 at 3:28

GoogleCodeExporter commented 9 years ago
my server.java is at 445, but markupprocessor.java is at 461

Original comment by rharagut...@gmail.com on 19 Apr 2011 at 3:29

GoogleCodeExporter commented 9 years ago
Can we revert back to last night's working version?

Original comment by rvmille...@gmail.com on 19 Apr 2011 at 3:36

GoogleCodeExporter commented 9 years ago

Original comment by azfarkha...@gmail.com on 19 Apr 2011 at 3:37

GoogleCodeExporter commented 9 years ago

Original comment by rvmille...@gmail.com on 19 Apr 2011 at 3:39

GoogleCodeExporter commented 9 years ago
ok, it should be good now.....

i bet you were trying to share empty files......just like you said, that is why 
the array out of bounds was happening: 0 length minus 1 is -1. 

anyway, all should be good now, please update to revision 462 on 
multitype.editors.EditorManager

Original comment by azfarkha...@gmail.com on 19 Apr 2011 at 3:43

GoogleCodeExporter commented 9 years ago

Original comment by rharagut...@gmail.com on 19 Apr 2011 at 3:48

GoogleCodeExporter commented 9 years ago
good job, thanks!

Original comment by rharagut...@gmail.com on 19 Apr 2011 at 3:48