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 37005 - [CLI] two ide runned for the same userdir
Summary: [CLI] two ide runned for the same userdir
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: All All
: P4 blocker (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
: 36675 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-11-04 10:14 UTC by pzajac
Modified: 2008-12-22 17:45 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
ConnectException stacktrace (722 bytes, text/plain)
2004-01-06 15:57 UTC, pzajac
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pzajac 2003-11-04 10:14:04 UTC
There is possible  to start more instances of
NetBeans for a userdir. The ide are started on
different computers. This is probably user bug.
But there is better to show information message,
that the user dir is locked and no runned instance
found. 

comments from Jesse on nbdev:


- if contacting an existing instance fails,
*don't* start a new instance anyway; fail and
prompt the user to clear the lock file manually
(or pop a GUI dialog asking whether to do this?)

- store the IP address, as you suggested, and
permit inter-machine communication (note that
various error conditions will return 127.0.0.1
which will leave the behavior as it is now)
Comment 1 Jaroslav Tulach 2003-11-27 13:50:39 UTC
Fixed by showing a dialog with question to the user.


RCS file: /cvs/core/bootstrap/src/org/netbeans/Bundle.properties,v
done
Checking in bootstrap/src/org/netbeans/Bundle.properties;
/cvs/core/bootstrap/src/org/netbeans/Bundle.properties,v  <-- 
Bundle.properties
initial revision: 1.1
done
Checking in bootstrap/src/org/netbeans/CLIHandler.java;
/cvs/core/bootstrap/src/org/netbeans/CLIHandler.java,v  <-- 
CLIHandler.java
new revision: 1.8; previous revision: 1.7
done
Checking in bootstrap/src/org/netbeans/Main.java;
/cvs/core/bootstrap/src/org/netbeans/Main.java,v  <--  Main.java
new revision: 1.14; previous revision: 1.13
done
Processing log script arguments...
More commits to come...
Checking in test/unit/src/org/netbeans/CLIHandlerTest.java;
/cvs/core/test/unit/src/org/netbeans/CLIHandlerTest.java,v  <-- 
CLIHandlerTest.java
new revision: 1.4; previous revision: 1.3
Comment 2 Jaroslav Tulach 2003-11-27 13:52:20 UTC
*** Issue 36675 has been marked as a duplicate of this issue. ***
Comment 3 _ tboudreau 2003-11-27 21:41:12 UTC
3 things:

1.  If the timeout fails (the previous instance was killed and it's a
dead lock file), DONT print the exception to the console.  We just
fixed other issues with stack traces being printed to the console for
things users shouldn't be worry about.  It makes NetBeans look broken.

2.  You might want to pop up a dialog w/ a statusbar:

   -------------------------------------------------------
   |  Either another copy of NetBeans is using the user  |
   |  directory, or a previous run was stopped due to a  |
   |  problem (such as rebooting).  Attempting to contact|
   |  it.                                                |
   |                [progress bar]                       |
   |_____________________________________________________| 

3.  Better still would be the asynchronous approach we talked about -
if it could be done like Linux runlevels, so that basic initialization
could proceed with the SFS read-only while the socket waits.
Comment 4 Jaroslav Tulach 2003-11-28 13:19:48 UTC
CLIHandler.java revision: 1.9;

Re1: Exception is not printed.

Re2: Possible enhancement, but not requirement for arch reviews. Maybe
filed as separate issue and wait for someone who will want to
implement it.

Re3: This would be more complex than the situation really requires. We
are dealing with exception situation here that shall not be observed
by many users.
Comment 5 pzajac 2004-01-06 15:56:27 UTC
build [200301051900]
1)The dialog is shown correctly when exists lock to the user. Please
consult the content of message and button with UI. The message is too
long. The buttons are not quite correct too. It might be better to
replace title of Ok button with 'Start IDE' Cancel button with 'Exit'
title. 

2) The ConnectException might not be printed to the ide.log or output
console. See to the attachment.
Comment 6 pzajac 2004-01-06 15:57:33 UTC
Created attachment 12712 [details]
ConnectException stacktrace
Comment 7 Jaroslav Tulach 2004-01-08 10:28:48 UTC
Ad. 1: Message provided by Patrick, if you are not satisfied with it,
file another bug for him.

Ad. 2: I cannot reproduce it. I see no stacktrace. Neither in console
nor in log file.
Comment 8 pzajac 2004-01-21 15:50:05 UTC
1) #39092 issue created

2) [build 200401201900]The exception was reproduced on two machines
for the same userdir. The priority decreased to P4 because IMHO it is
not so important to remove printing of exception stacktrace to to
comandline output. I don't know anybody who works with netbeans on two
machines for the same userdir.  
Comment 9 Jaroslav Tulach 2004-01-23 11:05:05 UTC
Checking in CLIHandler.java;
/cvs/core/bootstrap/src/org/netbeans/CLIHandler.java,v  <-- 
CLIHandler.java
new revision: 1.12; previous revision: 1.11
Comment 10 pzajac 2004-02-25 11:04:22 UTC
verified