Strange config/locale/download location bug

Ask for help and report issues with the GTK+ version of Transmission
Post Reply
alexwh
Posts: 1
Joined: Sat May 18, 2013 7:57 pm

Strange config/locale/download location bug

Post by alexwh »

Hey there, I've been having this pretty exotic bug where my config will get random(?) bytes written to it in the "download-dir", "incomplete-dir" and "watch-dir" keys, then sometimes even replaced by my current locale (en_GB.UTF-8). I'm running version 2.77 (14031) on Arch Linux from the official repos. The Qt version does not suffer from this issue.

If I backup & remove my ~/.config/transmission folder, these are the steps that seem to trigger it:

1) Open transmission and set the download dir to /media/data/torrents (/media/data is my secondary HDD)
download-dir is properly set, incomplete-dir is "/home/alex/6W^?", watch-dir is "/home/alex/home/alex"
A hexdump of the incomplete-dir is:

Code: Select all

000002c0  61 6c 73 65 2c 20 0a 20  20 20 20 22 69 6e 63 6f  |alse, .    "inco|
000002d0  6d 70 6c 65 74 65 2d 64  69 72 22 3a 20 22 2f 68  |mplete-dir": "/h|
000002e0  6f 6d 65 2f 61 6c 65 78  2f 36 57 7f 22 2c 20 0a  |ome/alex/6W.", .|
Reopening the settings and checking the download location results in it being "(None)" and this error in the message log:

Code: Select all

Sat May 18 21:32:55 2013        error           JSON parse failed in /home/alex/.config/transmission/settings.json at pos 535: WEIRD_WHITESPACE -- remaining text "^P^QV^B", 
    "dow"
Now download-dir is "/home/alex/^P^QV^B", and incomplete-dir is "/home/alex/\\^B". watch-dir the same. I have no idea what dictates these bytes, it seems to be different every time I try and test it.
Another hexdump after checking the settings:

Code: Select all

000001f0  74 72 75 65 2c 20 0a 20  20 20 20 22 64 6f 77 6e  |true, .    "down|
00000200  6c 6f 61 64 2d 64 69 72  22 3a 20 22 2f 68 6f 6d  |load-dir": "/hom|
00000210  65 2f 61 6c 65 78 2f 10  11 56 02 22 2c 20 0a 20  |e/alex/..V.", . |
...
000002c0  20 0a 20 20 20 20 22 69  6e 63 6f 6d 70 6c 65 74  | .    "incomplet|
000002d0  65 2d 64 69 72 22 3a 20  22 2f 68 6f 6d 65 2f 61  |e-dir": "/home/a|
000002e0  6c 65 78 2f 5c 5c 02 22  2c 20 0a 20 20 20 20 22  |lex/\\.", .    "|


I then tried editing my locale.gen to only be en_US.UTF-8 and regenerated my locales, it didn't seem to help much.
After setting the download location and closing the settings, settings.json reports the correct download-dir (/media/data/torrents), but incomplete-dir is "/home/alex/home/alex".
When reopening the settings to check the download location, it's "(None)" and the message log reads:

Code: Select all

Sat May 18 21:16:38 2013  error   JSON parse failed in /home/alex/.config/transmission/settings.json
 at pos 535: WEIRD_WHITESPACE -- remaining text "^B",
    "downlo"
download-dir is now set to "/home/alex/^B" and incomplete-dir "/home/alex/home/alex"
If you close/open the settings again, the download dir is just my home folder, and in the config, incomplete-dir is set to "/home/alex/@^B" now.


In my backed up config, if I open the settings panel and check the download dir, it's "(None)" again, with this for download-dir:

Code: Select all

000001f0  72 75 65 2c 20 0a 20 20  20 20 22 64 6f 77 6e 6c  |rue, .    "downl|
00000200  6f 61 64 2d 64 69 72 22  3a 20 22 2f 68 6f 6d 65  |oad-dir": "/home|
00000210  2f 61 6c 65 78 2f 40 3d  01 22 2c 20 0a 20 20 20  |/alex/@=.", .   |

After a fresh reinstall and config move, I somehow instantly got the locale folder bug (this was with both en_GB and en_US.UTF-8 locales). download-dir was just /home/alex/en_GB.UTF-8 (without even setting it and reopening), incomplete-dir was:

Code: Select all

000002c0  20 66 61 6c 73 65 2c 20  0a 20 20 20 20 22 69 6e  | false, .    "in|
000002d0  63 6f 6d 70 6c 65 74 65  2d 64 69 72 22 3a 20 22  |complete-dir": "|
000002e0  2f 68 6f 6d 65 2f 61 6c  65 78 2f 01 22 2c 20 0a  |/home/alex/.", .|
and watch-dir was:

Code: Select all

00000c70  20 20 22 77 61 74 63 68  2d 64 69 72 22 3a 20 22  |  "watch-dir": "|
00000c80  2f 68 6f 6d 65 2f 61 6c  65 78 2f 5c 22 61 67 7f  |/home/alex/\"ag.|
00000c90  22 2c 20 0a 20 20 20 20  22 77 61 74 63 68 2d 64  |", .    "watch-d|
and the message log said

Code: Select all

Sat May 18 22:00:43 2013        error           JSON parse failed in /home/alex/.config/transmission/settings.json at pos 747: WEIRD_WHITESPACE -- remaining text "^A", 
    "incomp"

Apologies for the lengthy post, and thanks in advance!
Post Reply