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.
This issue was reported manually by vv159170. It already has 1 duplicates Build: Oracle Solaris Studio 12.3 (2011/10/03 79f1f4dc26d0) VM: Java HotSpot(TM) Server VM, 20.0-b11, Java(TM) SE Runtime Environment, 1.6.0_25-b06 OS: SunOS User Comments: alexvsimon: click hotspot on full remote profiling demo results Stacktrace: java.lang.Exception: Should not be called from UI thread at org.netbeans.modules.cnd.utils.CndUtils.assertTrue(CndUtils.java:175) at org.netbeans.modules.cnd.utils.CndUtils.assertFalse(CndUtils.java:170) at org.netbeans.modules.cnd.utils.CndUtils.assertNonUiThread(CndUtils.java:240) at org.netbeans.modules.cnd.remote.support.RemoteUtil.getHomeDirectory(RemoteUtil.java:101) at org.netbeans.modules.cnd.remote.mapper.RemoteMirrorPathProvider.getRemoteMirror(RemoteMirrorPathProvider.java:83) at org.netbeans.modules.cnd.remote.mapper.RemotePathMap.getRemoteSyncRoot(RemotePathMap.java:577)
Created attachment 111451 [details] stacktrace
Is it relevant for 7.0.1 patch as well?
It's a gizmo issue and should be fixed in 7.0.1 patch.
I cannot consider this issue to be a patch candidate because this exception is ONLY visible if assertions are enabled; Also CndUtils.assertNonUiThread(); in RemoteUtil.getHomeDirectory() is invoked UNCONDITIONALLY. Even if home directory is cashed. (and this is the case) So UI will not be frozen... Also I was wondering to see this implementation of RemoteUtil.getHomeDirectory(), because home directory is available in HostInfo.getUserDir().. IMO it's better to use this info instead of invoking an external process.... So. My plan is: - will remove 701patch2-candidate kw; - will fix HostInfo.getUserDir() in cnd-main; - will move DataProvider subscriptions out of AWT in dlight once it is moved to sputnik
Created attachment 111590 [details] proposed patch for replacing getHomeDirectory in remoteUtils
Created attachment 112004 [details] stacktrace
Created attachment 113442 [details] Proposed fix
Created attachment 113443 [details] Proposed fix, take 2. Less changes, but less clear interface In previous fix, MirrorPathProvider.getRemoteMirror throws exception in the case it can not determine remote user home. But call graph shows that all clients just use null in this case. In this fix I removed exceptions, MirrorPathProvider.getRemoteMirror returns null. As a result, less code is changed; and no NPE in existent code introduced.
Fix that combines both approaches is pushed into cnd-main http://hg.netbeans.org/cnd-main/rev/cde7e6fb1eab
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/cde7e6fb1eab User: Vladimir Kvashin <vkvashin@netbeans.org> Log: fixed #203038 - Exception: Should not be called from UI thread