I hit an infinite loop on gselect.c:58-59. After quick debugging I found that the problem is in loop xgselect.c:58-59: while(n_gfds > gfds_size) gfds_size *= 2; Problem is that: (gdb) p n_gfds $3 = 1 (gdb) p gfds_size $4 = 0 It seems that xgselect_initialize was not called as X system is initialized. The attached patch solves problem for me. I have sent it upstream but it didn't appear on mailing list yet (that's the reason for lack of URL).
Created attachment 300155 [details, diff] 0001-Fix-infinit-loop-when-emacs-is-compiled-with-GTK-sup.patch
Created attachment 300159 [details, diff] 0001-Fix-infinit-loop-when-emacs-is-compiled-with-GTK-sup.patch Ups. I have forgotten to add 1 file to git. Corrected version attached.
Has this patch been submitted and approved upstream?
(In reply to comment #3) > Has this patch been submitted Yes. I have submitted to bug-gnu-emacs, as described on GNU Emacs webpage, but the message have not appeared in the archives/gmane (I sent a few minutes before submitting this bug). > and approved upstream? No - at least I don't know about it.
(In reply to comment #4) > (In reply to comment #3) > > Has this patch been submitted > > Yes. I have submitted to bug-gnu-emacs, as described on GNU Emacs webpage, but > the message have not appeared in the archives/gmane (I sent a few minutes > before submitting this bug). > I've just received ack about bug (updating URL).
(In reply to comment #4) > (In reply to comment #3) > > Has this patch been submitted > > Yes. I have submitted to bug-gnu-emacs, as described on GNU Emacs webpage, but > the message have not appeared in the archives/gmane (I sent a few minutes > before submitting this bug). > It was duplicate of #9754. > > and approved upstream? > > No - at least I don't know about it. Probably no because "The Emacs 23 branch is no longer in use and won't be modified.". Yay for packages that don't have maintained stable version.
So there seem to be three possible fixes for this problem: 1) your patch from attachment 300159 [details, diff] 2) the patch posted to the upstream bug: <http://debbugs.gnu.org/cgi/bugreport.cgi?msg=14;filename=emacs-23.3-xgselect_init.patch;att=1;bug=9754> 3) the fix applied in upstream trunk (using xpalloc) AFAICS, we can't use 3) because xpalloc isn't available in Emacs 23. And although 1) may be more elegant, 2) is less intrusive so I would prefer it (after all, this is the stable branch). Since I cannot reproduce the problem here, can you confirm that 2) fixes it? (In reply to comment #6) > > > and approved upstream? > > Probably no because "The Emacs 23 branch is no longer in use and won't be > modified.". Yay for packages that don't have maintained stable version. Sometimes I also fail to understand upstream policy. Today they have released Emacs 23.4 from that branch that is "no longer in use".
Created attachment 300271 [details, diff] 09_all_xgselect-infloop.patch (In reply to comment #7) > Since I cannot reproduce the problem here, can you confirm that 2) fixes it? Or rather, could you try attached patch?
(In reply to comment #8) > Created attachment 300271 [details, diff] [details, diff] > 09_all_xgselect-infloop.patch > > (In reply to comment #7) > > Since I cannot reproduce the problem here, can you confirm that 2) fixes it? > > Or rather, could you try attached patch? It works.
Fixed in emacs-23.4-r1. Thank you for reporting this bug, and for pinpointing the problem.