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

stuck when call startprint multiple times #1124

Closed
SokobanRyu opened this issue Nov 4, 2020 · 8 comments
Closed

stuck when call startprint multiple times #1124

SokobanRyu opened this issue Nov 4, 2020 · 8 comments
Assignees

Comments

@SokobanRyu
Copy link

SokobanRyu commented Nov 4, 2020

hi printrun developer,
i found some issue on printcore
when i call startprint on printcore the thread is stuck on _sendnext
after investigate this i found this will be stuck after call several(many) times and always stuck
because this variable self.clear sometime set False and command is not sent

note: i run python not using cython only plain python 3.7
the question is why this self.clear set to be False on start print?
thanks,

@volconst
Copy link
Collaborator

volconst commented Nov 7, 2020

Do you call printcore.connect(...) before startprint? It is called implicitly if you pass port and baud rate to constructor.

@SokobanRyu
Copy link
Author

Hi volconst
From my code i only call once at first time call connect via constructor

@SokobanRyu
Copy link
Author

From my several trial the clear variable is not need to set false when start print. If this values passed at the beginning "print thread" then will be stuck forever. Somehow at several time run this variable value not passed at begining "print thread" this is the mostly current happen in printcore code

@volconst
Copy link
Collaborator

volconst commented Nov 7, 2020

Do you use serial connection or tcp sockets?
Does the problem occur when you try to print several files, for the files after the first?
You are not trying to print concurrently several files, are you?

@SokobanRyu
Copy link
Author

Serial connection
Several list of gcode string
Im not running paralel.

@volconst
Copy link
Collaborator

volconst commented Nov 7, 2020

@SokobanRyu , I started a review in #1125
Maybe you can work around this by disconnecting and connecting for each printed file.

@SokobanRyu
Copy link
Author

@volconst
Thanks for suggested but in my case i can't do disconnect and reconnect again except for serial communication timeout. The problem when i do that will be take long time.

@volconst
Copy link
Collaborator

volconst commented Nov 8, 2020

How long are your print jobs and how often do you invoke them?
Maybe you do not need startprint() and use send_now().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants