I have a program that produces plots from data. I can produce a jpg or png from the plot. Just recently, the program started crashing after writing the image to a file. The only thing I can think of that has changed is that my MacBook got updated from Monterey to Ventura. The code has not changed. I can't definitively say that the OS change coincided with the problem but it's the only thing that has changed recently.
The code is:
def PlotCopy(self): # Save image file PNG (default) or JPG to disk
.
.
.
if gp.PNGFlag:bitmap.SaveFile(PNGname, wx.BITMAP_TYPE_PNG)
if gp.JPGFlag:bitmap.SaveFile(JPGname, wx.BITMAP_TYPE_JPEG)
print('Save Plot ',PNGname)
If the code executes (one or more of the flags is True) then the image is written to disk, the print command executes, and the program halts with: "Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)". The code immediately following the call to PlotCopy is not executed.
If the code does not execute (the flags are both False) the program exits the subroutine PlotCopy and continues as before.
Since the program gets to the print command, and since the image file is successfully generated, I'm not sure why the program crashes on exit from the PlotCopy routine.
Any ideas out there?