FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

segfault: fill_between with Python3 · Issue #4210 · matplotlib/matplotlib · GitHub

Repository navigation

segfault: fill_between with Python3 #4210

Closed

Description

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

    Member

    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

    Author

    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. self-assigned this
    on Mar 11, 2015
  4. mdboom commented on Mar 11, 2015

    Member

    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

    Author

    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. removed their assignment
    on Mar 11, 2015
  7. mdboom commented on Mar 11, 2015

    Member

    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

    Member

    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

    Author

    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. added this to the milestone on Mar 11, 2015
  11. mdboom commented on Mar 11, 2015

    Member

    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

    Author

    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

    Member

    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. bbolker commented on Mar 12, 2015

    Author

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

  15. modified the milestones: , on Oct 26, 2015
  16. QuLogic commented on Jan 7, 2016

    Member

    Ping?

  17. tacaswell commented on Feb 15, 2016

    Member

    Closing due to inactivity and this not failing on travis.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL