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

Guppyscreen: Dismissing a prompt in fluidd/mainsail will leave it on screen and pressing a button will segfailt guppyscreen. #183

Open
consp opened this issue May 13, 2024 · 2 comments
Assignees
Labels
bug Something isn't working guppyscreen Everything related to guppyscreen
Milestone

Comments

@consp
Copy link
Collaborator

consp commented May 13, 2024

From @b-fitzpatrick post in #134:

I get it. I also couldn't find anything definitive about the action:prompt messages. Thank you for your efforts. I'm just trying to help with what I can.

I repeated the test with two buttons. Again, it works if I dismiss the dialog from guppyscreen. When I dismiss it from Fluidd, it does not disappear from the screen. When I then tap the OK button on-screen, the button text changes and guppyscreen hangs.
image

Here's the macro I used:

[gcode_macro TEST_PROMPT]
gcode:
    RESPOND TYPE=command MSG="action:prompt_begin Test Prompt"
    RESPOND TYPE=command MSG="action:prompt_text This is a test prompt."
    RESPOND TYPE=command MSG="action:prompt_footer_button Abort|RESPOND TYPE=command MSG=action:prompt_end"
    RESPOND TYPE=command MSG="action:prompt_footer_button OK|RESPOND TYPE=command MSG=action:prompt_end"
    RESPOND TYPE=command MSG="action:prompt_show"

Here's the guppyscreen.log:

[2024-05-10 04:18:53.316] [guppyscreen] [debug] done init
[2024-05-10 04:19:00.206] [guppyscreen] [debug] data found
[2024-05-10 04:19:00.206] [guppyscreen] [debug] data: // action:prompt_begin Test Prompt
[2024-05-10 04:19:00.206] [guppyscreen] [debug] action: prompt_begin Test Prompt
[2024-05-10 04:19:00.206] [guppyscreen] [debug] PROMPT_BEGIN: Test Prompt
[2024-05-10 04:19:00.694] [guppyscreen] [debug] data found
[2024-05-10 04:19:00.694] [guppyscreen] [debug] data: // action:prompt_text This is a test prompt.
[2024-05-10 04:19:00.694] [guppyscreen] [debug] action: prompt_text This is a test prompt.
[2024-05-10 04:19:00.694] [guppyscreen] [debug] PROMPT_TEXT: This is a test prompt.
[2024-05-10 04:19:01.405] [guppyscreen] [debug] data found
[2024-05-10 04:19:01.405] [guppyscreen] [debug] data: // action:prompt_footer_button Abort|RESPOND TYPE=command MSG=action:prompt_end
[2024-05-10 04:19:01.405] [guppyscreen] [debug] action: prompt_footer_button Abort|RESPOND TYPE=command MSG=action:prompt_end
[2024-05-10 04:19:01.405] [guppyscreen] [debug] 26 -1
[2024-05-10 04:19:01.434] [guppyscreen] [debug] PROMPT_FOOTER_BUTTON: Abort CMD: RESPOND TYPE=command MSG=action:prompt_end, type none
[2024-05-10 04:19:02.157] [guppyscreen] [debug] data found
[2024-05-10 04:19:02.157] [guppyscreen] [debug] data: // action:prompt_footer_button OK|RESPOND TYPE=command MSG=action:prompt_end
[2024-05-10 04:19:02.157] [guppyscreen] [debug] action: prompt_footer_button OK|RESPOND TYPE=command MSG=action:prompt_end
[2024-05-10 04:19:02.158] [guppyscreen] [debug] 23 -1
[2024-05-10 04:19:02.158] [guppyscreen] [debug] PROMPT_FOOTER_BUTTON: OK CMD: RESPOND TYPE=command MSG=action:prompt_end, type none
[2024-05-10 04:19:02.652] [guppyscreen] [debug] data found
[2024-05-10 04:19:02.652] [guppyscreen] [debug] data: // action:prompt_show
[2024-05-10 04:19:02.653] [guppyscreen] [debug] action: prompt_show
[2024-05-10 04:19:02.653] [guppyscreen] [debug] PROMPT_SHOW
[2024-05-10 04:19:02.653] [guppyscreen] [debug] callback
[2024-05-10 04:19:08.380] [guppyscreen] [debug] Button 1 pressed
[2024-05-10 04:19:08.380] [guppyscreen] [debug] Command issued: RESPOND TYPE=command MSG=action:prompt_end
[2024-05-10 04:19:08.380] [guppyscreen] [debug] send_jsonrpc: {"id":98,"jsonrpc":"2.0","method":"printer.gcode.script","params":{"script":"RESPOND TYPE=command MSG=action:prompt_end"}}
[2024-05-10 04:19:08.882] [guppyscreen] [debug] data found
[2024-05-10 04:19:08.882] [guppyscreen] [debug] data: // action:prompt_end
[2024-05-10 04:19:08.882] [guppyscreen] [debug] action: prompt_end
[2024-05-10 04:19:08.882] [guppyscreen] [debug] PROMPT_END
[2024-05-10 04:19:16.310] [guppyscreen] [debug] data found
[2024-05-10 04:19:16.310] [guppyscreen] [debug] data: // action:prompt_begin Test Prompt
[2024-05-10 04:19:16.310] [guppyscreen] [debug] action: prompt_begin Test Prompt
[2024-05-10 04:19:16.310] [guppyscreen] [debug] PROMPT_BEGIN: Test Prompt
[2024-05-10 04:19:16.810] [guppyscreen] [debug] data found
[2024-05-10 04:19:16.810] [guppyscreen] [debug] data: // action:prompt_text This is a test prompt.
[2024-05-10 04:19:16.810] [guppyscreen] [debug] action: prompt_text This is a test prompt.
[2024-05-10 04:19:16.810] [guppyscreen] [debug] PROMPT_TEXT: This is a test prompt.
[2024-05-10 04:19:17.524] [guppyscreen] [debug] data found
[2024-05-10 04:19:17.524] [guppyscreen] [debug] data: // action:prompt_footer_button Abort|RESPOND TYPE=command MSG=action:prompt_end
[2024-05-10 04:19:17.524] [guppyscreen] [debug] action: prompt_footer_button Abort|RESPOND TYPE=command MSG=action:prompt_end
[2024-05-10 04:19:17.524] [guppyscreen] [debug] 26 -1
[2024-05-10 04:19:17.524] [guppyscreen] [debug] PROMPT_FOOTER_BUTTON: Abort CMD: RESPOND TYPE=command MSG=action:prompt_end, type none
[2024-05-10 04:19:18.240] [guppyscreen] [debug] data found
[2024-05-10 04:19:18.240] [guppyscreen] [debug] data: // action:prompt_footer_button OK|RESPOND TYPE=command MSG=action:prompt_end
[2024-05-10 04:19:18.240] [guppyscreen] [debug] action: prompt_footer_button OK|RESPOND TYPE=command MSG=action:prompt_end
[2024-05-10 04:19:18.240] [guppyscreen] [debug] 23 -1
[2024-05-10 04:19:18.240] [guppyscreen] [debug] PROMPT_FOOTER_BUTTON: OK CMD: RESPOND TYPE=command MSG=action:prompt_end, type none
[2024-05-10 04:19:18.732] [guppyscreen] [debug] data found
[2024-05-10 04:19:18.732] [guppyscreen] [debug] data: // action:prompt_show
[2024-05-10 04:19:18.732] [guppyscreen] [debug] action: prompt_show
[2024-05-10 04:19:18.733] [guppyscreen] [debug] PROMPT_SHOW
[2024-05-10 04:19:18.733] [guppyscreen] [debug] callback
[2024-05-10 04:19:19.249] [guppyscreen] [debug] data found
[2024-05-10 04:19:19.250] [guppyscreen] [debug] data: // action:prompt_end
[2024-05-10 04:19:19.250] [guppyscreen] [debug] action: prompt_end
[2024-05-10 04:19:19.250] [guppyscreen] [debug] PROMPT_END
[2024-05-10 04:19:28.038] [guppyscreen] [debug] Button 1 pressed

Originally posted by @b-fitzpatrick in #134 (reply in thread)

@consp consp self-assigned this May 13, 2024
@consp consp added bug Something isn't working guppyscreen Everything related to guppyscreen labels May 13, 2024
@consp consp added this to the Touch control milestone May 13, 2024
@consp
Copy link
Collaborator Author

consp commented May 13, 2024

Solution would be to properly handle prompt_end and avoid the double free. (or only use c++)

@consp
Copy link
Collaborator Author

consp commented May 29, 2024

Will be fixed in next release (or if you download the guppyscreen file in the attached discussion and replace it)

Repository owner locked as resolved and limited conversation to collaborators May 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working guppyscreen Everything related to guppyscreen
Projects
None yet
Development

No branches or pull requests

1 participant