Bug report #13982

QGIS crashes when plt.savefig() Matplotlib function is called

Added by Yury Ryabov almost 9 years ago. Updated over 7 years ago.

Status:Closed
Priority:High
Assignee:-
Category:Python plugins
Affected QGIS version:2.12.0 Regression?:No
Operating System:Windows Easy fix?:No
Pull Request or Patch supplied:No Resolution:not reproducable
Crashes QGIS or corrupts data:Yes Copied to github as #:21996

Description

On Windows (Linux is not affected) when plt.savefig() function from Matplotlib library is called QGIS crashes. Empty image is created during the process.

History

#1 Updated by Sandro Santilli almost 9 years ago

  • Status changed from Open to Feedback

Is this still happening with an updated version of Matplotlib and QGIS ?
If so:
- What versions are you using (both Matplotlib and QGIS) ?
- Can you produce a stacktrace ?
- Had you tried doing the same operation with Matplotlib alone ?

#2 Updated by Ludovic Granjon almost 9 years ago

Hi
Same thing for me on qgis 2.10.1 and 2.12.3 and matplotlib 1.3.1. Just on windows (7) no problem on linux.
With

import matplotlib.pyplot as plt
plt.plot([1,2,3,4])
plt.show()

and save figure on the gui give me a minidump

same if I try plt.savefig('myimage.png')

No problem if I try just with matplotlib outside QGIS but with matplotlib 1.3.0

#3 Updated by Ludovic Granjon almost 9 years ago

Ok the problem seems to be when I use png format. No problem with jpeg
Regards

#4 Updated by Giovanni Manghi over 8 years ago

  • Status changed from Feedback to Open
  • Category set to Python plugins

#5 Updated by Giovanni Manghi almost 8 years ago

  • Priority changed from Normal to High

#6 Updated by Giovanni Manghi over 7 years ago

  • Status changed from Open to Feedback

Is this still a problem in recent QGIS releases? Thanks.

#7 Updated by Giovanni Manghi over 7 years ago

  • Status changed from Feedback to Closed
  • Resolution set to not reproducable

Does not seems to be the case anymore on recent QGIS releases.

Also available in: Atom PDF