Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: iOS crash with Thread 1: Assertion failed: the object is inited but there are still waiters #3528

Closed
efstathiosntonas opened this issue Jun 14, 2024 · 6 comments · Fixed by #3530
Labels
bug 🪲 Something isn't working

Comments

@efstathiosntonas
Copy link

efstathiosntonas commented Jun 14, 2024

Mapbox Implementation

Mapbox

Mapbox Version

11.0.0

React Native Version

0.74.2

Platform

iOS

@rnmapbox/maps version

10.1.26

Standalone component to reproduce

import React from 'react';
import {
  MapView,
  ShapeSource,
  LineLayer,
  Camera,
} from '@rnmapbox/maps';

const aLine = {
  type: 'LineString',
  coordinates: [
    [-74.00597, 40.71427],
    [-74.00697, 40.71527],
  ],
};

class BugReportExample extends React.Component {
  render() {
    return (
      <MapView style={{flex: 1}}>
        <Camera centerCoordinate={[-74.00597, 40.71427]} zoomLevel={14} />
        <ShapeSource id="idStreetLayer" shape={aLine}>
          <LineLayer id="idStreetLayer" />
        </ShapeSource>
      </MapView>
    );
  }
}

Observed behavior and steps to reproduce

After upgrading to 10.1.26 it throws:

Thread 1: Assertion failed: the object is inited but there are still waiters

Screenshot 2024-06-14 at 09 37 17

related PR

let me know if you need full trace

Expected behavior

No response

Notes / preliminary analysis

No response

Additional links and references

No response

@efstathiosntonas efstathiosntonas added the bug 🪲 Something isn't working label Jun 14, 2024
@mfazekas
Copy link
Contributor

@efstathiosntonas thanks are you using new arch on iOS?

@efstathiosntonas
Copy link
Author

@mfazekas Hi, no, I'm on Paper

@mfazekas
Copy link
Contributor

@efstathiosntonas I'm not able to reproduce the issue:

Your stack trace
image

Looks like infinite recursion.

On the other hand I do see that we reenter addToMap and probably I'm not handling it correctly:

subview.reactSubviews()?.forEach { self.addToMap($0) }

@efstathiosntonas
Copy link
Author

efstathiosntonas commented Jun 14, 2024

@mfazekas thanks for the update, this is my component, it works fine on 10.1.25:

Click me

@mfazekas
Copy link
Contributor

@efstathiosntonas can you try the main branch it should be fixed there

@efstathiosntonas
Copy link
Author

@mfazekas works as a charm, thank your for the fast fix! keep it up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants