GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — segfault: fill_between with Python3 · Issue #4210 · matplotlib/matplotlib

segfault: fill_between with Python3 #4210

New issue
Copy link
New issue
Copy link
Closed
Closed
segfault: fill_between with Python3#4210
Copy link
Labels
backend: agg
Milestone
v2.0.0

Description

@bbolker
bbolker
opened on Mar 11, 2015
Issue body actions

I'm getting a reproducible segfault using fill_between in Python 3, but not Python 2, on Ubuntu 12.04 but not on MacOS (these are slightly different versions of Python3/matplotlib, and the Ubuntu is sitting in a virtual box/on a virtual filesystem).

I can try to update my Python3 version, but I'm curious whether anyone else has seen this.

Linux: ubuntu-10-new 3.2.0-77-generic-pae #112-Ubuntu, Python3 version 3.2.3 (matplotlib 1.5.dev1), Python 2.7.3 (matplotlib 1.1.1rc)
MacOS: 10.9.5 (13.4.0 Darwin Kernel Version 13.4.0), Python3 3.4.2 (matplotlib 1.4.2), Python 2.7.3 (matplotlib 1.1.1)

import numpy as np
from matplotlib import pyplot as plt

def u(t,shift=0):
    b = np.logical_and(shift<t,t<(1+shift))
    return(b.astype(float))

t = np.arange(0,2,1/40.)
plt.plot(t,u(t),color="red")
plt.ylim(0,1.25)
plt.xlim(-1,3)
plt.fill_between(t,u(t),facecolor="red",alpha=0.5)
plt.plot(t,u(t,0.75),color="blue")
plt.fill_between(t,u(t,0.75),facecolor="blue",alpha=0.5)

plt.savefig("fill_between.png")

Activity

  1. jenshnielsen commented on Mar 11, 2015

    @jenshnielsen
    jenshnielsen
    on Mar 11, 2015
    Member
    More actions

    Which version of matplotlib? I cannot reproduce it with Matplotlib 1.4.3 on Conda (Python 3.4.3) on Ubuntu 14.04

  2. bbolker commented on Mar 11, 2015

    @bbolker
    bbolker
    on Mar 11, 2015
    Author
    More actions

    1.5.dev1 (I edited my report above to include all the matplotlib versions) [I'm not sure how I ended up with development version!]

  3. mdboom
    self-assigned this
    on Mar 11, 2015
  4. mdboom commented on Mar 11, 2015

    @mdboom
    mdboom
    on Mar 11, 2015
    Member
    More actions

    I'm having trouble reproducing this. Do you know the githash of the development version of matplotlib you are running? (1.5.dev1 doesn't uniquely identify a version, but just means it's "current git master"). I think it's possible this bug has already been fixed.

  5. bbolker commented on Mar 11, 2015

    @bbolker
    bbolker
    on Mar 11, 2015
    Author
    More actions

    still getting segfault with latest version installed (after a bit of struggle). This is on a 32-bit (virtual) system, I wonder if there's a possibility that that's the issue?

  6. mdboom
    removed their assignment
    on Mar 11, 2015
  7. mdboom commented on Mar 11, 2015

    @mdboom
    mdboom
    on Mar 11, 2015
    Member
    More actions

    Ah -- I didn't try on a 32-bit system. Let's see if that helps me reproduce.

  8. mdboom commented on Mar 11, 2015

    @mdboom
    mdboom
    on Mar 11, 2015
    Member
    More actions

    I tried to replicate your environment as best I could -- Debian 32-bit, Python 3.2.3, matplotlib master. Still can't reproduce. What version of Numpy is involved here?

  9. bbolker commented on Mar 11, 2015

    @bbolker
    bbolker
    on Mar 11, 2015
    Author
    More actions

    1.9.1 . Sorry this is such a hassle. I can live without it as long as it's not causing anyone else any trouble ...

  10. tacaswell
    added this to the This milestone has been deleted milestone on Mar 11, 2015
  11. mdboom commented on Mar 11, 2015

    @mdboom
    mdboom
    on Mar 11, 2015
    Member
    More actions

    Hmm... I was using the same Numpy. So I guess it remains a mystery.

    If you're able to get a traceback from gdb for the segfault that might help.

    Short instructions:

    gdb `which python3`
    run /path/to/example_script
    bt
    
  12. bbolker commented on Mar 11, 2015

    @bbolker
    bbolker
    on Mar 11, 2015
    Author
    More actions

    gdb output:

    Starting program: /usr/bin/python3 ~/classes/math1mp3/math1mp/notes/fill_between.py
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
    [New Thread 0xb6579b40 (LWP 11674)]
    
    Program received signal SIGSEGV, Segmentation fault.
    agg::rasterizer_cells_aa<agg::cell_aa>::line (this=0xa3f550c, x1=715827882, 
        y1=-90721, x2=713031679, y2=-90721)
        at extern/agg24-svn/include/agg_rasterizer_cells_aa.h:320
    320     void rasterizer_cells_aa<Cell>::line(int x1, int y1, int x2, int y2)
    

    Beginning of backtrace:

    #0  agg::rasterizer_cells_aa<agg::cell_aa>::line (this=0xa3f550c, 
        x1=715827882, y1=-90721, x2=713031679, y2=-90721)
        at extern/agg24-svn/include/agg_rasterizer_cells_aa.h:320
    #1  0xb5d37c5e in agg::rasterizer_cells_aa<agg::cell_aa>::line (
        this=0xa3f550c, x1=715827882, y1=-90721, x2=710235476, y2=-90721)
        at extern/agg24-svn/include/agg_rasterizer_cells_aa.h:330
    #2  0xb5d37c5e in agg::rasterizer_cells_aa<agg::cell_aa>::line (
        this=0xa3f550c, x1=715827882, y1=-90721, x2=704643071, y2=-90721)
        at extern/agg24-svn/include/agg_rasterizer_cells_aa.h:330
    #3  0xb5d37c5e in agg::rasterizer_cells_aa<agg::cell_aa>::line (
        this=0xa3f550c, x1=715827882, y1=-90721, x2=693458260, y2=-90721)
        at extern/agg24-svn/include/agg_rasterizer_cells_aa.h:330
    #4  0xb5d37c5e in agg::rasterizer_cells_aa<agg::cell_aa>::line (
        this=0xa3f550c, x1=715827882, y1=-90721, x2=671088639, y2=-90721)
        at extern/agg24-svn/include/agg_rasterizer_cells_aa.h:330
    #5  0xb5d37c5e in agg::rasterizer_cells_aa<agg::cell_aa>::line (
        this=0xa3f550c, x1=715827882, y1=-90721, x2=626349396, y2=-90721)
        at extern/agg24-svn/include/agg_rasterizer_cells_aa.h:330
    #6  0xb5d37c5e in agg::rasterizer_cells_aa<agg::cell_aa>::line (
        this=0xa3f550c, x1=715827882, y1=-90721, x2=536870911, y2=-90721)
        at extern/agg24-svn/include/agg_rasterizer_cells_aa.h:330
    #7  0xb5d37c5e in agg::rasterizer_cells_aa<agg::cell_aa>::line (
    

    ... seems to go on nearly identically for a long time after this.

    I'm happy to continue with this if it's helpful or drop it if it's not.

  13. tacaswell commented on Mar 12, 2015

    @tacaswell
    tacaswell
    on Mar 12, 2015
    Member
    More actions

    Can you try deleting everything about your mpl install and the re-installing from current master? I am a bit worried that what is happening is that you have a mixture of old and new c++ extensions (as you commented you were unsure on how the dev version got installed) that are stepping on each other's toes.

  14. tacaswell
    added
    backend: agg
    on Mar 12, 2015
  15. bbolker commented on Mar 12, 2015

    @bbolker
    bbolker
    on Mar 12, 2015
    Author
    More actions

    I will try; I may not have time for a couple of days (thanks for your patience).

  16. tacaswell
    modified the milestones: This milestone has been deleted, This milestone has been deleted on Oct 26, 2015
  17. QuLogic commented on Jan 7, 2016

    @QuLogic
    QuLogic
    on Jan 7, 2016
    Member
    More actions

    Ping?

  18. tacaswell commented on Feb 15, 2016

    @tacaswell
    tacaswell
    on Feb 15, 2016
    Member
    More actions

    Closing due to inactivity and this not failing on travis.

  19. tacaswell
    closed this as completedon Feb 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backend: agg

    Type

    No type

    Projects

    No projects

      Milestone

      • v2.0.0

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.