Vector35 / binaryninja-api

Public API, examples, documentation and issues for Binary Ninja
https://binary.ninja/
MIT License
907 stars 207 forks source link

'⚠️' breaks line rendering in certain contexts #3652

Closed 0cyn closed 1 year ago

0cyn commented 1 year ago

Version and Platform (required): Binary Ninja Version: 3.2.3834, e88d9c23 Platform: macOS Monterey (12.4) (x86_64)

Bug Description: ⚠️ breaks text rendering in certain contexts. We use this as an analysis tag in certain contexts, so it can be problematic/confusing.

This is a Qt-wide bug.

Repro:

In BinaryNinja

part 1: in python console: print('⚠️') -- breaks input text box, and output of this will render 3 blank lines, which if copied actually still contain '⚠️'.

part 2: in python console: log_alert('⚠️') -- renders fine in the log view. displays malformed image in Alert popup. This problem also occurs when clicking the tag in other contexts that would display it in a popup (tags).

Qt, via pyside:

this repros the log_alert issue above. The python console issues likely occur from how we paint the broken character Qt displays.

bug.py:

# This displays the same broken icon regardless of whether QPushButton, QTextEdit, or QLineEdit is used.
import sys
from PySide6.QtWidgets import QApplication, QPushButton
app = QApplication(sys.argv)
window = QPushButton("⚠️")
window.show()
app.exec_()
$ export PYTHONPATH=~/Qt/6.3.0/clang_64/pyside/site-packages/
$ python3 bug.py

extra info: Default macOS 12.4 fonts and theme being used.

torarnv commented 1 year ago

Possibly related to https://bugreports.qt.io/browse/QTBUG-108799

psifertex commented 1 year ago

Looks like it, thanks! Saves us the trouble of filing a dupe. :-)

plafosse commented 1 year ago

This has been fixed with a Qt update and a workaround.

psifertex commented 1 year ago

Actually, I think this is still an issue, re-opening until we upgrade to 6.4.3 or 6.5.0 qt.

psifertex commented 1 year ago

This is fixed upstream and is solely dependent on us upgrading to QT 6.4.3.

psifertex commented 1 year ago

I'm re-assigning this to Rusty who will be doing the QT upgrade some time in the next few weeks.

D0ntPanic commented 1 year ago

Fixed in 3.4.4191