You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Jesse Wilson (JIRA)" <ji...@apache.org> on 2009/07/20 23:43:14 UTC

[jira] Created: (HARMONY-6277) Timer's finalizer throws an NPE if the Timer wasn't constructed properly

Timer's finalizer throws an NPE if the Timer wasn't constructed properly
------------------------------------------------------------------------

                 Key: HARMONY-6277
                 URL: https://issues.apache.org/jira/browse/HARMONY-6277
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
    Affects Versions: 5.0M10
         Environment: SVN Revision: 794879
            Reporter: Jesse Wilson
            Priority: Minor
         Attachments: Timer_newFinalizer.patch

The following call creates a Timer with no associated thread:
  new Timer(null, true);
When that timer is finalized, it's finalization helper object fails with a NullPointerException, because there's no Thread assigned to impl.

The attached patch only initializes the finalization helper if the thread is created successfully. Unfortunately I couldn't come up with a reasonable test case for this. In Android, exceptions that occur during finalization result in stacktraces in the system log, which is how I detected this problem.

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


[jira] Closed: (HARMONY-6277) Timer's finalizer throws an NPE if the Timer wasn't constructed properly

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

Nathan Beyer closed HARMONY-6277.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 5.0M11

I've applied a modified version of your patch, along with a change to a generated names for the threads based on RI behavior. The change was applied at r796142. Please verify that it's okay.

> Timer's finalizer throws an NPE if the Timer wasn't constructed properly
> ------------------------------------------------------------------------
>
>                 Key: HARMONY-6277
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6277
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>    Affects Versions: 5.0M10
>         Environment: SVN Revision: 794879
>            Reporter: Jesse Wilson
>            Assignee: Nathan Beyer
>            Priority: Minor
>             Fix For: 5.0M11
>
>         Attachments: Timer_newFinalizer.patch
>
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> The following call creates a Timer with no associated thread:
>   new Timer(null, true);
> When that timer is finalized, it's finalization helper object fails with a NullPointerException, because there's no Thread assigned to impl.
> The attached patch only initializes the finalization helper if the thread is created successfully. Unfortunately I couldn't come up with a reasonable test case for this. In Android, exceptions that occur during finalization result in stacktraces in the system log, which is how I detected this problem.

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


[jira] Assigned: (HARMONY-6277) Timer's finalizer throws an NPE if the Timer wasn't constructed properly

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

Nathan Beyer reassigned HARMONY-6277:
-------------------------------------

    Assignee: Nathan Beyer

> Timer's finalizer throws an NPE if the Timer wasn't constructed properly
> ------------------------------------------------------------------------
>
>                 Key: HARMONY-6277
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6277
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>    Affects Versions: 5.0M10
>         Environment: SVN Revision: 794879
>            Reporter: Jesse Wilson
>            Assignee: Nathan Beyer
>            Priority: Minor
>         Attachments: Timer_newFinalizer.patch
>
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> The following call creates a Timer with no associated thread:
>   new Timer(null, true);
> When that timer is finalized, it's finalization helper object fails with a NullPointerException, because there's no Thread assigned to impl.
> The attached patch only initializes the finalization helper if the thread is created successfully. Unfortunately I couldn't come up with a reasonable test case for this. In Android, exceptions that occur during finalization result in stacktraces in the system log, which is how I detected this problem.

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


[jira] Updated: (HARMONY-6277) Timer's finalizer throws an NPE if the Timer wasn't constructed properly

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

Jesse Wilson updated HARMONY-6277:
----------------------------------

    Attachment: Timer_newFinalizer.patch

> Timer's finalizer throws an NPE if the Timer wasn't constructed properly
> ------------------------------------------------------------------------
>
>                 Key: HARMONY-6277
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6277
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>    Affects Versions: 5.0M10
>         Environment: SVN Revision: 794879
>            Reporter: Jesse Wilson
>            Priority: Minor
>         Attachments: Timer_newFinalizer.patch
>
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> The following call creates a Timer with no associated thread:
>   new Timer(null, true);
> When that timer is finalized, it's finalization helper object fails with a NullPointerException, because there's no Thread assigned to impl.
> The attached patch only initializes the finalization helper if the thread is created successfully. Unfortunately I couldn't come up with a reasonable test case for this. In Android, exceptions that occur during finalization result in stacktraces in the system log, which is how I detected this problem.

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


[jira] Commented: (HARMONY-6277) Timer's finalizer throws an NPE if the Timer wasn't constructed properly

Posted by "Jesse Wilson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-6277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12733840#action_12733840 ] 

Jesse Wilson commented on HARMONY-6277:
---------------------------------------

Looks good to me.

> Timer's finalizer throws an NPE if the Timer wasn't constructed properly
> ------------------------------------------------------------------------
>
>                 Key: HARMONY-6277
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6277
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>    Affects Versions: 5.0M10
>         Environment: SVN Revision: 794879
>            Reporter: Jesse Wilson
>            Assignee: Nathan Beyer
>            Priority: Minor
>             Fix For: 5.0M11
>
>         Attachments: Timer_newFinalizer.patch
>
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> The following call creates a Timer with no associated thread:
>   new Timer(null, true);
> When that timer is finalized, it's finalization helper object fails with a NullPointerException, because there's no Thread assigned to impl.
> The attached patch only initializes the finalization helper if the thread is created successfully. Unfortunately I couldn't come up with a reasonable test case for this. In Android, exceptions that occur during finalization result in stacktraces in the system log, which is how I detected this problem.

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