D27357: Fix infinite recursion in xscreensaver plugin

2020-03-06 Thread Aleksei Nikiforov
alnikiforov added a comment.


  Could you please merge this change?  Or is something stopping from merging it?

REPOSITORY
  R274 KIdleTime

REVISION DETAIL
  https://phabricator.kde.org/D27357

To: alnikiforov, davidedmundson, broulik, #frameworks
Cc: kde-frameworks-devel, LeGast00n, cblack, GB_2, michaelh, ngraham, bruns


D27357: Fix infinite recursion in xscreensaver plugin

2020-02-13 Thread Aleksei Nikiforov
alnikiforov added a comment.


  In D27357#610605 , @broulik wrote:
  
  > Neither the XSync nor the windows backend explicitly call 
`resumingFromIdle` in `simulateUserActivity`, so I think this should be fine.
  >  However, I don't know if that won't indirectly trigger it if the session 
was idle? Maybe we need to check if the session was idle and only then emit the 
signal.
  
  
  I'm not sure how exactly it works, but if session was idle, wouldn't function 
`screensaverActivated` be called on changing state? And it contains `emit 
resumingFromIdle()`:
  
  
https://phabricator.kde.org/source/kidletime/browse/master/src/plugins/xscreensaver/xscreensaverbasedpoller.cpp$37

REPOSITORY
  R274 KIdleTime

REVISION DETAIL
  https://phabricator.kde.org/D27357

To: alnikiforov, davidedmundson, broulik
Cc: kde-frameworks-devel, LeGast00n, cblack, GB_2, michaelh, ngraham, bruns


D27357: Fix infinite recursion in xscreensaver plugin

2020-02-13 Thread Aleksei Nikiforov
alnikiforov created this revision.
alnikiforov added reviewers: davidedmundson, broulik.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
alnikiforov requested review of this revision.

REVISION SUMMARY
  Follow up for D27279 
  
  Related to: D17874 

TEST PLAN
  Test plan similar to D27279 , but 
powerdevil should no longer crash

REPOSITORY
  R274 KIdleTime

REVISION DETAIL
  https://phabricator.kde.org/D27357

AFFECTED FILES
  src/plugins/xscreensaver/xscreensaverbasedpoller.cpp

To: alnikiforov, davidedmundson, broulik
Cc: kde-frameworks-devel, LeGast00n, cblack, GB_2, michaelh, ngraham, bruns


D27279: Port away from QWidget

2020-02-13 Thread Aleksei Nikiforov
alnikiforov added a comment.


  I think I found source of infinite recursion.
  
  First call is on 
https://phabricator.kde.org/source/powerdevil/browse/master/daemon/powerdevilcore.cpp$821
  Second call is on 
https://phabricator.kde.org/source/kidletime/browse/master/src/plugins/xscreensaver/xscreensaverbasedpoller.cpp$62
  
  I've removed call at line xscreensaverbasedpoller.cpp:62 and it no longer 
crashes for me. Not sure if anything is going to be broken by this change. I'll 
prepare a patch.

REPOSITORY
  R274 KIdleTime

REVISION DETAIL
  https://phabricator.kde.org/D27279

To: broulik, #frameworks, davidedmundson
Cc: alnikiforov, davidedmundson, kde-frameworks-devel, LeGast00n, cblack, GB_2, 
michaelh, ngraham, bruns


D27279: Port away from QWidget

2020-02-12 Thread Aleksei Nikiforov
alnikiforov added a comment.


  I've managed to reproduce it and take a backtrace. It's an infinite 
recursion. Eventually stack's end is reached, although it takes some time to do 
it. Here's a piece of backtrace I got:
  
#460 0x764dcbec in KIdleTimePrivate::_k_resumingFromIdle 
(this=) at /usr/src/debug/kidletime-5.66.0/src/kidletime.cpp:244
#461 0x76e14143 in QMetaObject::activate (sender=0x50aa40, 
signalOffset=, local_signal_index=, 
argv=)
at kernel/qobject.cpp:3803
#462 0x77f4e9c4 in PowerDevil::Core::onResumingFromIdle 
(this=0x7fffe400cd30) at 
/usr/src/debug/powerdevil-5.17.5/daemon/powerdevilcore.cpp:820
#463 0x77f89055 in PowerDevil::Core::qt_static_metacall 
(_o=, _c=, _id=, _a=)
at 
/usr/src/debug/powerdevil-5.17.5/BUILD/daemon/powerdevilcore_autogen/EWIEGA46WW/moc_powerdevilcore.cpp:229
#464 0x76e14143 in QMetaObject::activate (sender=0x50cac0, 
signalOffset=, local_signal_index=, 
argv=)
at kernel/qobject.cpp:3803
#465 0x764dcbec in KIdleTimePrivate::_k_resumingFromIdle 
(this=) at /usr/src/debug/kidletime-5.66.0/src/kidletime.cpp:244
#466 0x76e14143 in QMetaObject::activate (sender=0x50aa40, 
signalOffset=, local_signal_index=, 
argv=)
at kernel/qobject.cpp:3803
#467 0x77f4e9c4 in PowerDevil::Core::onResumingFromIdle 
(this=0x7fffe400cd30) at 
/usr/src/debug/powerdevil-5.17.5/daemon/powerdevilcore.cpp:820
#468 0x77f89055 in PowerDevil::Core::qt_static_metacall 
(_o=, _c=, _id=, _a=)
at 
/usr/src/debug/powerdevil-5.17.5/BUILD/daemon/powerdevilcore_autogen/EWIEGA46WW/moc_powerdevilcore.cpp:229
#469 0x76e14143 in QMetaObject::activate (sender=0x50cac0, 
signalOffset=, local_signal_index=, 
argv=)
at kernel/qobject.cpp:3803
#470 0x764dcbec in KIdleTimePrivate::_k_resumingFromIdle 
(this=) at /usr/src/debug/kidletime-5.66.0/src/kidletime.cpp:244
#471 0x76e14143 in QMetaObject::activate (sender=0x50aa40, 
signalOffset=, local_signal_index=, 
argv=)
at kernel/qobject.cpp:3803
#472 0x77f4e9c4 in PowerDevil::Core::onResumingFromIdle 
(this=0x7fffe400cd30) at 
/usr/src/debug/powerdevil-5.17.5/daemon/powerdevilcore.cpp:820
#473 0x77f89055 in PowerDevil::Core::qt_static_metacall 
(_o=, _c=, _id=, _a=)
at 
/usr/src/debug/powerdevil-5.17.5/BUILD/daemon/powerdevilcore_autogen/EWIEGA46WW/moc_powerdevilcore.cpp:229
#474 0x76e14143 in QMetaObject::activate (sender=0x50cac0, 
signalOffset=, local_signal_index=, 
argv=)
at kernel/qobject.cpp:3803

REPOSITORY
  R274 KIdleTime

REVISION DETAIL
  https://phabricator.kde.org/D27279

To: broulik, #frameworks, davidedmundson
Cc: alnikiforov, davidedmundson, kde-frameworks-devel, LeGast00n, cblack, GB_2, 
michaelh, ngraham, bruns


D27279: Port away from QWidget

2020-02-12 Thread Aleksei Nikiforov
alnikiforov added a comment.


  I've tested this patch in it's current form, and powerdevil no longer crashes 
for me on launch too. How can I reproduce crash in resume on idle? Can it be 
done in virtual machine?

REPOSITORY
  R274 KIdleTime

REVISION DETAIL
  https://phabricator.kde.org/D27279

To: broulik, #frameworks, davidedmundson
Cc: alnikiforov, davidedmundson, kde-frameworks-devel, LeGast00n, cblack, GB_2, 
michaelh, ngraham, bruns


D17392: Fix checkDesktopFile function

2018-12-10 Thread Aleksei Nikiforov
i.Dark_Templar abandoned this revision.
i.Dark_Templar added a comment.


  Abandoning this change in that case.

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D17392

To: i.Dark_Templar, davidedmundson, #frameworks
Cc: elvisangelaccio, kde-frameworks-devel, michaelh, ngraham, bruns


D17392: Fix checkDesktopFile function

2018-12-06 Thread Aleksei Nikiforov
i.Dark_Templar added a commit: R241:16edef0dca46: Remove unused variable.

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D17392

To: i.Dark_Templar, davidedmundson, #frameworks
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D17392: Fix checkDesktopFile function

2018-12-06 Thread Aleksei Nikiforov
i.Dark_Templar created this revision.
i.Dark_Templar added a reviewer: davidedmundson.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
i.Dark_Templar requested review of this revision.

REVISION SUMMARY
  Variable isLocal is no longer initialized anywhere.
  Return function call which set it's value before while still discarding value 
returned by that function.
  Also provide default value (false) for variable isLocal since function
  items.mostLocalUrl(...) might not set a value to it if item is empty.
  
  Alternatively, remains of isLocal variable and it's usage probably should be 
removed.

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D17392

AFFECTED FILES
  src/core/kfileitem.cpp

To: i.Dark_Templar, davidedmundson
Cc: kde-frameworks-devel, michaelh, ngraham, bruns