Skip to content

Hub.withScope - cloning the scope fails #2323

Description

@markushi

Integration

sentry

Java Version

8

Version

unknown

Steps to Reproduce

We see two relatively large amount of SDK crashes (exported from Google Play SDK Console), both of them seem to happen when a Scope is cloned using the copy constructor.

java.lang.NullPointerException: 
  at io.sentry.Breadcrumb.<init>
  at io.sentry.Scope.<init>
  at io.sentry.Hub.pushScope
  at io.sentry.Hub.withScope
  at io.sentry.Sentry.withScope
java.util.NoSuchElementException: 
  at io.sentry.CircularFifoQueue$1.next
  at io.sentry.Scope.<init>
  at io.sentry.Hub.pushScope
  at io.sentry.Hub.withScope
  at io.sentry.Sentry.withScope

Expected Result

No crashes

Actual Result

Crashes

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions