Bug 455990 - Crash when uploading a file
Summary: Crash when uploading a file
Status: RESOLVED FIXED
Alias: None
Product: NeoChat
Classification: Applications
Component: General (show other bugs)
Version: unspecified
Platform: Flatpak Linux
: NOR normal
Target Milestone: ---
Assignee: Tobias Fella
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-26 22:45 UTC by Jan Bidler
Modified: 2022-11-26 14:40 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Bidler 2022-06-26 22:45:56 UTC
SUMMARY
Its possible to crash NeoChat while uploading a file


STEPS TO REPRODUCE
1. Open NeoChat, login and open a room
2. Drag-and-drop a file into the room
3. Click on the send button

OBSERVED RESULT
NeoChat crashes/closes
```
qrc:/imports/NeoChat/Component/ChatBox/AttachmentPane.qml:36:17: QML Image: Cannot open: file:///home/me/Bilder/Screenshot_20220627_003126.png
qrc:/imports/NeoChat/Component/ChatBox/AttachmentPane.qml:36:17: QML Image: Cannot open: file:///home/me/Bilder/Screenshot_20220627_003126.png
ASSERT: "localFile.isFile()" in file /run/build/libquotient/lib/room.cpp, line 1769
```


EXPECTED RESULT
NeoChat shouldn't crash

SOFTWARE/OS VERSIONS
Linux: Linux Mint 20
KDE Plasma Version: 5.18.8

NeoChat: 22.04
KDE Frameworks Version: 5.95.0
Qt Version: 5.15.5
Comment 1 Tobias Fella 2022-11-17 22:00:27 UTC
If i poke a / sized hole into the sandbox, this works; in other words it looks like qml's droparea doesn't support flatpak drag and drop
Comment 2 Bug Janitor Service 2022-11-26 14:31:24 UTC
A possibly relevant merge request was started @ https://invent.kde.org/network/neochat/-/merge_requests/666
Comment 3 Tobias Fella 2022-11-26 14:40:41 UTC
Git commit 99ad4130d99619c095cc3eaf78e3f76eff6c16a7 by Tobias Fella.
Committed on 26/11/2022 at 14:30.
Pushed by carlschwan into branch 'master'.

Disable DropArea in flatpak

The droparea doesn't support flatpak and dropping something leads to a crash

M  +9    -0    src/controller.cpp
M  +2    -0    src/controller.h
M  +1    -0    src/qml/Page/RoomPage.qml

https://invent.kde.org/network/neochat/commit/99ad4130d99619c095cc3eaf78e3f76eff6c16a7