United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 7171690 legacy_lifecycle applets get destroyed prematurely
7171690 : legacy_lifecycle applets get destroyed prematurely

Details
Type:
Bug
Submit Date:
2012-05-25
Status:
Resolved
Updated Date:
2013-04-20
Project Name:
JDK
Resolved Date:
2012-05-30
Component:
deploy
OS:
generic
Sub-Component:
plugin
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
8
Fixed Versions:
8

Related Reports
Backport:
Backport:
Backport:
Backport:
Backport:
Backport:

Sub Tasks

Description
This is the shadowing CR for https://bug.oraclecorp.com/pls/bug/webbug_print.show?c_rptno=14080741

Summary:
If applet with legacy_lifecycle=true trigger agressive heap memory allocation to a level close to max memory value (eventhough the actual memory usage is still low), and user navigate away from the page containing the applet, the applet will be destroyed prematurely.

Test case:
- Make sure java console is show and tracing is set at top level (5/all).
- http://aubing.de.oracle.com/applet-destroy/hod_testcase.html 
 (ignore the third applet class not found error)
- Click on buttons until total mem value is close or equal to max mem value.
- Move away from the page to trigger applet stop call.  Will see on the console applet is destroy.

Expect: applet not destroyed and not reloaded but reused from legacy lifecycle applet cache.

Test case files:
ftp://bugftp.us.oracle.com/upload/bug_14/bug14080741

                                    

Comments
EVALUATION

Memory pressure should be calculate based on aproximation of currently used memory which is:
pressure = (runtime.totalMemory - runtime.freeMemory) / runtime.maxMemory
There is disclaimer that the "currently used" memory is only approximation as it include garbage uncollected memory, however the value is still closer to actual and not worse than the totalMemory.
                                     
2012-05-25



Hardware and Software, Engineered to Work Together