plasma-applets icon indicating copy to clipboard operation
plasma-applets copied to clipboard

Event Calendar causes plasmashell crash if an event summary contains emojis

Open MattMcHackit opened this issue 9 years ago • 37 comments

After adding a Google calendar, clicking Event Calendar causes plasmashell to freeze and then crash. Problem does not occur with no calendar added. Reproduced on multiple installs of Antergos with both Plasma 5.8 and Plasma 5.9.

MattMcHackit avatar Feb 05 '17 20:02 MattMcHackit

So it opens fine when you're not logged into google calendar? It's only when the events are loaded that it crashes? How many calendars do you have? Are they all shown?

Zren avatar Feb 05 '17 21:02 Zren

Yep. That's correct. I only have the one calendar active and shown.

MattMcHackit avatar Feb 05 '17 21:02 MattMcHackit

Any errors in ~/.xsession-errors?

Zren avatar Feb 05 '17 21:02 Zren

Have just re-added the calendar and seems to be working ok now. Apologies. I'll update if the problem recurs.

MattMcHackit avatar Feb 05 '17 21:02 MattMcHackit

How is it installed on antergos? Through the "download new widgets" GUI or via a package manager that downloads from git master?

Zren avatar Feb 05 '17 21:02 Zren

Ah Antergos is just AUR right? So the package manager installs to /usr/share/plasma/plasmoids/, but might be overloaded if you also installed an older version via the GUI to ~/.local/share/plasma/plasmoids/.

Zren avatar Feb 05 '17 21:02 Zren

That's right. Antergos is basically little more than a GUI Arch installer. I think you might be right on the cause. Thank you so much for your help :-)

MattMcHackit avatar Feb 05 '17 21:02 MattMcHackit

Has recurred after trying to update to git version 0.40. Could this be to do with unpurged previous configs? How can I clear them? Thank you. Also, nothing in ~/.xsession-errors

MattMcHackit avatar Feb 07 '17 20:02 MattMcHackit

Do you have Qt 5.8.0?

Zren avatar Feb 07 '17 20:02 Zren

Does the tag tiledmenu-39 work still?

Zren avatar Feb 07 '17 20:02 Zren

Er eventcalendar-39 **

Zren avatar Feb 07 '17 20:02 Zren

Reason I ask is because slytry on https://store.kde.org/p/998901 reported this crash too with v30 and v40 on Antergos too. However it worked for you so I wasn't sure.

slytry: Crashes on plasma 5.9. Would you update please?
Antergos, KDE 5.9.0, Qt 5.8.0, v. 30 Event Calendar.
But now I update and check if it keeps crashing. Even with v.40 Plasma keeps crashing, exactly when the events of the calendar are showed

Zren avatar Feb 07 '17 20:02 Zren

I am on Qt 5.8.0. How do I try the tag?

MattMcHackit avatar Feb 07 '17 20:02 MattMcHackit

git checkout eventcalendar-39 then sh ./reinstall. You can confirm it installed correctly by checking the version in the config.

Zren avatar Feb 07 '17 21:02 Zren

Ok, I'll try now...

MattMcHackit avatar Feb 07 '17 21:02 MattMcHackit

git checkout eventcalendar-39 results in fatal: Not a git repository (or any of the parent directories): .git

MattMcHackit avatar Feb 07 '17 21:02 MattMcHackit

Ah woops, you'll need to this first:

https://github.com/Zren/plasma-applets/tree/master/org.kde.plasma.eventcalendar#b-install-via-github

git clone https://github.com/Zren/plasma-applets.git
cd plasma-applets/org.kde.plasma.eventcalendar
git checkout eventcalendar-39
sh ./reinstall

Zren avatar Feb 07 '17 21:02 Zren

Have followed the instructions and v39 is reinstalled. Problem remains :-(

MattMcHackit avatar Feb 08 '17 15:02 MattMcHackit

As long as the Google account is logged out, there are no crashes. It's still better than the default clock; would be really useful if it worked properly, though!

MattMcHackit avatar Feb 08 '17 15:02 MattMcHackit

Not sure if arch fixed something, or if my virtual machine environment isn't a perfect reproduction. I installed Antergos in virtualbox.

Zren avatar Feb 11 '17 02:02 Zren

Still no improvement here, and the version of Arch/Antergos I'm using is an exact match.

MattMcHackit avatar Feb 11 '17 16:02 MattMcHackit

Interesting... now seems to work with the contacts and local holidays calendars, but dies if I add my main calendar...

MattMcHackit avatar Feb 11 '17 16:02 MattMcHackit

If you get the time, could you turn on debugging output (new) in the new v41 (bottom of the general tab). Then login to gmail, select a calendar that works and enable it. Reload the events. Then turn on the bad calendar.

Then email me the logs (logs will contain your access token). My gmail is zrenfire.

It seems like it's your calendar event data that's foobaring it. Hopefully I can reproduce it with the event data.

Zren avatar Feb 13 '17 18:02 Zren

Hum, maybe it's the unicode/emoji characters? On my version of KDE Neon, I tried installing the Noto emoji character set I think. And the emojis in your events have blank spaces.

where as in my antergos vm, it looks like the characters are missing.

Try changing the event names with those in the current visible month (Jan 29 - Mar 11). If it's not that then it's something else.

Zren avatar Feb 13 '17 23:02 Zren

Hi Chris

Thanks! :-) That appears to have fixed it! Removed the emoji characters and now the calendar works as expected.

Thank you again!

Matt

On 13 Feb 2017, at 23:41, Chris Holland [email protected] wrote:

Hum, maybe it's the unicode/emoji characters? On my version of KDE Neon, I tried installing the Noto emoji character set I think. And the emojis in your events have blank spaces.

where as in my antergos vm, it looks like the characters are missing.

Try changing the event names with those in the current visible month. If it's not that then it's something else.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread.

MattMcHackit avatar Feb 14 '17 00:02 MattMcHackit

User in the opendesktop.org comments had the same issue. https://store.kde.org/p/998901/

So this was a change to either:

  • coloured Emoji rendering
  • The PlasmaComponents.Label which extends Text
    • https://github.com/KDE/plasma-framework/blob/master/src/declarativeimports/plasmacomponents/qml/Label.qml
    • https://github.com/KDE/plasma-framework/commits/master/src/declarativeimports/plasmacomponents/qml/Label.qml
  • Qt Text

Or.... I'm using Text not Label which means it's not using native rendering. Innnnteresting.

Zren avatar Feb 14 '17 10:02 Zren

What do you mean with innnnteresting?

fabastrid avatar Feb 14 '17 12:02 fabastrid

As in I can probably change it to use a Label and/or use set it to native rendering in the next version and get you guys to test if it works without affecting other users. I'm not 100% if that will fix it though, it's just a path forward.

If it doesn't I'll need to look into how coloured emoji's were first implemented, the bug tracker for emoji related bug, if they were ever tested in QML / Plasma's QML widgets, and as a last hope, skim through Qt for any related changes.

The thing is though, that the Antergos setup in my VM is showing them as missing characters, so I still don't know how to reproduce the crash.

Zren avatar Feb 14 '17 13:02 Zren

Ok, hope you can find a way to get it. I'm missing the plasmoid too much! Thank you.

fabastrid avatar Feb 14 '17 15:02 fabastrid

Hmmm. Do any of you have window title labels in the taskbar? If so, does visiting the following url cause plasmashell to crash? It has 🤑 in the title, so since that tab is selected in your browser window, the title will be the window title, shown in the label in the taskbar.

https://en.wikipedia.org/w/index.php?title=%F0%9F%A4%91&redirect=no

It seems that emojis show up fine in the taskmanager label in kde neon for me, even though they doesn't show up in eventcalender. Here's how taskmanager is doing it:

https://github.com/KDE/plasma-desktop/blob/master/applets/taskmanager/package/contents/ui/Task.qml#L471

It ensures textFormat: Text.PlainText and uses Label. I think this is the default value though.

If we look at text: model.display, it's the property of a cpp model libtaskmanager. I can't find anything interesting in taskmodel.cpp though that cleans up the title. The fact that it's a C++ string, versus a json decoded javascript string in eventcalendar might be the key.

I looked into filtering all emojis with regex, but it doesn't seem to work. Using \u0F911 didn't work, nor did \u{0F911} which is Ruby syntax, but pasting 🤑 into the regex did. I don't want to try making a blacklist of characters at this rate. I might try making a whitelist, but I might miss a foreign character set and create another bug.

Hmmm, I just noticed that it shows up as %F0%9F%A4%91 when url encoded.

Zren avatar Feb 14 '17 17:02 Zren