Cetus icon indicating copy to clipboard operation
Cetus copied to clipboard

Broken bookmarks tab

Open hazyone opened this issue 2 years ago • 5 comments

Hey! :) I've found, that I can't use watch for my bookmarks and also I can't delete them on the latest master.

I've got an error:

init.js:886 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'sendExtensionMessage')
    at stacktraceCallback (init.js:886:40)
    at init.js:834:69
//cetusIdentifier <-- undefined
 cetusInstances.get(cetusIdentifier).sendExtensionMessage("watchPointHit", msgBody);

I've tried to fix this error:

before:
importObject.env.writeWatchCallback = writeWatchCallback;

after:
importObject.env.writeWatchCallback = function() { writeWatchCallback(cetusIdentifier) };

And the error disappeared, but this not fixed watch functions

hazyone avatar Aug 15 '23 14:08 hazyone

Also, as I understood, when I'm applying patch, I get +1 cetus instance in the ui picker(multi wasm mode), but at this moment, in the consolecetusInstance contains only 1 active instance

cetusInstances._instances.length
1
Screenshot 2023-08-17 at 21 13 34

hazyone avatar Aug 17 '23 19:08 hazyone

Also, I can't search for the '0' i32 value, got error:

cetus.js:230 Uncaught RangeError: Invalid array length
    at Cetus._compare (cetus.js:230:47)
    at Cetus.search (cetus.js:426:34)
    at cetus.js:902:38
this._searchSubset[i] = currentValue; << here

hazyone avatar Aug 17 '23 19:08 hazyone

Hey @hazyone

Good finds here! I noticed there's a bunch of regressions relating to the new "multi-binary" support so I finally took the time to implement automatic regression testing. Hopefully this means we won't run into cases like this as much in the future.

In the meantime, I fixed a few of these issues and will continue working on the rest in the morning.

Jack

Qwokka avatar Aug 20 '23 05:08 Qwokka

Thank you, you're doing a great job. I like your tool :)

hazyone avatar Aug 20 '23 11:08 hazyone

I think these issues are fixed, except for the searching for 0 bug. This occurs because searching for the value 0 returns so many results that the browser isn't able to construct a large enough array. I should do some better error handling in this case, but it wouldn't really solve the problem of being unable to search for 0.

In general, I try to avoid searching for common values (Like 0) unless I've already narrowed it down to a small memory space. Otherwise, it just becomes too many search results for the browser (or my brain) to handle.

Jack

Qwokka avatar Aug 23 '23 03:08 Qwokka