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.
Created attachment 105253 [details] netbeans log Build: NetBeans IDE Dev 201101210001 java.lang.NullPointerException at org.openide.text.CloneableEditorSupport$Listener.run(CloneableEditorSupport.java:3000) [catch] at org.openide.text.CloneableEditorSupport$3.doRun(CloneableEditorSupport.java:710) at org.openide.text.CloneableEditorSupport$3.run(CloneableEditorSupport.java:677) at org.netbeans.editor.GuardedDocument.runAtomic(GuardedDocument.java:314) at org.openide.text.NbDocument.runAtomic(NbDocument.java:422) at org.openide.text.CloneableEditorSupport$3.doRun(CloneableEditorSupport.java:687) at org.openide.text.CloneableEditorSupport$3.run(CloneableEditorSupport.java:677) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1424) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1968) Steps to reproduce: - activate C/C++ support, - go to services pane > C/C++ development hosts, set up a host - via context menu of the newly added host, add to Favorites some its directory - try to open any file in this dir in Favorites. Another issue #194326 was also introduced by adding "Add to favorites" functionality to C/C++ development hosts context menu.
It seems the problem is related to usage of remote fs. The code that causes this is import org.netbeans.modules.remote.spi.FileSystemProvider; ... FileSystem fs = FileSystemProvider.getFileSystem(env); FileObject fo = fs.getRoot(); if (!Favorites.getDefault().isInFavorites(fo)) { try { Favorites.getDefault().add(fo); ... and trying to open a file on the remote fs in the editor causes this exception. I am trying to find out who owns the remote fs ...
I suppose Vladimir Kvashin(CC-ing) can help since hi is one of the authors and I believe the owner.
The problem is in org.netbeans.modules.remote.impl.fs.RemoteDirectory in method: Date lastModified(RemoteFileObjectBase child) { Entry childEntry = getChildEntry(child); if (childEntry != null) { String timestamp = childEntry.getTimestamp(); try { if (timestamp != null) { int dot = timestamp.indexOf('.'); // NOI18N if (dot > 0) { int space = timestamp.indexOf(' ', dot); // NOI18N if (space > 0) { timestamp = timestamp.substring(0,dot)+timestamp.substring(space); } } return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z").parse(timestamp); // NOI18N } } catch (ParseException ex) { } } >>>>> return null; } Just put a break point where I put the >>>>> and debug why your ignored ParseException happened.
fix: http://hg.netbeans.org/cnd-main/rev/a97151ccf30c test: http://hg.netbeans.org/cnd-main/rev/6271d0d4389a
Integrated into 'main-golden', will be available in build *201101280000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/a97151ccf30c User: Vladimir Kvashin <vkvashin@netbeans.org> Log: fix for #194598 - RemoteDirectory.lastModified returns null
INFO [remote.support.logger]: Error parsing date string for /Users/juli/Downloads/messages-1.log.1: Jan 18 06:42:39 2011 java.text.ParseException: Unparseable date: "Jan 18 06:42:39 2011" at java.text.DateFormat.parse(DateFormat.java:337) [catch] at org.netbeans.modules.remote.impl.fs.RemoteDirectory.lastModified(RemoteDirectory.java:796) Steps to reproduce: - activate C/C++ support, - go to services pane > C/C++ development hosts, set up a host - via context menu of the newly added host, add to Favorites some its directory - try to open any file in this dir in Favorites. P1 since prevents from fixing P1 issue #194326. Another strange thing is: WARNING [org.openide.util.io.NbObjectOutputStream]: Serializable class org.netbeans.modules.remote.impl.fs.RemoteFileObjectBase does not declare serialVersionUID field. Encountered while storing: [org.openide.windows.TopComponent$Replacer, java.lang.Short, java.lang.Number, org.openide.windows.CloneableOpenSupport$Listener, org.openide.windows.CloneableTopComponent$Ref, org.openide.loaders.DefaultES$Environment, org.openide.text.DataEditorSupport$Env, org.openide.loaders.OpenSupport$Env, org.openide.loaders.DataObject$Replace, org.netbeans.modules.remote.impl.fs.RemotePlainFile] See also http://www.netbeans.org/issues/show_bug.cgi?id=19915 [may have been writing Windows2Local/Components/tmp1.settings] INFO [org.netbeans.core.windows.persistence]: TopComponent tmp1 is not serializable. java.io.NotSerializableException: org.netbeans.modules.nativeexecution.ExecutionEnvironmentImpl at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518) Please, take a look at it as well.
Created attachment 105518 [details] messages.log
As I see, your remote system is Mac, right? Mac isn't supported as a remote platform. However, this exception should sure be fixed.
fixed in cnd-main http://hg.netbeans.org/cnd-main/rev/fa6ad5dba794
(In reply to comment #8) > As I see, your remote system is Mac, right? > Mac isn't supported as a remote platform. > > However, this exception should sure be fixed. If Mac is not supported as remote system (I assume with "smart copy"), then user must be at least warned or at most prohibited of doing wrong things.
Just FYI, serialization related warnings fixed as well: http://hg.netbeans.org/cnd-main/rev/b0b3c271e0ba
Integrated into 'main-golden', will be available in build *201102010000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/fa6ad5dba794 User: Vladimir Kvashin <vkvashin@netbeans.org> Log: fixed #194598 - RemoteDirectory.lastModified: Error parsing date string
Thanks! There is no exception anymore, but something is still wrong since all the files from my Mac machine have modification time Thu Jan 01 03:00:00 MSK 1970.
Yulia, are you going to reopen one and the same P1 issue in the case of ANY problem is remote file system? I'd also like to note that Mac isn't a supported remote platform. I just filed a separate issue 194983 for this.
If the newly filed issue 194983 is a stopper for fixing issue 194326 (which is unlikely so), please let me know, so I'll fix it ASAP.
Vladimir, I'm trying to fix 194326 and test the fix using Mac as the remote system. Could you please point me at the place where it is written that Mac is not supported remote platform. I reopened this issue since the current behavior seems to be a result of your fix for this bug so I supposed fix wasn't clean enough. Possibly P1 is too high for this issue, I should downgraded it. But the priority is still high since files are invalid for search with such a date so it will lead to another P1 for search soon.
As to supported platforms, here is a user document that states it is Solaris and Linux http://netbeans.org/kb/docs/cnd/remotedev-tutorial.html#intro I can refer to QA, bit I don't remember NB internal docs about that. And I'm going to fix issue 194326 in any case, the question is in priority.