fix: fix crash on Arch when creating new tab & fix cmake compile error#465
Conversation
|
Hi @calsys456. Thanks for your PR. 😃 |
|
Hi @calsys456. Thanks for your PR. I'm waiting for a linuxdeepin member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
1. decoder.decodeLine(&_image[loc(0,cursorPos.y())],_usedColumns,_lineProperties[cursorPos.y()]); will raise an error when _lineProperties is empty. Check and early return in this case. 2. CMake Error at 3rdparty/terminalwidget/CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 3.5 has been removed from CMake. Update the VERSION argument <min> value. Or, use the <min>...<max> syntax to tell CMake that the project requires at least <min> but has been updated to work with policies introduced by <max> or earlier. Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway. ... so we have to increase cmake_minimum_required After those fix deepin-terminal can be compiled and run on Archlinux without obvious bug.
f1558ff to
a07483a
Compare
| // return the text from the current line | ||
| QString lineText; | ||
| if (_lineProperties.isEmpty()) | ||
| return lineText; |
There was a problem hiding this comment.
Good catch! We should definitely add a bounds check before accessing _lineProperties and _image. Something like:
if (cursorPos.y() < 0 || cursorPos.y() >= _lineProperties.size())
return lineText;
|
TAG Bot New tag: 6.5.23 |
|
TAG Bot New tag: 6.5.24 |
|
TAG Bot New tag: 6.5.25 |
|
TAG Bot New tag: 6.5.26 |
|
TAG Bot New tag: 6.5.27 |
|
TAG Bot New tag: 6.5.28 |
|
TAG Bot New tag: 6.5.29 |
|
Applied for Arch and verified the fix. Thanks! |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: calsys456, lzwind The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
decoder.decodeLine(&_image[loc(0,cursorPos.y())],_usedColumns,_lineProperties[cursorPos.y()]); will raise an error when _lineProperties is empty. Check and early return in this case.
CMake Error at 3rdparty/terminalwidget/CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 3.5 has been removed from CMake.
Update the VERSION argument value. Or, use the ...
syntax
to tell CMake that the project requires at least but has been
updated
to work with policies introduced by or earlier.
Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.
... so we have to increase cmake_minimum_required
After those fix deepin-terminal can be compiled and run on Archlinux without obvious bug.