can't destory activity correctly, because eidtor closed
H
Heyb6
started a topic
almost 2 years ago
How to avoid this situation
Best Answer
O
Olivier @MyScript
said
almost 2 years ago
Dear Heyb6,
Thank you for contacting us.
Based on your log, I would say that in the onDestroy function, you are trying to close the editor while it has already been closed.
If it shall not be closed, you shall investigate when and why it was closed previously.
Otherwise, you can simply check if the editor has not been closed, as we do in our getStarted:
@Override
protected void onDestroy()
{
...
Editor editor = editorData.getEditor();
if (editor != null)
{
editor.getRenderer().close();
editor.close();
}
...
// IInkApplication has the ownership, do not close here
engine = null;
super.onDestroy();
}
Based on your log, I would say that in the onDestroy function, you are trying to close the editor while it has already been closed.
If it shall not be closed, you shall investigate when and why it was closed previously.
Otherwise, you can simply check if the editor has not been closed, as we do in our getStarted:
@Override
protected void onDestroy()
{
...
Editor editor = editorData.getEditor();
if (editor != null)
{
editor.getRenderer().close();
editor.close();
}
...
// IInkApplication has the ownership, do not close here
engine = null;
super.onDestroy();
}
Let us know if this helps.
Best regards,
Olivier
H
Heyb6
said
almost 2 years ago
thanks for you reply,i will add this code block and try to solve this situation
Heyb6
Dear Heyb6,
Thank you for contacting us.
Based on your log, I would say that in the onDestroy function, you are trying to close the editor while it has already been closed.
If it shall not be closed, you shall investigate when and why it was closed previously.
Otherwise, you can simply check if the editor has not been closed, as we do in our getStarted:
Let us know if this helps.
Best regards,
Olivier
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstOlivier @MyScript
Dear Heyb6,
Thank you for contacting us.
Based on your log, I would say that in the onDestroy function, you are trying to close the editor while it has already been closed.
If it shall not be closed, you shall investigate when and why it was closed previously.
Otherwise, you can simply check if the editor has not been closed, as we do in our getStarted:
Let us know if this helps.
Best regards,
Olivier
Heyb6
thanks for you reply,i will add this code block and try to solve this situation