Fixed random SEGV in Konqueror caused by klipper when the clipboard was being cleared. #178

Merged
MicheleC merged 1 commits from issue/147 into master 3 years ago
Owner

This resolves issue #147.

This resolves issue #147.
MicheleC added this to the R14.0.10 release milestone 3 years ago
SlavekB reviewed 3 years ago
// Using a direct call may crash another application that was
// changing the clipboard at the same time.
bSavedSelectionMode = selectionMode;
m_setClipboardTimer.start(0, TRUE);
Owner

Could it be easier to use a singleShot timer call instead of creating a timer? Something like:

TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedSetClipboard()));
Could it be easier to use a singleShot timer call instead of creating a timer? Something like: ``` TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedSetClipboard())); ```
Poster
Owner

It could, I hadn't thought of that. But ultimately I think it would be less efficient. Single shot calls still create a timer internally and later destroy it once done. Since setting the clipboard could be a common operation in a user session, a permanent dedicated timer would have less overhead, being created only once.

It could, I hadn't thought of that. But ultimately I think it would be less efficient. Single shot calls still create a timer internally and later destroy it once done. Since setting the clipboard could be a common operation in a user session, a permanent dedicated timer would have less overhead, being created only once.
Owner

Yeah, thank you, that makes sense.

Yeah, thank you, that makes sense.
SlavekB marked this conversation as resolved
MicheleC force-pushed issue/147 from e588c507db to 014d4c77c8 3 years ago
Poster
Owner

With the original code, there were still some crashes here and there. With the new commit, I have not been able to crash Konqueror any longer.

With the original code, there were still some crashes here and there. With the new commit, I have not been able to crash Konqueror any longer.
MicheleC force-pushed issue/147 from 014d4c77c8 to b7e3eef591 3 years ago
Poster
Owner

Added check for empty clipboard after the short delay, as discussed with Slavek.

Added check for empty clipboard after the short delay, as discussed with Slavek.
MicheleC force-pushed issue/147 from b7e3eef591 to e2158a0f0b 3 years ago
MicheleC merged commit e2158a0f0b into master 3 years ago
MicheleC deleted branch issue/147 3 years ago
The pull request has been merged as e2158a0f0b.
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: TDE/tdebase#178
Loading…
There is no content yet.