Gmail Docklet fails when mail subject contains curly brackets

Bug #697981 reported by Vad Kay
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Docky
Fix Released
Low
Robert Dyer

Bug Description

I know it's highly miserable chance that someone would send you an email with curly brackets chars in the subject, but this would essentially lead to Gmail Docklet's failure and lead to General Error state thus preventing it to report on the other new emails.

Also looking at the problem would it make sense to explicitly check for other treated-as-special-chars along the way?

Pre-conditions:

  1. Running Docky;
  2. Gmail Docklet it set up and active.

Steps:

  1. Send yourself an email with subject containing at least either "{" or "}";
  2. See Gmail Docklet grayed icon and its status of "General Error".

Relevant debug info:

  [Info 08:25:02.957] Docky version: 2.1.0 bzr docky r1717 ppa
  [Info 08:25:02.988] Kernel version: 2.6.35.24
  [Info 08:25:02.990] CLR version: 2.0.50727.1433
  ...
  [Info 08:25:27.136] [GMailAtom] Fetching Atom feed: https://mail.google.com/mail/feed/atom/Inbox
  [Error 08:25:27.482] [GMailAtom] Input string was not in a correct format.

Sorry for omitting other env data, but I guess the problem is evident.

Rock on and thanks for the great docklet guys!

Tags: docklet gmail
Vad Kay (spaceye)
description: updated
Revision history for this message
Robert Dyer (psybers) wrote :

Please run docky in debug mode 'docky --debug' and re-create the bug. Then attach the relevant log output.

Changed in docky:
status: New → Incomplete
importance: Undecided → Low
Revision history for this message
Robert Dyer (psybers) wrote :

[Error 20:01:40.491] [GMailAtom] Input string was not in a correct format.
[Debug 20:01:40.491] [GMailAtom] at System.String.ParseFormatSpecifier (System.String str, System.Int32& ptr, System.Int32& n, System.Int32& width, System.Boolean& left_align, System.String& format) [0x00000] in <filename unknown>:0
  at System.String.FormatHelper (System.Text.StringBuilder result, IFormatProvider provider, System.String format, System.Object[] args) [0x00000] in <filename unknown>:0
  at System.String.Format (IFormatProvider provider, System.String format, System.Object[] args) [0x00000] in <filename unknown>:0
  at System.String.Format (System.String format, System.Object[] args) [0x00000] in <filename unknown>:0
  at Docky.Services.Logging.LogBase.Write (LogLevel level, System.String msg, System.Object[] args) [0x00015] in /home/rdyer/branches/docky/Docky.Services/Docky.Services/Logging/LogBase.cs:98
  at Docky.Services.Log.Notify (System.String title, System.String icon, System.String msg, System.Object[] args) [0x00000] in /home/rdyer/branches/docky/Docky.Services/Docky.Services/Log.cs:53
  at GMail.GMailAtom+<CheckGMail>c__AnonStorey1.<>m__9 () [0x003e2] in /home/rdyer/branches/docky/StandardPlugins/GMail/src/GMailAtom.cs:264

Revision history for this message
Robert Dyer (psybers) wrote :

The problem only happens when the message is brand new and a notify occurs. The loggers notify passes the message to String.Format which sees "{...}" and thinks it is a format command. Escaping is needed.

Changed in docky:
status: Incomplete → Triaged
assignee: nobody → Robert Dyer (psybers)
Revision history for this message
Robert Dyer (psybers) wrote :

Fixed in rev 1752.

Changed in docky:
status: Triaged → Fix Committed
milestone: none → 2.0.11
Revision history for this message
Vad Kay (spaceye) wrote :

Thanks Robert!
Sorry, been away from the battle station to bring in further data.

Changed in docky:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.