Solved. Already :) The problem arises for me when using plain output (default) and the charset is not utf8. In this case
conv = g_locale_from_utf8 (str, -1, (gsize*)&bytes, NULL, &err); is used to attempt conversion. When passed the subject from my suspect email a segmentation fault occurs. The simplest workaound for me was to escape everything that is not utf8 using conv = g_strescape (str, NULL); rather than attempt conversion. After doing this, my suspect email no longer causes a segmentation fault. Having worked this out, I realised(*) that this is not a new issue http://code.google.com/p/mu0/issues/detail?id=74 and that a much more elegant solution and explanation already exist in github https://github.com/djcb/mu/blob/master/lib/mu-util.c (from line 450) Would it be worth updating the tar.gz release to include this solution? Many thanks for mu. Tristan * You have to know the right question to ask to find the right answer. On Monday, June 16, 2014 7:07:01 PM UTC+1, Tristan Williams wrote: > > Hello, > > I have started using mu (which I am greatly enjoying) but have run into a > segmentation fault. I am using > > bash-3.2$ mu --version > mu (mail indexer/searcher) version 0.9.9.5 > Copyright (C) 2008-2013 Dirk-Jan C. Binnema > License GPLv3+: GNU GPL version 3 or later < > http://gnu.org/licenses/gpl.html>. > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. > > on OS X 10.8.5 installed via brew and then (removed) and installed by hand > from the tar file. I rebuilt the index on my Maildir > > mu index --rebuild > > and then tried to look at emails for today > > mu find date:today > > which resulting in a segmentation fault. > > This appears to be being caused by a particular email in my Maildir. I > removed this email and rebuilt index. mu find date:today ran without issue. > > > I isolated the email and extracted to its own maildir consisting of just > this email and then rebuilt a new index for this maildir. Running mu find > date:today > resulted in a segmentation fault. > > Any ideas as to what is going on or what I am doing wrong would be greatly > appreciated. > > Tristan > > > > > -- You received this message because you are subscribed to the Google Groups "mu-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
