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.
Summary: | Reload in target platform always starts a fresh test instance | ||
---|---|---|---|
Product: | platform | Reporter: | gregersen <gregersen> |
Component: | Launchers&CLI | Assignee: | Jaroslav Tulach <jtulach> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | dds.dhawal, jglick, mmirilovic |
Priority: | P1 | Keywords: | REGRESSION |
Version: | 7.0 | ||
Hardware: | PC | ||
OS: | Windows 7 | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
gregersen
2011-02-01 07:25:01 UTC
True, the lock file is not locked by NIO. I am not sure way shall that prevent creation of RandomAccessFile however. Btw. if the Ant task is trying to find out whether lock file is still "live", then it is now much easier: just find out if it can be locked - if so, it is not "live" anymore. It's not an issue with Ant. The issue is that the CLIHandler in the new instance cannot read host and port information from the lock file (throws IllegalAccessException), thus preventing communication between the two instances causing reload in target platform to fail, and a new instance to fully start instead. Right, this has nothing to do with any special Ant code AFAIK; the reload target simply runs the NB launcher in the usual way, on the same userdir, but with "--reload something.jar" on the command line. I don't have a copy of W7 to reproduce with, but if true, it would mean that e.g. ...\bin\netbeans --userdir c:\running\user\dir --open c:\some\file (i.e. what is run by the NB shell association) would also fail. On windows, when a process has FileLock on some file, other processes cannot read it! Yields IOException("The process cannot access the file because another process has locked a portion of the file"). This is different than on Unix! I want to lock the file and still allow anyone to read it, how can I do it on windows? Fixed in ergonomics#3364ee25de93 Btw. propagation of fixes from ergonomics is blocked by bug 195029 and until that one is fixed (really fixed, not just marked invalid), ergonomics changes are not going to propagate. Integrated into 'main-golden', will be available in build *201102090000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/3364ee25de93 User: Jaroslav Tulach <jtulach@netbeans.org> Log: #194937: Windows llocks are mandatory - they prevent reading of the locked region. Lock just a single byte outside of the file's actual length *** Bug 195403 has been marked as a duplicate of this bug. *** (In reply to comment #4) > On windows, when a process has FileLock on some file, other processes cannot > read it! Yields IOException("The process cannot access the file because another > process has locked a portion of the file"). This is different than on Unix! I > want to lock the file and still allow anyone to read it, how can I do it on > windows? That would be the DENYWRITE filemode... (0x20) Was there any specific reasons not to include this fix in Beta 2? No, I've just forgotten to do it. I can put it on some update center for beta2, if Marian tells me to do so. No plan to do any patch for Beta 2, wait for final build, or just use dailies. The quality of dailies is going to rise, the stabilization phase already started. Pity this was not a sign of comming "Multiple IDE windows" feature, which is sometimes the reason of our devs choosing IDEA instead of NetBeans (when leaving Eclipse for good)... |