Skip to content

Infinite xdg-open threads #4

Description

@icaroperseo

Hi!

I am currently having the following issue: Every time I run :Mpreview infinite xdg-open threads begin to be generated regardless of whether the browser is running or not, filling the RAM memory and swap until the system collapses. The threads continue to be generated despite closing the browser and editor. Killing processes does not seem to help (continue to be generated).

See below for details:

  • S.O.: Manjaro Linux x86_64.
  • R.A.M. and swap: 8G
  • D.E.: KDE 5.
  • Browser: Brave 0.12.14
  • Editor: NeoVim 0.1.7
  • Node: 7.2.1
  • Plugin system: Plug

Both the operating system and the plug-in are up to date. So far I have not had any problems using xdg-open & Brave, so I have not tried to establish another browser as default. I hope I have been as specific as possible.

Best regards.

Activity

  1. self-assigned this
    on Dec 15, 2016
  2. mklabs commented on Dec 15, 2016

    @mklabs
    Member

    Hi!

    Thanks for the detailed explanation. This is related to the recent PR #3, @yousefamar did you run into similar issues with xdg-open ?

    Unfortunately, I'm running osx and won't be able to test until this week end on a linux box.

  3. icaroperseo commented on Dec 15, 2016

    @icaroperseo
    Author

    Hi @mklabs! Thanks for answering.

    Investigating a little I found that the problem is O.S./xdg-open related, context: https://superuser.com/questions/1007807/xdg-open-hogging-the-cpu-by-forking-itself-endlessly

    I have solved the problem by setting the following variable in my ~/.bashrc file (with the path to the browser you want to use):

    export BROWSER=/usr/bin/brave

    Previously I had never presented this situation, so I could not determine exactly where is the root of the issue (maybe it's the combination xdg-open & Brave browser but very surely I'm speculating).

    Regards.

  4. yousefamar commented on Jan 4, 2017

    @yousefamar
    Contributor

    Hi @icaroperseo, that's weird indeed since I believe xdg-open is supposed to try opening by MIME type before resorting to BROWSER and that shouldn't be xdg-open by default unless something else is setting it.

    Could you do me a favour and replace the line that loads this plugin in your init.vim with:

    Plug 'yousefamar/mdown.vim', { 'branch': 'patch-1', 'do': 'npm install' }
    

    then run

    :PlugClean
    :PlugInstall
    

    and see if the issue still persists? This fork is identical to upstream, except that it opens the browser using node-open, which does exactly the same thing except it's bundled with it's own xdg-open script, meaning no external dependencies.

    If it doesn't, and @mklabs is ok with it, then I'll make a PR to close this issue.

  5. mklabs commented on Jan 4, 2017

    @mklabs
    Member

    @yousefamar Thanks for the detailed explanation. I'd be happy to merge it if you do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions