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: | ExportSnapshotAction.export() calls FileUtil.copyFile with destination folder = null | ||
---|---|---|---|
Product: | profiler | Reporter: | stwr |
Component: | Base | Assignee: | Jiri Sedlacek <jis> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | jhavlin |
Priority: | P3 | ||
Version: | 8.1 | ||
Hardware: | PC | ||
OS: | Windows 7 x64 | ||
Issue Type: | DEFECT | Exception Reporter: | 219367 |
Attachments: | stacktrace |
Description
stwr
2015-08-23 07:41:41 UTC
Created attachment 155558 [details]
stacktrace
FileUtil.copyFile called with destFolder argument set to null from o.n.m.profiler.snaptracer.impl.ExportSnapshotAction.export. Stwr, what file name did you choose for exporting? Reassigning to profiler/Base. Please evaluate. Thank you. Hello, I did not change the name and I took the suggested one. I believe it was selfsampler.n*** (4-letters extension). Do you also remember the directory into which the file was intended to be saved? Thank you very much. Yes it was the Desktop. The absolute path does not contain blanks - C:\Users\cendrowiczm\Desktop. Another related message from the log: INFO [org.openide.filesystems.FileUtil]: Parameter file was not normalized. Was ShellFolder: 0x11(class java.io.File) instead of C:\Program Files\NetBeans Dev 201508200002\ShellFolder: 0x11(class java.io.File) java.lang.IllegalArgumentException: Parameter file was not normalized. Was ShellFolder: 0x11(class java.io.File) instead of C:\Program Files\NetBeans Dev 201508200002\ShellFolder: 0x11(class java.io.File) at org.openide.filesystems.FileUtil.toFileObject(FileUtil.java:873) at org.netbeans.modules.profiler.snaptracer.impl.ExportSnapshotAction$2.run(ExportSnapshotAction.java:142) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443) at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68) at org.openide.util.lookup.Lookups.executeWith(Lookups.java:303) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2058) Thanks for investigating and providing all the details. The root cause seems to be a bug in JDK which doesn't handle special Windows folders, see JDK-8041437 resolved as wontfix. Tried several other Save file actions in NetBeans, all failed. Will just workaround the NPE in profiler and show an error dialog instead. Similar problem occurs for Snapshots Window | Export selected snapshot. See also issue #219837 and JDK-8003399. This issue is fixed in JDK 9. Integrated into 'main-silver', will be available in build *201509040002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/d8031aab1faa User: Jiri Sedlacek <jis@netbeans.org> Log: Bugfix #254624 #254555 - handle invalid filenames/folders when saving files |