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

[pulsar-next] MarkerLayer tries to delete a property of a frozen object #6

Open
5 tasks done
savetheclocktower opened this issue Dec 24, 2024 · 0 comments
Open
5 tasks done
Labels
bug Something isn't working

Comments

@savetheclocktower
Copy link

Thanks in advance for your bug report!

  • Have you reproduced issue in safe mode?
  • Have you used the debugging guide to try to resolve the issue?
  • Have you checked our FAQs to make sure your question isn't answered there?
  • Have you checked to make sure your issue does not already exist?
  • Have you checked you are on the latest release of Pulsar?

What happened?

I'm investigating test failures in the spec suite for PulsarNext, starting with TextEditor (because I am a masochist).

One failure seems to be the result of a long-standing bug that may only be causing a test failure now because of a difference in V8 — but that's just my current theory:

  1. During editor serialization, we serialize the buffer and all of its markers. MarkerLayer::getSnapshot is called; it creates an object containing some state and freezes it.
  2. Later, during deserialization, MarkerLayer::deserialize iterates over those frozen objects and calls delete markerState.range on each one before creating a new range.
  3. As far as I can tell, this property deletion has always failed! But on stable Pulsar it fails silently, whereas on PulsarNext it throws an exception.

Since the code seems to work just fine even though the deletion fails, the fix is not to attempt the deletion in the first place!

I'll likely fix this with a PR, but I'm noting it here so I don't forget.

Pulsar version

PulsarNext (Electron 30.0.9)

Which OS does this happen on?

❓ Other(Please specify in the OS details field below)

OS details

any

Which CPU architecture are you running this on?

Apple M-series

What steps are needed to reproduce this?

Run the TextEditor -> when the editor is deserialized -> it restores selections and folds based on markers in the buffer spec.

Additional Information:

No response

@savetheclocktower savetheclocktower added the bug Something isn't working label Dec 24, 2024
savetheclocktower added a commit to savetheclocktower/text-buffer that referenced this issue Dec 24, 2024
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

No branches or pull requests

1 participant