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.
Remote attach for AnagramGame application (Memory Liveness, Record Stack Traces, each 20 object allocations) from Product Version: NetBeans IDE Dev (Build 200709030000) Java: 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b05 System: SunOS version 5.10 running on x86; ISO646-US; en (nb) to Java: 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b06 System: Windows XP version 5.1 running on x86; Cp1251; ru_RU (nb) using C:\Work\Temp\RemotePack\bin>profile-16.bat -jar C:\Work\Temp\RemotePack\bin\anagrams.jar sometimes produces the following ClassCastException on Profiler side: java.lang.ClassCastException: com.sun.tools.profiler.wireprotocol.Response cannot be cast to com.sun.tools.profiler.wireprotocol.VMPropertiesResponse at com.sun.tools.profiler.ProfilerClient.connectToServer(ProfilerClient.java:1445) ... This issue is random (~15% reproducible)
Created attachment 48003 [details] Exception
as this issue is very difficult to reproduce i added an error reporting code that identifies the request/response mismatch and will print additional details about the response, essential to pinpointing the erroneous code.
i'm marking this incomplete till we can get logging data showing what exactly is causing the request/response mix-up
Please also use -Dcom.sun.tools.profiler.wireprotocol.WireIO=true for both profiled application and netbeans.
Using direct connect i got: SEVERE: Received org.netbeans.lib.profiler.wireprotocol.Response(NO TYPEOk, yes) instead of VMPropertiesResponse java.lang.ClassCastException: org.netbeans.lib.profiler.wireprotocol.Response cannot be cast to org.netbeans.lib.profiler.wireprotocol.VMPropertiesResponse at org.netbeans.lib.profiler.ProfilerClient.connectToServer(ProfilerClient.java:1651) at org.netbeans.lib.profiler.ProfilerClient.establishConnectionWithServer(ProfilerClient.java:780) at org.netbeans.lib.profiler.TargetAppRunner.initiateSession(TargetAppRunner.java:340) at org.netbeans.modules.profiler.NetBeansProfiler$2.doInBackground(NetBeansProfiler.java:882) at org.netbeans.lib.profiler.ui.SwingWorker$2.run(SwingWorker.java:113) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)
sorry. (direct connect & beta2)
Removing incomplete flag due to user comment.
However I was not able to reproduce it profiling from Product Version: NetBeans IDE 6.0 (Build 200711261600) Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b05 System: SunOS version 5.10 running on x86; ISO646-US; en (nb) to Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b05 System: Windows XP Probably due to low reproducibility
I still can not get the error state. Closing this issue as "works for me". If you will experience this problem again, please reopen the issue.