Skip to content

Various cleanups to macosx backend. #17702

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Jun 20, 2020

PR Summary

... noted while working on #17687...

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

Copy link
Member

@tacaswell tacaswell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These all seem fine to me, but would like the 2 reviewers on this to me regular mac users.

@anntzer anntzer force-pushed the macosxclean branch 3 times, most recently from e35473a to fe9c20c Compare June 23, 2020 07:42
@jkseppan
Copy link
Member

The following crashes for me (macOS 10.15.6 Catalina) on this branch but not on master:

$ ipython
Python 3.8.3 (default, Jul 27 2020, 08:19:00)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.16.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: from matplotlib import pyplot as plt

In [2]: plt.plot([3,1,4,1,5,9,2])
Out[2]: [<matplotlib.lines.Line2D at 0x1233e7f70>]

In [3]: plt.title(r'$\pi$')
Out[3]: Text(0.5, 1.0, '$\\pi$')

In [4]: plt.show()

Then click on the subplot-adjustment button.

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000008
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Segmentation fault: 11
Termination Reason:    Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [16783]

VM Regions Near 0x8:
--> 
    __TEXT                 000000010fc3d000-000000010fe93000 [ 2392K] r-x/r-x SM=COW  /Users/USER/*/*.8

Application Specific Information:
Performing @selector(configure_subplots:) from sender NSButton 0x7ff3a6d42460

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   python3.8                     	0x000000010fd65eb3 _PyArg_ParseTuple_SizeT + 131
1   _macosx.cpython-38-darwin.so  	0x000000011f6c9faa -[NavigationToolbar2Handler configure_subplots:] + 346
2   com.apple.AppKit              	0x00007fff326967a7 -[NSApplication(NSResponder) sendAction:to:from:] + 299
3   com.apple.AppKit              	0x00007fff32696642 -[NSControl sendAction:to:] + 86
4   com.apple.AppKit              	0x00007fff32696574 __26-[NSCell _sendActionFrom:]_block_invoke + 136
5   com.apple.AppKit              	0x00007fff32696476 -[NSCell _sendActionFrom:] + 171
6   com.apple.AppKit              	0x00007fff326963bd -[NSButtonCell _sendActionFrom:] + 96
7   com.apple.AppKit              	0x00007fff3269269b NSControlTrackMouse + 1745
8   com.apple.AppKit              	0x00007fff32691fa2 -[NSCell trackMouse:inRect:ofView:untilMouseUp:] + 130
9   com.apple.AppKit              	0x00007fff32691e61 -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:] + 691
10  com.apple.AppKit              	0x00007fff326911dd -[NSControl mouseDown:] + 748
11  com.apple.AppKit              	0x00007fff3268f5f0 -[NSWindow(NSEventRouting) _handleMouseDownEvent:isDelayedEvent:] + 4914
12  com.apple.AppKit              	0x00007fff325f9e21 -[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] + 2612
13  com.apple.AppKit              	0x00007fff325f91c9 -[NSWindow(NSEventRouting) sendEvent:] + 349
14  com.apple.AppKit              	0x00007fff325f7554 -[NSApplication(NSEvent) sendEvent:] + 352
15  com.apple.AppKit              	0x00007fff324445bf -[NSApplication run] + 707
16  _macosx.cpython-38-darwin.so  	0x000000011f6ccf62 show + 162
17  python3.8                     	0x000000010fca0f3f cfunction_vectorcall_NOARGS + 207
18  python3.8                     	0x000000010fd47932 call_function + 354
19  python3.8                     	0x000000010fd4415d _PyEval_EvalFrameDefault + 30253
20  python3.8                     	0x000000010fc60cdd function_code_fastcall + 237
21  python3.8                     	0x000000010fd47932 call_function + 354
22  python3.8                     	0x000000010fd4415d _PyEval_EvalFrameDefault + 30253
23  python3.8                     	0x000000010fd48ac3 _PyEval_EvalCodeWithName + 3459
24  python3.8                     	0x000000010fc60e5e _PyFunction_Vectorcall + 254
25  python3.8                     	0x000000010fc638bf method_vectorcall + 319
26  python3.8                     	0x000000010fc6066c PyVectorcall_Call + 108
27  python3.8                     	0x000000010fd444ab _PyEval_EvalFrameDefault + 31099
28  python3.8                     	0x000000010fd48ac3 _PyEval_EvalCodeWithName + 3459
29  python3.8                     	0x000000010fc60e5e _PyFunction_Vectorcall + 254
30  python3.8                     	0x000000010fd47932 call_function + 354
31  python3.8                     	0x000000010fd4415d _PyEval_EvalFrameDefault + 30253
32  python3.8                     	0x000000010fd48ac3 _PyEval_EvalCodeWithName + 3459
33  python3.8                     	0x000000010fd3ca90 PyEval_EvalCode + 48
34  python3.8                     	0x000000010fd39db5 builtin_exec + 661
35  python3.8                     	0x000000010fca0d41 cfunction_vectorcall_FASTCALL + 177
36  python3.8                     	0x000000010fd47932 call_function + 354
37  python3.8                     	0x000000010fd44206 _PyEval_EvalFrameDefault + 30422
38  python3.8                     	0x000000010fc71ba2 gen_send_ex + 242
39  python3.8                     	0x000000010fd3f9cf _PyEval_EvalFrameDefault + 11935
40  python3.8                     	0x000000010fc71ba2 gen_send_ex + 242
41  python3.8                     	0x000000010fd3f9cf _PyEval_EvalFrameDefault + 11935
42  python3.8                     	0x000000010fc71ba2 gen_send_ex + 242
43  python3.8                     	0x000000010fc6a564 method_vectorcall_O + 244
44  python3.8                     	0x000000010fd47932 call_function + 354
45  python3.8                     	0x000000010fd44140 _PyEval_EvalFrameDefault + 30224
46  python3.8                     	0x000000010fc60cdd function_code_fastcall + 237
47  python3.8                     	0x000000010fd47932 call_function + 354
48  python3.8                     	0x000000010fd44206 _PyEval_EvalFrameDefault + 30422
49  python3.8                     	0x000000010fc60cdd function_code_fastcall + 237
50  python3.8                     	0x000000010fd47932 call_function + 354
51  python3.8                     	0x000000010fd44140 _PyEval_EvalFrameDefault + 30224
52  python3.8                     	0x000000010fd48ac3 _PyEval_EvalCodeWithName + 3459
53  python3.8                     	0x000000010fc60e5e _PyFunction_Vectorcall + 254
54  python3.8                     	0x000000010fc6382b method_vectorcall + 171
55  python3.8                     	0x000000010fd47932 call_function + 354
56  python3.8                     	0x000000010fd442c2 _PyEval_EvalFrameDefault + 30610
57  python3.8                     	0x000000010fd48ac3 _PyEval_EvalCodeWithName + 3459
58  python3.8                     	0x000000010fc60e5e _PyFunction_Vectorcall + 254
59  python3.8                     	0x000000010fd47932 call_function + 354
60  python3.8                     	0x000000010fd44140 _PyEval_EvalFrameDefault + 30224
61  python3.8                     	0x000000010fd48ac3 _PyEval_EvalCodeWithName + 3459
62  python3.8                     	0x000000010fc60e5e _PyFunction_Vectorcall + 254
63  python3.8                     	0x000000010fd47932 call_function + 354
64  python3.8                     	0x000000010fd44140 _PyEval_EvalFrameDefault + 30224
65  python3.8                     	0x000000010fc60cdd function_code_fastcall + 237
66  python3.8                     	0x000000010fd47932 call_function + 354
67  python3.8                     	0x000000010fd44140 _PyEval_EvalFrameDefault + 30224
68  python3.8                     	0x000000010fd48ac3 _PyEval_EvalCodeWithName + 3459
69  python3.8                     	0x000000010fc60e5e _PyFunction_Vectorcall + 254
70  python3.8                     	0x000000010fc63933 method_vectorcall + 435
71  python3.8                     	0x000000010fc6066c PyVectorcall_Call + 108
72  python3.8                     	0x000000010fd444ab _PyEval_EvalFrameDefault + 31099
73  python3.8                     	0x000000010fd48ac3 _PyEval_EvalCodeWithName + 3459
74  python3.8                     	0x000000010fc60e5e _PyFunction_Vectorcall + 254
75  python3.8                     	0x000000010fd47932 call_function + 354
76  python3.8                     	0x000000010fd44206 _PyEval_EvalFrameDefault + 30422
77  python3.8                     	0x000000010fd48ac3 _PyEval_EvalCodeWithName + 3459
78  python3.8                     	0x000000010fd3ca90 PyEval_EvalCode + 48
79  python3.8                     	0x000000010fd8f743 PyRun_FileExFlags + 291
80  python3.8                     	0x000000010fd8eb3f PyRun_SimpleFileExFlags + 271
81  python3.8                     	0x000000010fdaea7d Py_RunMain + 2189
82  python3.8                     	0x000000010fdaf026 pymain_main + 406
83  python3.8                     	0x000000010fdaf07b Py_BytesMain + 43
84  libdyld.dylib                 	0x00007fff6f0b5cc9 start + 1

Thread 1:
0   libsystem_kernel.dylib        	0x00007fff6f1f9882 __psynch_cvwait + 10
1   libsystem_pthread.dylib       	0x00007fff6f2ba425 _pthread_cond_wait + 698
2   python3.8                     	0x000000010fd9d0af PyThread_acquire_lock_timed + 559
3   python3.8                     	0x000000010fdec7df acquire_timed + 111
4   python3.8                     	0x000000010fdec56c lock_PyThread_acquire_lock + 44
5   python3.8                     	0x000000010fc69f5c method_vectorcall_VARARGS_KEYWORDS + 332
6   python3.8                     	0x000000010fd47932 call_function + 354
7   python3.8                     	0x000000010fd44140 _PyEval_EvalFrameDefault + 30224
8   python3.8                     	0x000000010fd48ac3 _PyEval_EvalCodeWithName + 3459
9   python3.8                     	0x000000010fc60e5e _PyFunction_Vectorcall + 254
10  python3.8                     	0x000000010fd47932 call_function + 354
11  python3.8                     	0x000000010fd44140 _PyEval_EvalFrameDefault + 30224
12  python3.8                     	0x000000010fd48ac3 _PyEval_EvalCodeWithName + 3459
13  python3.8                     	0x000000010fc60e5e _PyFunction_Vectorcall + 254
14  python3.8                     	0x000000010fd47932 call_function + 354
15  python3.8                     	0x000000010fd44140 _PyEval_EvalFrameDefault + 30224
16  python3.8                     	0x000000010fc60cdd function_code_fastcall + 237
17  python3.8                     	0x000000010fc6066c PyVectorcall_Call + 108
18  python3.8                     	0x000000010fd444ab _PyEval_EvalFrameDefault + 31099
19  python3.8                     	0x000000010fd48ac3 _PyEval_EvalCodeWithName + 3459
20  python3.8                     	0x000000010fc60e5e _PyFunction_Vectorcall + 254
21  python3.8                     	0x000000010fd47932 call_function + 354
22  python3.8                     	0x000000010fd44206 _PyEval_EvalFrameDefault + 30422
23  python3.8                     	0x000000010fc60cdd function_code_fastcall + 237
24  python3.8                     	0x000000010fd47932 call_function + 354
25  python3.8                     	0x000000010fd44140 _PyEval_EvalFrameDefault + 30224
26  python3.8                     	0x000000010fc60cdd function_code_fastcall + 237
27  python3.8                     	0x000000010fd47932 call_function + 354
28  python3.8                     	0x000000010fd44140 _PyEval_EvalFrameDefault + 30224
29  python3.8                     	0x000000010fc60cdd function_code_fastcall + 237
30  python3.8                     	0x000000010fc638bf method_vectorcall + 319
31  python3.8                     	0x000000010fc6066c PyVectorcall_Call + 108
32  python3.8                     	0x000000010fded17a t_bootstrap + 74
33  python3.8                     	0x000000010fd9cc19 pythread_wrapper + 25
34  libsystem_pthread.dylib       	0x00007fff6f2ba109 _pthread_start + 148
35  libsystem_pthread.dylib       	0x00007fff6f2b5b8b thread_start + 15

Thread 2:
0   libsystem_pthread.dylib       	0x00007fff6f2b5b68 start_wqthread + 0

Thread 3:
0   libsystem_pthread.dylib       	0x00007fff6f2b5b68 start_wqthread + 0

Thread 4:
0   libsystem_pthread.dylib       	0x00007fff6f2b5b68 start_wqthread + 0

Thread 5:: com.apple.NSEventThread
0   libsystem_kernel.dylib        	0x00007fff6f1f6dfa mach_msg_trap + 10
1   libsystem_kernel.dylib        	0x00007fff6f1f7170 mach_msg + 60
2   com.apple.CoreFoundation      	0x00007fff351e3ef5 __CFRunLoopServiceMachPort + 247
3   com.apple.CoreFoundation      	0x00007fff351e29c2 __CFRunLoopRun + 1319
4   com.apple.CoreFoundation      	0x00007fff351e1e3e CFRunLoopRunSpecific + 462
5   com.apple.AppKit              	0x00007fff325f5954 _NSEventThread + 132
6   libsystem_pthread.dylib       	0x00007fff6f2ba109 _pthread_start + 148
7   libsystem_pthread.dylib       	0x00007fff6f2b5b8b thread_start + 15

Thread 6:
0   libsystem_pthread.dylib       	0x00007fff6f2b5b68 start_wqthread + 0

Thread 7:
0   libsystem_pthread.dylib       	0x00007fff6f2b5b68 start_wqthread + 0

Thread 8:
0   libsystem_pthread.dylib       	0x00007fff6f2b5b68 start_wqthread + 0

Thread 9:
0   libsystem_pthread.dylib       	0x00007fff6f2b5b68 start_wqthread + 0

Thread 10:
0   libsystem_kernel.dylib        	0x00007fff6f1f6f02 swtch_pri + 10
1   libsystem_pthread.dylib       	0x00007fff6f2b7698 sched_yield + 11
2   libopenblas.0.dylib           	0x00000001124b92ae blas_thread_server + 558
3   libsystem_pthread.dylib       	0x00007fff6f2ba109 _pthread_start + 148
4   libsystem_pthread.dylib       	0x00007fff6f2b5b8b thread_start + 15

Thread 11:
0   libsystem_kernel.dylib        	0x00007fff6f1f6f02 swtch_pri + 10
1   libsystem_pthread.dylib       	0x00007fff6f2b7698 sched_yield + 11
2   libopenblas.0.dylib           	0x00000001124b92ae blas_thread_server + 558
3   libsystem_pthread.dylib       	0x00007fff6f2ba109 _pthread_start + 148
4   libsystem_pthread.dylib       	0x00007fff6f2b5b8b thread_start + 15

Thread 12:
0   libsystem_kernel.dylib        	0x00007fff6f1f6f02 swtch_pri + 10
1   libsystem_pthread.dylib       	0x00007fff6f2b7698 sched_yield + 11
2   libopenblas.0.dylib           	0x00000001124b92ae blas_thread_server + 558
3   libsystem_pthread.dylib       	0x00007fff6f2ba109 _pthread_start + 148
4   libsystem_pthread.dylib       	0x00007fff6f2b5b8b thread_start + 15

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x0000003000000010  rbx: 0x00007ff3a6909860  rcx: 0x00007ffedffbe6e4  rdx: 0x00007ffedffbe6e0
  rdi: 0x0000000000000000  rsi: 0x000000011f6d056f  rbp: 0x00007ffedffbe6b0  rsp: 0x00007ffedffbe5e0
   r8: 0x0000000000000000   r9: 0x00007ff3a6b9d100  r10: 0x000000011f6d056f  r11: 0x0000000000000246
  r12: 0x000000011f74e300  r13: 0x0000000000000000  r14: 0x0000000000000001  r15: 0x0000000000000001
  rip: 0x000000010fd65eb3  rfl: 0x0000000000010246  cr2: 0x0000000000000008
  
Logical CPU:     4
Error Code:      0x00000004 (no mapping for user data read)
Trap Number:     14

@anntzer
Copy link
Contributor Author

anntzer commented Jul 30, 2020

Thanks, and noted; I'll check it later.

@jklymak jklymak marked this pull request as draft August 24, 2020 15:00
@QuLogic QuLogic modified the milestones: v3.4.0, v3.5.0 Jan 21, 2021
@QuLogic QuLogic modified the milestones: v3.5.0, v3.6.0 Aug 23, 2021
@anntzer
Copy link
Contributor Author

anntzer commented Nov 23, 2021

Superseded by #21663, #21717, and a few others.

@anntzer anntzer closed this Nov 23, 2021
@anntzer anntzer deleted the macosxclean branch November 23, 2021 18:17
@QuLogic QuLogic removed this from the v3.6.0 milestone Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants