You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GnoVM errors with Data: interface conversion: gnolang.RefValue is not gnolang.Object: missing method DecRefCount when trying to remove an element from a slice of pointers to structs. Check out the txtar below to reproduce.
Closesgnolang#2449.
I believe the bug was introduced by gnolang#2255. Previously, if the type of
`tv.V` in `GetFirstObject` was a `PointerValue`, it the `Base` would
have been nil in the scenario producing this bug. Now that `Base` can
never be nil for a `PointerValue`, the nil base check has been removed.
We do however need to account for a new scenario where the `Base` is a
`RefValue`, a type that does implement the `Object` interface. In the
case where the base is a `RefValue`, first resolve it by calling
`store.GetObject`.
<!-- please provide a detailed description of the changes made in this
pull request. -->
<details><summary>Contributors' checklist...</summary>
- [x] Added new tests, or not needed, or not feasible
- [x] Provided an example (e.g. screenshot) to aid review or the PR is
self-explanatory
- [x] Updated the official documentation or not needed
- [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message
was included in the description
- [x] Added references to related issues and PRs
- [x] Provided any useful hints for running manual tests
- [x] Added new benchmarks to [generated
graphs](https://gnoland.github.io/benchmarks), if any. More info
[here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md).
</details>
Description
GnoVM errors with
Data: interface conversion: gnolang.RefValue is not gnolang.Object: missing method DecRefCount
when trying to remove an element from a slice of pointers to structs. Check out the txtar below to reproduce.Below test fails at calling
DelEvent
:Found while working on #2372
The text was updated successfully, but these errors were encountered: