Skip to content

NullPointerException on deleting items from an Array while mapping over it #3155

@olleolleolle

Description

@olleolleolle

We are using Actors from Celluloid.

Somehow, a program of ours has a hard time compacting an Array. (I.e. using it after we'd mapped over it, while deleting items in it.)

This crash comes when we use 'finalizers' from Celluloid. Here is the relevant file (in the version we use) for that feature:

https://github.com/celluloid/celluloid/blob/0-15-stable/lib/celluloid/actor.rb

Also: putsing the Array, also crashed JRuby.

A backtrace of running a Celluloid program on JRuby 1.7.21 and on 9.0.0.0.rc2 and on master (0f616f984ba51ccd4d8ddafc53dd8dab93b4e5dc)

snippet.rb that tries to show what we do.

Update: See comment below for reproduce case.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions