Raspberry Pi Matplotlib causes system crash

Bug #1031154 reported by cfox
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Raspbian
Expired
Undecided
Unassigned

Bug Description

Using Raspbian on the raspberry pi, importing the matplotlib package in python causes the system to permanently hang. No user input via ssh is accepted (including CTRL-C to exit out of Python). The system hasn't technically crashed since it will still respond to pings, but it becomes completely unable to accept any commands.

I have noticed the same error in the mathgl module (see related bug report).

How to reproduce:
0. Install python-matplotlib.
1. Run python interactively.
2. "import matplotlib"

Revision history for this message
peter green (plugwash) wrote :

I've just tried and failed to reproduce this. Are you still having problems with python-matplotlib on an up to date raspbian system with a recent kernel.

Changed in raspbian:
status: New → Incomplete
Revision history for this message
qtfp (qt76fp) wrote :

I also encountered this problem. I also import matplotlib.
My program was about real time playing of Temperature.
It crashed after the program started for quite awhile. If I shortened the renew time of the plot, it would crashed within a short time.
I also got the permanently hang.
The points I plotted were only about 1000
Here is my code

        xAchse=pylab.array([])
        yAchse=pylab.array([])
        self.fig=pylab.figure(1)
        self.fig_ax=self.fig.add_subplot(111)
        self.fig_ax.grid(True)
        self.fig_ax.set_title("Temperature-Time")
        self.fig_ax.set_xlabel("Time(minutes)")
        self.fig_ax.set_ylabel("Temperature(Celsius)")
        self.line1=self.fig_ax.plot(xAchse,yAchse,'r-')
        #self.line2=self.fig_ax.plot(xAchse,yAchse,'-')

        self.fig_ax2 = self.fig_ax.twinx()
        self.fig_ax2.set_ylabel("Wind Speed(%)",color='b')
        self.line_wind1=self.fig_ax2.plot(xAchse,yAchse,'b-')
        for tl in self.fig_ax2.get_yticklabels():
            tl.set_color('b')
                    #use FigureCanvasTkAgg to bind to tk
        self.canvas=FigureCanvasTkAgg(self.fig, master=self.myContainer_output)
        self.canvas.show()
        self.canvas.get_tk_widget().pack(side=TOP, fill=BOTH, expand=1)

      def RealtimePloter(self):
        #while True:
        # time.sleep(3)
        print "RealtimePloter is alive"
        if not self.que_to_plot.empty():
            while not self.que_to_plot.empty():
                tuple_data=self.que_to_plot.get()
            line1_X=pylab.array(tuple_data[0])
            line1_Y=pylab.array(tuple_data[1])
            line1_X_wind=pylab.array(tuple_data[2])
            line1_Y_wind=pylab.array(tuple_data[3])
            print "LX="+str(len(line1_X))+" LY="+str(len(line1_Y))+" LXW="+str(len(line1_X_wind))+" LYW="+str(len(line1_Y_wind))

            #self.line1[0].set_data(line1_X,line1_Y)
            #elf.fig_ax2.axis([(line1_X.min()-1),(line1_X.max()+1),0,100])
            #self.fig_ax.axis([(line1_X.min()-1),(line1_X.max()+1),line1_Y.min()-2,line1_Y.max()+2])
            #self.canvas.draw()
        self.root.after(self.RealtimePloter_period,self.RealtimePloter)

Revision history for this message
Diederik (didi-debian) wrote :

I've tried to reproduce this issue on both a wheezy (Pi 1B) and a jessie (Pi 2B) system ... and failed.
Furthermore this issue is 3+ years old without a response ...
Do you still want to keep this issue open?

@qt76fp: I failed to run your program since the source code is incomplete ...

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Raspbian because there has been no activity for 60 days.]

Changed in raspbian:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.