DetailedList - no smooth scroll and crash after 30s - macOS
See original GitHub issueExpected Behavior
Fluent scrolling, no jitter, no crash
Current Behavior
- jitter when scrolling up and down.
- app crashes after 30-60s of scrolling with this error:
/Users/Jonas/.local/share/virtualenvs/toga-Z1tvi9lv/bin/python -m detailedlist
Fatal Python error: deallocating None
Current thread 0x00007fffb2b9b380 (most recent call first):
File "/Users/Jonas/Documents/Programming/PyBee/toga/src/cocoa/toga_cocoa/widgets/internal/refresh.py", line 172 in scrollWheel_
File "/Users/Jonas/Documents/Programming/PyBee/rubicon-objc/rubicon/objc/runtime.py", line 1032 in _objc_method
File "/Users/Jonas/Documents/Programming/PyBee/rubicon-objc/rubicon/objc/runtime.py", line 829 in __call__
File "/Users/Jonas/Documents/Programming/PyBee/rubicon-objc/rubicon/objc/runtime.py", line 907 in __call__
File "/Users/Jonas/Documents/Programming/PyBee/rubicon-objc/rubicon/objc/eventloop.py", line 621 in start
File "/Users/Jonas/Documents/Programming/PyBee/rubicon-objc/rubicon/objc/eventloop.py", line 381 in run
File "/Users/Jonas/Documents/Programming/PyBee/rubicon-objc/rubicon/objc/eventloop.py", line 425 in run_forever
File "/Users/Jonas/Documents/Programming/PyBee/toga/src/cocoa/toga_cocoa/app.py", line 171 in main_loop
File "/Users/Jonas/Documents/Programming/PyBee/toga/src/core/toga/app.py", line 169 in main_loop
File "/Users/Jonas/Documents/Programming/PyBee/toga/examples/detailedlist/detailedlist/__main__.py", line 4 in <module>
File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 85 in _run_code
File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 193 in _run_module_as_main
Process finished with exit code 134 (interrupted by signal 6: SIGABRT)
Steps to reproduce
- run the
detailedlist.py
example - scroll up and down for 30-60s.
Your Environment
-
Python Version (3.6.5)
-
Operating System and Version (select from the following and list the specific version number; if your OS is not listed, list that as well)
- macOS - version: 10.13.5 (High Sierra)
- Linux - distro: - version:
- Windows - version:
- Other - name: - version:
-
Toga Target (the type of app you are trying to generate)
- android
- cocoa
- django
- gtk
- iOS
- tvOS
- watchOS
- winforms
- win32
- Other (please specify)
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
ScrollViewProxy scrollTo will cras… | Apple Developer Forums
ScrollViewProxy scrollTo will crash when scrolling outside of bounds of previous (not current) List data source/array in iPad and iOS 16 beta.
Read more >6 Simple Steps to Fix Mac Apps That Crash or Freeze
We'll show you how to fix common app problems on macOS. 1. Quit or Force-Quit the App. An app might hang in the...
Read more >Games Crashes to Desktop after a couple of minutes
Game launches fine, lets me play for around 2 minutes or so and then crashes to desktop with no warning or error log...
Read more >How to Fix Any Macbook Pro Random System Crash - YouTube
2019 UPDATE: Tools and Parts Store now up and running at https://store.appledollars.com*2019 UPDATE: Help Support this channel buy buying ...
Read more >V2201 keeps on crashing on MacBook - Receiver for Macintosh
Trying to run Citrix Workspace latest client v2201 on MacBook Pro M1 Max Monterey 12.1 The app loads initially and when I'm connecting...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Turns out that the root cause of the crash is a bug in
ctypes
itself, which I’ve reported now (bpo-36880). Whenever actypes
callback with restypepy_object
returnsNone
, the refcount ofNone
is decremented once too much.In this example, the bug is triggered a few times for each scroll operation. If this happens often enough,
None
’s refcount decreases to zero - this is never supposed to happen, so Python crashes.The code that triggers the bug is in rubicon-objc here. In this case we can probably work around the bug by returning an object other than
None
from the callback - I’ll try to work on a patch for Rubicon soon, so that we don’t have to wait for the bug to be fixed in CPython.Thanks to the awesome debugging work by @lschumm and @dgelessus, this bug has now been squashed; Rubicon 0.3.1 includes the code necessary to work around this problem.