Gvim crashing in xmonad

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

Gvim crashing in xmonad

Anthony Campbell-3
If I start gvim in an xterm in xmonad, gvim always crashes when I try to
close it.

The following messages appear:

----------------------------------------------------------------------------------------------
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
gvim: ../../src/xcb_io.c:273: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.


Vim: Caught deadly signal ABRT

Press ENTER or type command to continueVim: Finished.
-----------------------------------------------------------------------------------------


If I use vim instead of gvim, everything is normal. If I use "gvim &" or
start gvim from a menu (dmenu), everything works correctly.



Any clues to what is happening here?





--
Anthony Campbell - [hidden email]
Microsoft-free zone - Using Debian GNU/Linux
http://www.acampbell.org.uk - sample my ebooks at
http://www.smashwords.com/profile/view/acampbell

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: Gvim crashing in xmonad

Taylor Hedberg
I use xmonad as well, but I cannot reproduce this error.

What version of Vim are you using? Can you try the same procedure in a
different window manager and see if you get the same result?

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: Gvim crashing in xmonad

Anthony Campbell-3
On 21 Sep 2011, Taylor Hedberg wrote:
> I use xmonad as well, but I cannot reproduce this error.
>
> What version of Vim are you using? Can you try the same procedure in a
> different window manager and see if you get the same result?
>
> --

Version 7.3, on Debian Sid. Happens in two different computers. It does
not happen with Icewm.  I tried using both xterm and rxvt-unicode - same
problem.



--
Anthony Campbell - [hidden email]
Microsoft-free zone - Using Debian GNU/Linux
http://www.acampbell.org.uk - sample my ebooks at
http://www.smashwords.com/profile/view/acampbell

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: Gvim crashing in xmonad - Workround

Anthony Campbell-3
On 21 Sep 2011, Anthony Campbell wrote:

> On 21 Sep 2011, Taylor Hedberg wrote:
> > I use xmonad as well, but I cannot reproduce this error.
> >
> > What version of Vim are you using? Can you try the same procedure in a
> > different window manager and see if you get the same result?
> >
> > --
>
> Version 7.3, on Debian Sid. Happens in two different computers. It does
> not happen with Icewm.  I tried using both xterm and rxvt-unicode - same
> problem.
>

I am using a simple workround, which is to alias gvim to gvim -f to
prevent it forking. Not ideal but at least it doesn't crash.



--
Anthony Campbell - [hidden email]
Microsoft-free zone - Using Debian GNU/Linux
http://www.acampbell.org.uk - sample my ebooks at
http://www.smashwords.com/profile/view/acampbell

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: Gvim crashing in xmonad - Workround

Taylor Hedberg
Anthony Campbell, Thu 2011-09-22 @ 09:13:10+0100:
> I am using a simple workround, which is to alias gvim to gvim -f to
> prevent it forking. Not ideal but at least it doesn't crash.

Sorry I can't be much more help. I'm simply not able to recreate the
problem on my machine, and I don't have a Debian system on hand to try
it on.

The only other thing I might suggest would be to compile the latest
version of Vim from Mercurial
<http://code.google.com/p/vim/source/checkout> and see if it still
happens. You didn't mention the patch level of the version you're using
(the 3rd number in the version string), and many of the patches that
have been released for 7.3 are bugfixes, so perhaps your issue has
already been addressed.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: Gvim crashing in xmonad - Workround

Anthony Campbell-3
On 22 Sep 2011, Taylor Hedberg wrote:

> Anthony Campbell, Thu 2011-09-22 @ 09:13:10+0100:
> > I am using a simple workround, which is to alias gvim to gvim -f to
> > prevent it forking. Not ideal but at least it doesn't crash.
>
> Sorry I can't be much more help. I'm simply not able to recreate the
> problem on my machine, and I don't have a Debian system on hand to try
> it on.
>
> The only other thing I might suggest would be to compile the latest
> version of Vim from Mercurial
> <http://code.google.com/p/vim/source/checkout> and see if it still
> happens. You didn't mention the patch level of the version you're using
> (the 3rd number in the version string), and many of the patches that
> have been released for 7.3 are bugfixes, so perhaps your issue has
> already been addressed.
>

I'll look into that. Meanwhile, I'm wondering if it has something to do
with the xcb libraries. I tried it on a third computer running the
stable version of Debian and it worked without error.

--
Anthony Campbell - [hidden email]
Microsoft-free zone - Using Debian GNU/Linux
http://www.acampbell.org.uk - sample my ebooks at
http://www.smashwords.com/profile/view/acampbell

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Conditional bundle loading?

Matt
In reply to this post by Anthony Campbell-3
I would like to know if there is a way to conditionally load a bundle, or if there is an way to load a bundle manually.

I was getting really long load times (on the order of 30 seconds) for vim (7.3.230 OS X), through some effort I tracked this
down to the syntastic bundle.  I like this bundle and it is really useful sometimes, but most of the time it is not needed for
the files I am editing.  

Is there a way to create a map to load this module, or have it load conditionally?

Thanks,

Matt

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: Conditional bundle loading?

Taylor Hedberg
Off-topic: Why is this posted in reply to "Gvim crashing in xmonad"?


Matt Martini, Thu 2011-09-22 @ 13:47:30-0400:
> I would like to know if there is a way to conditionally load a bundle,
> or if there is an way to load a bundle manually.

What do you mean by "bundle"? Are you referring to Vim plugins in
general, or do you mean Pathogen bundles, which are a specific technique
for managing plugins, not part of Vim itself? It looks like you're just
referring to plugins, but it could make a difference.


> I was getting really long load times (on the order of 30 seconds) for
> vim (7.3.230 OS X), through some effort I tracked this down to the
> syntastic bundle.  I like this bundle and it is really useful
> sometimes, but most of the time it is not needed for the files I am
> editing.  
>
> Is there a way to create a map to load this module, or have it load
> conditionally?

Most plugins check a particular global variable and exit without loading
if it is defined. Looking at the code for Syntastic in particular, you
can see that it checks for `g:loaded_syntastic_plugin` to be defined. If
you define that variable before it loads, say, in your .vimrc, then
Syntastic will stop loading automatically.

Since the script is just plugin/syntastic.vim in your .vim directory,
you can then use `:source ~/.vim/plugin/syntastic.vim` to load it on the
fly. Make sure to `:unlet g:loaded_syntastic_plugin` first though, or it
will have no effect.

And yes, you could define a command or mapping to make that process more
automatic if you find it cumbersome to type that out each time.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: Conditional bundle loading?

Matt

On Sep 22, 2011, at 2:12 PM, Taylor Hedberg wrote:

> Off-topic: Why is this posted in reply to "Gvim crashing in xmonad"?

Not sure.

>
>
> Matt Martini, Thu 2011-09-22 @ 13:47:30-0400:
>> I would like to know if there is a way to conditionally load a bundle,
>> or if there is an way to load a bundle manually.
>
> What do you mean by "bundle"? Are you referring to Vim plugins in
> general, or do you mean Pathogen bundles, which are a specific technique
> for managing plugins, not part of Vim itself? It looks like you're just
> referring to plugins, but it could make a difference.
>

Actually, I am using pathogen.

>
>> I was getting really long load times (on the order of 30 seconds) for
>> vim (7.3.230 OS X), through some effort I tracked this down to the
>> syntastic bundle.  I like this bundle and it is really useful
>> sometimes, but most of the time it is not needed for the files I am
>> editing.  
>>
>> Is there a way to create a map to load this module, or have it load
>> conditionally?
>
> Most plugins check a particular global variable and exit without loading
> if it is defined. Looking at the code for Syntastic in particular, you
> can see that it checks for `g:loaded_syntastic_plugin` to be defined. If
> you define that variable before it loads, say, in your .vimrc, then
> Syntastic will stop loading automatically.

This worked to stop the loading of Syntastic and sped up vim startup 100 fold.

>
> Since the script is just plugin/syntastic.vim in your .vim directory,
> you can then use `:source ~/.vim/plugin/syntastic.vim` to load it on the
> fly. Make sure to `:unlet g:loaded_syntastic_plugin` first though, or it
> will have no effect.

What would I do to get this to work since I am using Pathogen?  

I guess I could pull syntastic out of pathogen, but this would make it more difficult to keep multiple machines in sync.

>
> And yes, you could define a command or mapping to make that process more
> automatic if you find it cumbersome to type that out each time.
>

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: Conditional bundle loading?

Taylor Hedberg
Matt Martini, Thu 2011-09-22 @ 15:28:47-0400:
> What would I do to get this to work since I am using Pathogen?  

Just use `:source ~/.vim/bundle/Syntastic/plugin/syntastic.vim` (or
whatever the correct path to the syntastic.vim file is) instead of the
source command I mentioned previously.

It's possible that it could get confused because the other files
associated with the plugin are going to be in the bundle subdirectory as
well, instead of in their canonical locations, but Pathogen may have
some mechanism that makes this transparent, I'm not sure.

Scripts in your .vim/plugin directory (or .vim/bundle/*/plugin
directories, if you're using Pathogen) are automatically sourced at
startup. All this technique is really doing is making it a manual
process instead. You're doing by hand what Vim would normally do
automatically, and thus able to defer it until you really need it.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: Conditional bundle loading?

tyru-2
In reply to this post by Matt


2011/09/23 2:47 "Matt Martini" <[hidden email]>:
>
> I would like to know if there is a way to conditionally load a bundle, or if there is an way to load a bundle manually.

rtputil.vim has the functionality to load a bundle manually.
https://github.vim/thinca/vim-rtputil

>
> I was getting really long load times (on the order of 30 seconds) for vim (7.3.230 OS X), through some effort I tracked this
> down to the syntastic bundle.  I like this bundle and it is really useful sometimes, but most of the time it is not needed for
> the files I am editing.
>
> Is there a way to create a map to load this module, or have it load conditionally?
>
> Thanks,
>
> Matt
>
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: Conditional bundle loading?

tyru-2


2011/09/23 8:38 "tyru" <[hidden email]>:
>
>
> 2011/09/23 2:47 "Matt Martini" <[hidden email]>:
>
> >
> > I would like to know if there is a way to conditionally load a bundle, or if there is an way to load a bundle manually.
>
> rtputil.vim has the functionality to load a bundle manually.
> https://github.vim/thinca/vim-rtputil

Oops... URL is wrong.
https://github.com/thinca/vim-rtputil

>
> >
> > I was getting really long load times (on the order of 30 seconds) for vim (7.3.230 OS X), through some effort I tracked this
> > down to the syntastic bundle.  I like this bundle and it is really useful sometimes, but most of the time it is not needed for
> > the files I am editing.
> >
> > Is there a way to create a map to load this module, or have it load conditionally?
> >
> > Thanks,
> >
> > Matt
> >
> > --
>
> > You received this message from the "vim_use" maillist.
> > Do not top-post! Type your reply below the text you are replying to.
> > For more information, visit http://www.vim.org/maillist.php

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: Conditional bundle loading?

Marcin Szamotulski
On 08:41 Fri 23 Sep     , tyru wrote:

> 2011/09/23 8:38 "tyru" <[hidden email]>:
> >
> >
> > 2011/09/23 2:47 "Matt Martini" <[hidden email]>:
> >
> > >
> > > I would like to know if there is a way to conditionally load a bundle,
> or if there is an way to load a bundle manually.
> >
> > rtputil.vim has the functionality to load a bundle manually.
> > https://github.vim/thinca/vim-rtputil
>
> Oops... URL is wrong.
> https://github.com/thinca/vim-rtputil
>
> >
> > >
> > > I was getting really long load times (on the order of 30 seconds) for
> vim (7.3.230 OS X), through some effort I tracked this
> > > down to the syntastic bundle.  I like this bundle and it is really
> useful sometimes, but most of the time it is not needed for
> > > the files I am editing.
> > >
> > > Is there a way to create a map to load this module, or have it load
> conditionally?
> > >
> > > Thanks,
> > >
> > > Matt
> > >
> > > --
> >
> > > You received this message from the "vim_use" maillist.
> > > Do not top-post! Type your reply below the text you are replying to.
> > > For more information, visit http://www.vim.org/maillist.php
>
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php

Also with vim-addon-manager it is possible to load chosen plugins at startup
and other load in specific occasions. This also can be done using autocommands.
http://www.vim.org/scripts/script.php?script_id=2905

Best,
Marcin

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: Conditional bundle loading?

Charles Campbell
In reply to this post by tyru-2
tyru wrote:

>
>
> 2011/09/23 2:47 "Matt Martini" <[hidden email]
> <mailto:[hidden email]>>:
> >
> > I would like to know if there is a way to conditionally load a
> bundle, or if there is an way to load a bundle manually.
>
> rtputil.vim has the functionality to load a bundle manually.
> https://github.vim/thinca/vim-rtputil
>
> >
> > I was getting really long load times (on the order of 30 seconds)
> for vim (7.3.230 OS X), through some effort I tracked this
> > down to the syntastic bundle.  I like this bundle and it is really
> useful sometimes, but most of the time it is not needed for
> > the files I am editing.
> >
> > Is there a way to create a map to load this module, or have it load
> conditionally?
>
AsNeeded provides on-demand loading; put what would normally go in
.vim/plugin
and it will be loaded when requested.  By request means: when one has
issued a
command or called a function in the plugin.  Unfortunately, it does not do
on-demand loading based on maps that may be defined in the plugin.

You may get it from:

     http://vim.sourceforge.net/scripts/script.php?script_id=915   (stable)
     http://mysite.verizon.net/astronaut/vim/index.html#ASNEEDED 
(cutting edge)

I don't know how or even if it will work with Weber's "bundles".

Regards,
Chip Campbell

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php