Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Bug]: macosx subplot tool causes segfault when window closed #23653

Closed
Labels
GUI: MacOSXRelease criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
Milestone
@greglucas

Description

@greglucas

Bug summary

On current main, clicking on the subplot tool the additional figure pops up and can be interacted with properly, however when clicking the close button the app crashes with a segfault. Possibly trying to release an object that has already been released/garbage collected previously... I can only reproduce this by clicking the subplot button. Manually callingfig.canvas.toolbar.configure_subplots() seems to work fine when closing that window. Perhaps we need an explicit retain on the objc side...

This was brought about by the change to ARC in#23060. I'm going to put the release critical label on it, because a segfault seems worse than memory leaks. Probably smart to revert#23060 if no one has an immediate fix for it.

Code for reproduction

importmatplotlib.pyplotaspltplt.figure()plt.show()

Actual outcome

Relevant traceback:

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000020Exception Codes:       0x0000000000000001, 0x0000000000000020Exception Note:        EXC_CORPSE_NOTIFYTermination Reason:    Namespace SIGNAL, Code 11 Segmentation fault: 11Terminating Process:   exc handler [42279]VM Region Info: 0x20 is not in any region.  Bytes before following region: 140737486852064      REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL      UNUSED SPACE AT START--->        VM_ALLOCATE              7fffffe91000-7fffffe92000 [    4K] r-x/r-x SM=ALI  Thread 0 Crashed::  Dispatch queue: com.apple.main-thread0   libobjc.A.dylib                   0x7ff80c2cd01f objc_release + 311   libobjc.A.dylib                   0x7ff80c2d10da AutoreleasePoolPage::releaseUntil(objc_object**) + 1642   libobjc.A.dylib                   0x7ff80c2cdf5f objc_autoreleasePoolPop + 1683   CoreFoundation                    0x7ff80c4bfb8a _CFAutoreleasePoolPop + 224   Foundation                        0x7ff80d3334f0 -[NSAutoreleasePool drain] + 1335   AppKit                            0x7ff80ef2bf9b -[NSApplication run] + 6366   _macosx.cpython-310-darwin.so        0x1161d13c3 show + 211

Expected outcome

No segfault

Additional information

No response

Operating system

No response

Matplotlib Version

main

Matplotlib Backend

macosx

Python version

No response

Jupyter version

No response

Installation

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    GUI: MacOSXRelease criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp