[kwin] [Bug 403038] KWin crashes (occasionally) when running script to minimize current open window

2019-02-22 Thread David Edmundson
https://bugs.kde.org/show_bug.cgi?id=403038

--- Comment #5 from David Edmundson  ---
Git commit 47be4be0209fd786b19c5066b96c8550a08c8746 by David Edmundson.
Committed on 22/02/2019 at 14:40.
Pushed by davidedmundson into branch 'master'.

[scripting] Make DBus invokable run method return result after execution

Summary:
In 403038 the user expected the DBus call to run to finish before
processing the next request. For a singleshot script that makes a lot of
sense, otherwise you have no idea when it finishes.

This also allows us to return errors.

Test Plan:
NUM=$(qdbus org.kde.KWin /Scripting org.kde.kwin.Scripting.loadScript
/noFile.js Minimize)
qdbus org.kde.KWin /$NUM org.kde.kwin.Scripting.run
  Error: org.kde.kwin.Scripting.FileError
  Could not open /noFile.js

Running a real script behaved effectively the same as before.

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18127

M  +1-0autotests/CMakeLists.txt
M  +2-0autotests/tabbox/CMakeLists.txt
M  +20   -0scripting/scripting.cpp
M  +5-1scripting/scripting.h

https://commits.kde.org/kwin/47be4be0209fd786b19c5066b96c8550a08c8746

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 403038] KWin crashes (occasionally) when running script to minimize current open window

2019-01-10 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=403038

Nate Graham  changed:

   What|Removed |Added

   Version Fixed In||5.15.0

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 403038] KWin crashes (occasionally) when running script to minimize current open window

2019-01-09 Thread David Edmundson
https://bugs.kde.org/show_bug.cgi?id=403038

David Edmundson  changed:

   What|Removed |Added

 Status|CONFIRMED   |RESOLVED
  Latest Commit||https://commits.kde.org/kwi
   ||n/ba7aecfe53d765e0f94626ed0
   ||0010a40284b99c0
 Resolution|--- |FIXED

--- Comment #4 from David Edmundson  ---
Git commit ba7aecfe53d765e0f94626ed00010a40284b99c0 by David Edmundson.
Committed on 09/01/2019 at 23:37.
Pushed by davidedmundson into branch 'master'.

[scripting] Avoid threading issues when loading from a file

Summary:
KWin::Script::loadScriptFromFile ran in it's own thread and accessed
member variables of KWin::Script without any guards.

Potentially script could be destroyed whilst the file is loading.

Rather than adding mutexes everywhere, this patch scopes the QFile
object to be local to the threaded function making it independent.

Test Plan: Ran a script from a file

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D18126

M  +8-8scripting/scripting.cpp
M  +3-6scripting/scripting.h

https://commits.kde.org/kwin/ba7aecfe53d765e0f94626ed00010a40284b99c0

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 403038] KWin crashes (occasionally) when running script to minimize current open window

2019-01-09 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=403038

Nate Graham  changed:

   What|Removed |Added

 CC||n...@kde.org

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 403038] KWin crashes (occasionally) when running script to minimize current open window

2019-01-09 Thread David Edmundson
https://bugs.kde.org/show_bug.cgi?id=403038

David Edmundson  changed:

   What|Removed |Added

 Status|REPORTED|CONFIRMED
 Ever confirmed|0   |1

--- Comment #3 from David Edmundson  ---
Use of a thread isn't guarded properly. 
Marking as confirmed. 

Will fix.

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 403038] KWin crashes (occasionally) when running script to minimize current open window

2019-01-09 Thread David Edmundson
https://bugs.kde.org/show_bug.cgi?id=403038

--- Comment #2 from David Edmundson  ---
oh, it was inline, sorry

-- 
You are receiving this mail because:
You are watching all bug changes.

[kwin] [Bug 403038] KWin crashes (occasionally) when running script to minimize current open window

2019-01-09 Thread David Edmundson
https://bugs.kde.org/show_bug.cgi?id=403038

David Edmundson  changed:

   What|Removed |Added

 CC||k...@davidedmundson.co.uk

--- Comment #1 from David Edmundson  ---
Please attach /home/beojan/.local/share/plasmashell/minimize.js

-- 
You are receiving this mail because:
You are watching all bug changes.