You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Xiao-Feng Li (JIRA)" <ji...@apache.org> on 2007/05/24 03:36:16 UTC

[jira] Created: (HARMONY-3952) [drlvm[kernel_class] java.lang.ThreadGroup should check if a thread is NULL before calling its method

[drlvm[kernel_class] java.lang.ThreadGroup should check if a thread is NULL before calling its method
-----------------------------------------------------------------------------------------------------

                 Key: HARMONY-3952
                 URL: https://issues.apache.org/jira/browse/HARMONY-3952
             Project: Harmony
          Issue Type: Bug
          Components: DRLVM
         Environment: all
            Reporter: Xiao-Feng Li


java.lang.ThreadTest.testGetAllStackTraces failed with a NullPointerException. The following is the log:

Test: testGetAllStackTraces
Class: java.lang.ThreadTest

java.lang.NullPointerException
 at java.lang.ThreadGroup.activeCount(ThreadGroup.java:130)
 at java.lang.ThreadGroup.activeCount(ThreadGroup.java:136)
 at java.lang.Thread.getAllStackTraces(Thread.java:447)
 at java.lang.ThreadTest.testGetAllStackTraces(ThreadTest.java:1011)
 at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
 at java.lang.reflect.Method.invoke(Method.java:382)
 at junit.framework.TestCase.runTest(TestCase.java:164)
 at junit.framework.TestCase.runBare(TestCase.java:130)
 at junit.framework.TestResult$1.protect(TestResult.java:106)
 at junit.framework.TestResult.runProtected(TestResult.java:124)
 at junit.framework.TestResult.run(TestResult.java:109)
 at junit.framework.TestCase.run(TestCase.java:120)
 at junit.framework.TestSuite.runTest(TestSuite.java:230)
 at junit.framework.TestSuite.run(TestSuite.java:225)
 at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:297)
 at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:672)
 at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:546)

The reason is, the thread object enumerated from WeakhashMap might be null. We should have a null check before invoking its method. This is the conclusion we made in the discussion of HARMONY-3883.

I found there are more than one place in ThreadGroup that have the similar code needing examination.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-3952) [drlvm][kernel] java.lang.ThreadGroup should check if a thread is NULL before calling its method

Posted by "Gregory Shimansky (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3952?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gregory Shimansky updated HARMONY-3952:
---------------------------------------

    Summary: [drlvm][kernel] java.lang.ThreadGroup should check if a thread is NULL before calling its method  (was: [drlvm[kernel] java.lang.ThreadGroup should check if a thread is NULL before calling its method)

> [drlvm][kernel] java.lang.ThreadGroup should check if a thread is NULL before calling its method
> ------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3952
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3952
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: all
>            Reporter: Xiao-Feng Li
>
> java.lang.ThreadTest.testGetAllStackTraces failed with a NullPointerException. The following is the log:
> Test: testGetAllStackTraces
> Class: java.lang.ThreadTest
> java.lang.NullPointerException
>  at java.lang.ThreadGroup.activeCount(ThreadGroup.java:130)
>  at java.lang.ThreadGroup.activeCount(ThreadGroup.java:136)
>  at java.lang.Thread.getAllStackTraces(Thread.java:447)
>  at java.lang.ThreadTest.testGetAllStackTraces(ThreadTest.java:1011)
>  at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
>  at java.lang.reflect.Method.invoke(Method.java:382)
>  at junit.framework.TestCase.runTest(TestCase.java:164)
>  at junit.framework.TestCase.runBare(TestCase.java:130)
>  at junit.framework.TestResult$1.protect(TestResult.java:106)
>  at junit.framework.TestResult.runProtected(TestResult.java:124)
>  at junit.framework.TestResult.run(TestResult.java:109)
>  at junit.framework.TestCase.run(TestCase.java:120)
>  at junit.framework.TestSuite.runTest(TestSuite.java:230)
>  at junit.framework.TestSuite.run(TestSuite.java:225)
>  at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:297)
>  at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:672)
>  at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:546)
> The reason is, the thread object enumerated from WeakhashMap might be null. We should have a null check before invoking its method. This is the conclusion we made in the discussion of HARMONY-3883.
> I found there are more than one place in ThreadGroup that have the similar code needing examination.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-3952) [drlvm[kernel] java.lang.ThreadGroup should check if a thread is NULL before calling its method

Posted by "Gregory Shimansky (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3952?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gregory Shimansky updated HARMONY-3952:
---------------------------------------

    Summary: [drlvm[kernel] java.lang.ThreadGroup should check if a thread is NULL before calling its method  (was: [drlvm[kernel_class] java.lang.ThreadGroup should check if a thread is NULL before calling its method)

> [drlvm[kernel] java.lang.ThreadGroup should check if a thread is NULL before calling its method
> -----------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3952
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3952
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: all
>            Reporter: Xiao-Feng Li
>
> java.lang.ThreadTest.testGetAllStackTraces failed with a NullPointerException. The following is the log:
> Test: testGetAllStackTraces
> Class: java.lang.ThreadTest
> java.lang.NullPointerException
>  at java.lang.ThreadGroup.activeCount(ThreadGroup.java:130)
>  at java.lang.ThreadGroup.activeCount(ThreadGroup.java:136)
>  at java.lang.Thread.getAllStackTraces(Thread.java:447)
>  at java.lang.ThreadTest.testGetAllStackTraces(ThreadTest.java:1011)
>  at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
>  at java.lang.reflect.Method.invoke(Method.java:382)
>  at junit.framework.TestCase.runTest(TestCase.java:164)
>  at junit.framework.TestCase.runBare(TestCase.java:130)
>  at junit.framework.TestResult$1.protect(TestResult.java:106)
>  at junit.framework.TestResult.runProtected(TestResult.java:124)
>  at junit.framework.TestResult.run(TestResult.java:109)
>  at junit.framework.TestCase.run(TestCase.java:120)
>  at junit.framework.TestSuite.runTest(TestSuite.java:230)
>  at junit.framework.TestSuite.run(TestSuite.java:225)
>  at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:297)
>  at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:672)
>  at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:546)
> The reason is, the thread object enumerated from WeakhashMap might be null. We should have a null check before invoking its method. This is the conclusion we made in the discussion of HARMONY-3883.
> I found there are more than one place in ThreadGroup that have the similar code needing examination.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (HARMONY-3952) [drlvm][kernel] java.lang.ThreadGroup should check if a thread is NULL before calling its method

Posted by "Xiao-Feng Li (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3952?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Xiao-Feng Li closed HARMONY-3952.
---------------------------------

    Resolution: Fixed
      Assignee: Xiao-Feng Li

HARMONY-3883 is fixed correctly finally. Now this issue is no longer existent.

> [drlvm][kernel] java.lang.ThreadGroup should check if a thread is NULL before calling its method
> ------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3952
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3952
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: all
>            Reporter: Xiao-Feng Li
>         Assigned To: Xiao-Feng Li
>
> java.lang.ThreadTest.testGetAllStackTraces failed with a NullPointerException. The following is the log:
> Test: testGetAllStackTraces
> Class: java.lang.ThreadTest
> java.lang.NullPointerException
>  at java.lang.ThreadGroup.activeCount(ThreadGroup.java:130)
>  at java.lang.ThreadGroup.activeCount(ThreadGroup.java:136)
>  at java.lang.Thread.getAllStackTraces(Thread.java:447)
>  at java.lang.ThreadTest.testGetAllStackTraces(ThreadTest.java:1011)
>  at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
>  at java.lang.reflect.Method.invoke(Method.java:382)
>  at junit.framework.TestCase.runTest(TestCase.java:164)
>  at junit.framework.TestCase.runBare(TestCase.java:130)
>  at junit.framework.TestResult$1.protect(TestResult.java:106)
>  at junit.framework.TestResult.runProtected(TestResult.java:124)
>  at junit.framework.TestResult.run(TestResult.java:109)
>  at junit.framework.TestCase.run(TestCase.java:120)
>  at junit.framework.TestSuite.runTest(TestSuite.java:230)
>  at junit.framework.TestSuite.run(TestSuite.java:225)
>  at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:297)
>  at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:672)
>  at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:546)
> The reason is, the thread object enumerated from WeakhashMap might be null. We should have a null check before invoking its method. This is the conclusion we made in the discussion of HARMONY-3883.
> I found there are more than one place in ThreadGroup that have the similar code needing examination.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.