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.

Bug 253897 - [81cat] Test project MemoryMonitor doesn't work.
Summary: [81cat] Test project MemoryMonitor doesn't work.
Status: RESOLVED FIXED
Alias: None
Product: qa
Classification: Unclassified
Component: Test Specifications (show other bugs)
Version: 8.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: issues@qa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-28 11:49 UTC by -Silver-
Modified: 2015-08-28 14:20 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Should be the thread dump (47.44 KB, text/plain)
2015-07-29 11:38 UTC, -Silver-
Details
How the memory monitor appears (16.46 KB, image/png)
2015-07-29 11:38 UTC, -Silver-
Details
Tread dump (should be the correct one) (9.47 KB, text/plain)
2015-07-30 09:28 UTC, -Silver-
Details

Note You need to log in before you can comment on or make changes to this bug.
Description -Silver- 2015-07-28 11:49:09 UTC
I'm almost sure that this is not the correct section to put this bug but I don't find the correct one.
Doing the netcat81 test: 
Debugger part2 functionality -> Visual debugging -> Component breakpoints 
is asked to download the MemoryMonitor project and debug it. But the MemoryMonitor application doesn't works well and when I debug it and try to do the Gui Screenshot via Netbeans it freezes and slow down all till I don't terminate it.
Comment 1 Martin Entlicher 2015-07-29 08:16:05 UTC
Can you please elaborate? I did not encounter anything like that. Can you provide some thread dumps when the freeze occurs?
Comment 2 -Silver- 2015-07-29 11:37:54 UTC
Hi,
I attached what should be the thread dump (I'm not sure please advice if I attached the wrong stuff).
I attached also a screenshot of how the memory  monitor appears.

To be more precise it is the memory monitor the freezes and that must be terminated.

When I start the memory monitor debug it shows a white empty JFrame for a wile, after some time it changes and show the grid as shown into the attached screenshot.

If I try to execute the Gui Snapshot functionality of NB it takes a lot of time to be executed end in the end it shows only the grid as in the application JFrame.

The application JFrame seems unresponsive, if I click on the close button on the right upper corner nothing occurs, sometime if I put another window in front of it, it becomes completely black.

Best regards,


--
Giuseppe Tino
Comment 3 -Silver- 2015-07-29 11:38:00 UTC
Created attachment 155005 [details]
Should be the thread dump
Comment 4 -Silver- 2015-07-29 11:38:07 UTC
Created attachment 155006 [details]
How the memory monitor appears
Comment 5 Martin Entlicher 2015-07-30 07:05:24 UTC
The attached file is messages.log file, it is not a thread dump. Thread dump contains stack traces of running threads, it shows what the application is doing right now.
To get a thread dump, run jps (<java home>/bin/jps) first to see the PID of the Java process (MemoryMonitor) and then jstack <pid> (<java home>/bin/jstack) to get the thread dump.

Which test specification are you following and where did you get the MemoryMonitor application from?

I've found following test spec.:
http://services.netbeans.org/synergy/client/app/#/specification/287/v/2
which uses Anagram Game application.
It's fine to use a different application, the Gui Snapshot functionality should work with any Java GUI application, but if the application itself has problems with responsiveness, it may not be possible to retrieve the GUI snapshot.
Comment 6 -Silver- 2015-07-30 09:28:30 UTC
Created attachment 155040 [details]
Tread dump (should be the correct one)
Comment 7 -Silver- 2015-07-30 09:42:10 UTC
Hi Martin,
sorry for the mistake with the thread dump, the new one that I attached should be the correct one.

I'm referring to this test:
http://services.netbeans.org/synergy/client/app/#/case/1030/suite/1645/v/1

I agree with you about the fact that should be the Memory Monitor Application the cause of the issue and not Netbeans but considering that it is the application downloaded to follow the test case could you have a look and confirm that the application doesn't work. 
In that case I could file a bug to qa->test to notify a broken test spec.

Thanks and best regards,


--
Giuseppe Tino
Comment 8 Martin Entlicher 2015-07-30 10:18:25 UTC
Thanks for the info.
The thread dump shows that the application is busy with painting.
I've downloaded the app and verified that it's unusable.
Moving the issue to QA...
Comment 9 Martin Entlicher 2015-07-30 10:21:49 UTC
The loop:
for ( ; i < MemUsage ; i++) { ...
is the problem. There are too many iterations.
Comment 10 Jiri Kovalsky 2015-08-28 14:20:33 UTC
Fixed the MemoryMonitor sample project. Test specification updated.