Re: [dev] [dmenu] 4.9 segfault on input

2019-02-18 Thread Patrick Smith
On Sat, Feb 16, 2019 at 12:47 AM Ivan Tham wrote: > By the way, Patrick. Why use anthy instead of mozc for japanese input? I > heard anthy is a dead project (from arch wiki). Further follow-up: I switched from scim+anthy to fcitx+mozc, and the previous problems went away. Now (printf 'foo\nbar' |

Re: [dev] [dmenu] 4.9 segfault on input

2019-02-18 Thread Patrick Smith
On Sat, Feb 16, 2019 at 12:47 AM Ivan Tham wrote: > By the way, Patrick. Why use anthy instead of mozc for japanese input? I > heard anthy is a dead project (from arch wiki). I started using scim+anthy several years ago, and it has continued to work for me, so I've continued to use it. I never no

Re: [dev] [dmenu] 4.9 segfault on input

2019-02-17 Thread Ivan Tham
On Sat, Feb 16, 2019 at 04:37:31PM +0100, Hiltjo Posthuma wrote: On Sat, Feb 16, 2019 at 11:08:40PM +0800, Ivan Tham wrote: On Sat, Feb 16, 2019 at 12:12:31PM +0100, Hiltjo Posthuma wrote: > On Sat, Feb 16, 2019 at 04:46:23PM +0800, Ivan Tham wrote: > > On Fri, Feb 15, 2019 at 11:45:59PM -0800,

Re: [dev] [dmenu] 4.9 segfault on input

2019-02-16 Thread Hiltjo Posthuma
On Sat, Feb 16, 2019 at 11:08:40PM +0800, Ivan Tham wrote: > On Sat, Feb 16, 2019 at 12:12:31PM +0100, Hiltjo Posthuma wrote: > > On Sat, Feb 16, 2019 at 04:46:23PM +0800, Ivan Tham wrote: > > > On Fri, Feb 15, 2019 at 11:45:59PM -0800, Patrick Smith wrote: > > > > On Fri, Feb 15, 2019 at 11:33 AM

Re: [dev] [dmenu] 4.9 segfault on input

2019-02-16 Thread Ivan Tham
On Sat, Feb 16, 2019 at 12:12:31PM +0100, Hiltjo Posthuma wrote: On Sat, Feb 16, 2019 at 04:46:23PM +0800, Ivan Tham wrote: On Fri, Feb 15, 2019 at 11:45:59PM -0800, Patrick Smith wrote: > On Fri, Feb 15, 2019 at 11:33 AM Silvan Jegen wrote: > > With the suggested patch applied, everything work

Re: [dev] [dmenu] 4.9 segfault on input

2019-02-16 Thread Hiltjo Posthuma
On Sat, Feb 16, 2019 at 04:46:23PM +0800, Ivan Tham wrote: > On Fri, Feb 15, 2019 at 11:45:59PM -0800, Patrick Smith wrote: > > On Fri, Feb 15, 2019 at 11:33 AM Silvan Jegen wrote: > > > With the suggested patch applied, everything worked for me when using > > > IBus and in st we use a similar pat

Re: [dev] [dmenu] 4.9 segfault on input

2019-02-16 Thread Ivan Tham
On Fri, Feb 15, 2019 at 11:45:59PM -0800, Patrick Smith wrote: On Fri, Feb 15, 2019 at 11:33 AM Silvan Jegen wrote: With the suggested patch applied, everything worked for me when using IBus and in st we use a similar pattern to what this patch is proposing (x.c:1007-1014). I am not sure why Pa

Re: [dev] [dmenu] 4.9 segfault on input

2019-02-15 Thread Patrick Smith
On Fri, Feb 15, 2019 at 11:33 AM Silvan Jegen wrote: > With the suggested patch applied, everything worked for me when using > IBus and in st we use a similar pattern to what this patch is proposing > (x.c:1007-1014). I am not sure why Patrick's IME (SCIM) is working in > st but not in dmenu with

Re: [dev] [dmenu] 4.9 segfault on input

2019-02-15 Thread Silvan Jegen
[2019-02-14 10:50] Igor Fontana > > > > > I wonder what people think if XIM support is removed from dmenu (but > > > > kept for > > > > st). Reverting XIM and the input focus change? > > > > > > Absolutely ;) People who need it, could maintain a patch for it. > > > > I am also not against that si

Re: [dev] [dmenu] 4.9 segfault on input

2019-02-14 Thread Igor Fontana
> > > I wonder what people think if XIM support is removed from dmenu (but kept > > > for > > > st). Reverting XIM and the input focus change? > > > > Absolutely ;) People who need it, could maintain a patch for it. > > I am also not against that since I never use an IME with dmenu. If > somebody

Re: [dev] [dmenu] 4.9 segfault on input

2019-02-13 Thread Silvan Jegen
[2019-02-13 10:03] Anselm Garbe > On Wed, 13 Feb 2019 at 08:59, Hiltjo Posthuma wrote: > > I wonder what people think if XIM support is removed from dmenu (but kept > > for > > st). Reverting XIM and the input focus change? > > Absolutely ;) People who need it, could maintain a patch for it. I

Re: [dev] [dmenu] 4.9 segfault on input

2019-02-13 Thread Anselm Garbe
On Wed, 13 Feb 2019 at 08:59, Hiltjo Posthuma wrote: > I wonder what people think if XIM support is removed from dmenu (but kept for > st). Reverting XIM and the input focus change? Absolutely ;) People who need it, could maintain a patch for it. --Anselm

Re: [dev] [dmenu] 4.9 segfault on input

2019-02-13 Thread Hiltjo Posthuma
On Wed, Feb 13, 2019 at 01:30:20AM -0800, Patrick Smith wrote: > On Wed, Feb 13, 2019 at 12:29 AM Hiltjo Posthuma > wrote: > > Please try the latest git version and report back. > > It works for me. That is, there is no segfault from, for example, > printf 'foo\nbar' | ./dmenu > > When I test w

Re: [dev] [dmenu] 4.9 segfault on input

2019-02-13 Thread Patrick Smith
On Wed, Feb 13, 2019 at 12:29 AM Hiltjo Posthuma wrote: > Please try the latest git version and report back. It works for me. That is, there is no segfault from, for example, printf 'foo\nbar' | ./dmenu When I test with: printf 'あ\nお' | ./dmenu, I can't see a way to select the second option (sci

Re: [dev] [dmenu] 4.9 segfault on input

2019-02-13 Thread Hiltjo Posthuma
On Tue, Feb 12, 2019 at 03:29:53PM -0800, Patrick Smith wrote: > I have: > > GTK_IM_MODULE=scim > XMODIFIERS=@im=SCIM > QT_IM_MODULE=scim > > If I unset XMODIFIERS, dmenu works correctly. If I set > XMODIFIERS=@im=scim, dmenu segfaults. > > XSetLocaleModifiers returns '@im=SCIM', as expected. >

Re: [dev] [dmenu] 4.9 segfault on input

2019-02-12 Thread Patrick Smith
I have: GTK_IM_MODULE=scim XMODIFIERS=@im=SCIM QT_IM_MODULE=scim If I unset XMODIFIERS, dmenu works correctly. If I set XMODIFIERS=@im=scim, dmenu segfaults. XSetLocaleModifiers returns '@im=SCIM', as expected. On Tue, Feb 12, 2019 at 1:57 AM Silvan Jegen wrote: > > Hi Patrick > > On February

Re: [dev] [dmenu] 4.9 segfault on input

2019-02-12 Thread Silvan Jegen
Hi Patrick On February 12, 2019 7:35:20 AM GMT+00:00, Patrick Smith wrote: >On Mon, Feb 11, 2019 at 12:43 PM Silvan Jegen >wrote: >> I found that the XSetLocaleModifiers("") call returns "@im=ibus" in >my >> case which is not surprising because the env variable XMODIFIERS is >> set to @im=ibus

Re: [dev] [dmenu] 4.9 segfault on input

2019-02-11 Thread Patrick Smith
On Mon, Feb 11, 2019 at 12:43 PM Silvan Jegen wrote: > I found that the XSetLocaleModifiers("") call returns "@im=ibus" in my > case which is not surprising because the env variable XMODIFIERS is > set to @im=ibus on my machine. If Ibus is not running, however, I get > a segfault just like Jordan

Re: [dev] [dmenu] 4.9 segfault on input

2019-02-11 Thread Silvan Jegen
Hi On Mon, Feb 11, 2019 at 1:44 AM Patrick Smith wrote: > Jordan, I tried a similar patch, and yes it does work for me. My > message reporting that may have been delayed by moderation or > something, I'm not sure. > > One drawback to this is that seems to disable the user's input method. > If, fo

Re: [dev] [dmenu] 4.9 segfault on input

2019-02-10 Thread Patrick Smith
Jordan, I tried a similar patch, and yes it does work for me. My message reporting that may have been delayed by moderation or something, I'm not sure. One drawback to this is that seems to disable the user's input method. If, for example, I do printf 'あ\nお' | ./dmenu (that contains Japanese hir

Re: [dev] [dmenu] 4.9 segfault on input

2019-02-10 Thread Patrick Smith
I tried patching the dmenu 4.9 source code similarly to https://www.mail-archive.com/fltk-bugs@easysw.com/msg01159.html. Result: printf 'foo\nbar' | ./dmenu now works correctly. And I do not need to move the mouse cursor before pressing the enter key. Of course, I don't know whether that would be

Re: [dev] [dmenu] 4.9 segfault on input

2019-02-10 Thread Jordan Timmerman
I believe I have a patch to fix this issue. It is attached. Taken from: https://www.mail-archive.com/fltk-bugs@easysw.com/msg01159.html The link was pointed to by the Servo issue that Patrick Smith linked to. (Thanks, Patrick!) Patrick, can you please try (from a clean 4.9 dmenu sourcetree) `git

Re: [dev] [dmenu] 4.9 segfault on input

2019-02-10 Thread Jordan Timmerman
Patrick, Can you also try reverting 377bd37e212b1ec4c03a481245603c6560d0be22 ? It certainly sounds like the same issue I experience; if so, reverting that commit will cause dmenu to work correctly again. This may be able to help guide your search if you continue debugging. On Sun, Feb 10, 2019 a

Re: [dev] [dmenu] 4.9 segfault on input

2019-02-10 Thread Patrick Smith
Another point of information... after seeing https://github.com/servo/servo/issues/9938, I tried these two commands with my instrumented dmenu: printf 'foo\nbar' | ./dmenu Calling XOpenIM Back from XOpenIM, xim=0x0 Calling XCreateIC Back from XCreateIC, xic=0x0 xic = 0x0, event type = 2 calli

Re: [dev] [dmenu] 4.9 segfault on input

2019-02-10 Thread Jordan Timmerman
With a little finagling, I've managed to produce a backtrace by using Quentin's suggested flag modifications to config.mk. This is attached. It seems to me only to confirm what we've already learned: the failure occurs in XmbLookupString. Perhaps with the additional diagnostic information Patrick w

Re: [dev] [dmenu] 4.9 segfault on input

2019-02-10 Thread Patrick Smith
I'm experiencing a problem that appears very similar to this one, and I can add a bit of information. Summary: When I have scim+anthy installed as an input method, the call to XOpenIM fails, returning a null pointer. But I don't know much about the internals of X, so can't be 100% sure this is the

Re: [dev] [dmenu] 4.9 segfault on input

2019-02-10 Thread Jordan Timmerman
The attachment is missing output. Forgot to `make clean` first. My bad. I've attached the corrected output. On Sun, Feb 10, 2019 at 5:35 PM Jordan Timmerman wrote: > > Quentin, > > dmenu does not build if I set the flags as you've suggested. I have > attached the output I receive; it fails to res

Re: [dev] [dmenu] 4.9 segfault on input

2019-02-10 Thread Jordan Timmerman
Quentin, dmenu does not build if I set the flags as you've suggested. I have attached the output I receive; it fails to resolve `#include `. It builds if run `make` by itself. On Sat, Feb 9, 2019 at 2:49 AM Quentin Rameau wrote: > > Hello Jordan, > > > Per the hacking page, I have attached the

Re: [dev] [dmenu] 4.9 segfault on input

2019-02-09 Thread Quentin Rameau
Hello Jordan, > Per the hacking page, I have attached the output of the gdb backtrace. > I also attached strace output and the coredump file. > > Thanks for dmenu! Let me know if there's anything else I can do. Could you make a local build with debugging symbols so we can have a better notion of

Re: [dev] [dmenu] 4.9 segfault on input

2019-02-08 Thread Jordan Timmerman
Additional note: if I revert the commit 377bd37..., everything works. So there's no doubt at this point that I mislabeled commits during the bisect: the segfault is introduced with "Handle IME input". On Fri, Feb 8, 2019 at 10:40 PM Jordan Timmerman wrote: > > Did a git bisect to find the bad com

Re: [dev] [dmenu] 4.9 segfault on input

2019-02-08 Thread Jordan Timmerman
Did a git bisect to find the bad commit, and it was in fact the commit Hiltjo identified: 377bd37e212b1ec4c03a481245603c6560d0be22, "Handle IME input". The output of 'locale' on my system is attached in "locale.out". It's all en_US.UTF-8. I've fiddled with the code very slightly to try to figure

Re: [dev] [dmenu] 4.9 segfault on input

2019-02-08 Thread Laslo Hunhold
On Thu, 7 Feb 2019 22:59:24 -0600 Jordan Timmerman wrote: Hey Jordan, > I'm pretty confident at this point that the segfault occurs during the > call to libx11 XmbLookupString. I've attempted downgrading libx11 from > 1.6.7 to 1.6.6 and rebuilding, but this makes no difference. For > whatever re

Re: [dev] [dmenu] 4.9 segfault on input

2019-02-08 Thread Hiltjo Posthuma
On Thu, Feb 07, 2019 at 08:29:14PM -0600, Jordan Timmerman wrote: > First bug report -- also only an amateur at debugging C. Please be patient. :) > > Originally reported to the package maintainer for Arch linux, who > tells me he's fairly certain it's an upstream bug. > > Per the hacking page, I

Re: [dev] [dmenu] 4.9 segfault on input

2019-02-08 Thread Donald Allen
On Thu, 7 Feb 2019 at 23:56, Jordan Timmerman wrote: > > Thanks, Donald. > > My `ldd` output includes all the same libraries as yours, although the > addresses of the libraries of course differ. > > I'm pretty confident at this point that the segfault occurs during the > call to libx11 XmbLookupSt

Re: [dev] [dmenu] 4.9 segfault on input

2019-02-07 Thread Jordan Timmerman
Thanks, Donald. My `ldd` output includes all the same libraries as yours, although the addresses of the libraries of course differ. I'm pretty confident at this point that the segfault occurs during the call to libx11 XmbLookupString. I've attempted downgrading libx11 from 1.6.7 to 1.6.6 and rebu

Re: [dev] [dmenu] 4.9 segfault on input

2019-02-07 Thread Donald Allen
On Thu, 7 Feb 2019 at 23:33, Jordan Timmerman wrote: > > Doing a print-based line-by-line binary search indicates the segfault > occurs during a call to XmbLookupString. > > Does that ring any alarm bells for anyone? > > Seems to imply there's some kind of problem in my version of that X > library

Re: [dev] [dmenu] 4.9 segfault on input

2019-02-07 Thread Jordan Timmerman
Doing a print-based line-by-line binary search indicates the segfault occurs during a call to XmbLookupString. Does that ring any alarm bells for anyone? Seems to imply there's some kind of problem in my version of that X library, whichever one it is. Will keep looking. On Thu, Feb 7, 2019 at 10

Re: [dev] [dmenu] 4.9 segfault on input

2019-02-07 Thread Jordan Timmerman
Well shucks. Okay. Thanks for trying! Must be something on my end. Perhaps the version of a dynamically linked library could be affecting it? On Thu, Feb 7, 2019 at 10:13 PM Donald Allen wrote: > > On Thu, 7 Feb 2019 at 22:58, Jordan Timmerman wrote: > > > > Hi Anselm, > > > > I run the followin

Re: [dev] [dmenu] 4.9 segfault on input

2019-02-07 Thread Donald Allen
On Thu, 7 Feb 2019 at 22:58, Jordan Timmerman wrote: > > Hi Anselm, > > I run the following script: > > echo 'a\nb\nc' | dmenu > > I then press Enter. The program segaults. I just did this on an up-to-date Arch Linux system with dmenu 4.9 installed and it does not seg-fault on my system. dca@fra

Re: [dev] [dmenu] 4.9 segfault on input

2019-02-07 Thread Jordan Timmerman
Hi Anselm, I run the following script: echo 'a\nb\nc' | dmenu I then press Enter. The program segaults. config.h is not modified (to the very best of my knowledge). I am using the dmenu package from the Arch Linux community packages database, which is packaged using the script you can see here:

Re: [dev] [dmenu] 4.9 segfault on input

2019-02-07 Thread Anselm Garbe
Hi there, can you be a bit more elaborate how to run into this bug? How does it occure in your setup? Is config.h modified? What are the inputs (from stdin), what do you enter? Thanks, Anselm On Thu, 7 Feb 2019 at 18:35, Jordan Timmerman wrote: > > First bug report -- also only an amateur at d