Skip to content
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

Beeware application crashes when attempting to click and drag item out of toga.Table and toga.Tree #1156

Closed
chk-n opened this issue Dec 6, 2020 · 5 comments · Fixed by #2291
Labels
bug A crash or error in behavior. macOS The issue relates to Apple macOS support.

Comments

@chk-n
Copy link

chk-n commented Dec 6, 2020

After installing the toga demo file from the toga repository and playing around with it I noticed that when I attempted to click and drag an item in a Tree or Table the app would crash saying 'Python quit unexpectedly.'.

Steps to reproduce the behavior:

  1. Install demo
  2. Run > briefcase dev
  3. Click on item in list or Tree and attempt to drag it out

Environment:

  • Operating System: MacOSX 10.15.7
  • Python version: 3.8.6
  • Software versions:
    - Briefcase: 0.3.3
    - Toga: Alpha
@chk-n chk-n added the bug A crash or error in behavior. label Dec 6, 2020
@chk-n chk-n changed the title Beeware crashes when attempting to click and drag item out of toga.Table and toga.Tree Beeware application crashes when attempting to click and drag item out of toga.Table and toga.Tree Dec 6, 2020
@freakboy3742 freakboy3742 added bug A crash or error in behavior. macOS The issue relates to Apple macOS support. up-for-grabs and removed bug A crash or error in behavior. labels Dec 6, 2020
@freakboy3742
Copy link
Member

Thanks for the report! A hard segfault crash definitely isn't the desired behavior, so at the very least there's an error that needs to be caught.

@freakboy3742
Copy link
Member

Some initial investigation work: I thought we might be able to work around this by defining canDragRowsWithIndexes:atPoint: with a return value of False - however, this turns the problem in to an immediate segfault on the first click in the table.

@freakboy3742
Copy link
Member

@samschott Any chance you have some free time to take a look at this one? I'm not having much luck hunting it down - mostly because there's almost no breadcrumb trail indicating the source of the problem, just a hard segfault as soon as a drag action is detected.

@samschott
Copy link
Member

@freakboy3742, I'll have a look.

@freakboy3742
Copy link
Member

Looks like I was mistaken - the fix is with canDragRowsWithIndexes:atPoint:. Not sure what I did with my previous experiment, but #2291 implements the fix, and it seems to work. I'm assuming I got the type definitions wrong on my previous attempt, and as a result, the method wasn't actually being used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A crash or error in behavior. macOS The issue relates to Apple macOS support.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants