Fix(EditInstructionDialog): Silence console errors from text preview#3500
Open
Keryer wants to merge 1 commit intorizinorg:devfrom
Open
Fix(EditInstructionDialog): Silence console errors from text preview#3500Keryer wants to merge 1 commit intorizinorg:devfrom
Keryer wants to merge 1 commit intorizinorg:devfrom
Conversation
Prevents assembly errors during live instruction editing (text mode) from printing to the console. UI now correctly shows "Unknown Instruction" without extraneous console log noise.
karliss
requested changes
May 28, 2025
Member
karliss
left a comment
There was a problem hiding this comment.
Please retest your changes. I have no idea how you managed to produce the second GIF, but the changes you made should have no effect and in my testing they didn't.
Author
Could you please tell me about your test environment? I will refer to it for further testing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Your checklist for this pull request
Detailed description
This change resolves Issue #2551, where errors from Rizin were printed to the console when typing invalid instructions in the "Edit Instruction" dialog.
Problem:
When a user entered non-assemblable code, Core()->assemble() would fail. This failure not only caused Rizin to print error messages to the console but could also lead to unhandled exceptions, potentially crashing Cutter.
Fix:
This modification wraps the
Core()->assemble(input)call within a try-catch block. By catching thestd::exceptionthatCore()->assemble()might throw:Test plan (required)

The following is an example of an unexpected console error:
After modification, the console no longer reports an error during the modification of instructions:

Closing issues
closes #2551