[kdevelop] [Bug 387232] KDirWatch crash when calling KDW::addDir() during shutdown

2018-04-13 Thread Simon Andric
https://bugs.kde.org/show_bug.cgi?id=387232

Simon Andric  changed:

   What|Removed |Added

 CC||simonandr...@gmail.com

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

[kdevelop] [Bug 387232] KDirWatch crash when calling KDW::addDir() during shutdown

2017-11-23 Thread Sven Brauch
https://bugs.kde.org/show_bug.cgi?id=387232

--- Comment #16 from Sven Brauch  ---
Yeah, never mind if it wasn't intentional, happens.

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

[kdevelop] [Bug 387232] KDirWatch crash when calling KDW::addDir() during shutdown

2017-11-23 Thread RJVB
https://bugs.kde.org/show_bug.cgi?id=387232

--- Comment #15 from RJVB  ---
Well, if apologies are in order ...

Fact is I didn't realise the relationship to my patch until the report was
already submitted.

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

[kdevelop] [Bug 387232] KDirWatch crash when calling KDW::addDir() during shutdown

2017-11-23 Thread Sven Brauch
https://bugs.kde.org/show_bug.cgi?id=387232

Sven Brauch  changed:

   What|Removed |Added

 CC||m...@svenbrauch.de

--- Comment #14 from Sven Brauch  ---
... which is completely wtf. Please, please never do that. It's super confusing
and a huge waste of time. Issues with unsubmitted patches must not be listed in
the bugtracker.

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

[kdevelop] [Bug 387232] KDirWatch crash when calling KDW::addDir() during shutdown

2017-11-23 Thread Milian Wolff
https://bugs.kde.org/show_bug.cgi?id=387232

--- Comment #8 from Milian Wolff  ---
exactly, don't report bugs for crashes in your WIP patches

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

[kdevelop] [Bug 387232] KDirWatch crash when calling KDW::addDir() during shutdown

2017-11-23 Thread Kevin Funk
https://bugs.kde.org/show_bug.cgi?id=387232

Kevin Funk  changed:

   What|Removed |Added

 Resolution|FIXED   |INVALID

--- Comment #13 from Kevin Funk  ---
It is still INVALID since this bug report is about code which was never part of
KDevelop.

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

[kdevelop] [Bug 387232] KDirWatch crash when calling KDW::addDir() during shutdown

2017-11-23 Thread Kevin Funk
https://bugs.kde.org/show_bug.cgi?id=387232

Kevin Funk  changed:

   What|Removed |Added

 Resolution|WAITINGFORINFO  |INVALID

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

[kdevelop] [Bug 387232] KDirWatch crash when calling KDW::addDir() during shutdown

2017-11-23 Thread Milian Wolff
https://bugs.kde.org/show_bug.cgi?id=387232

--- Comment #10 from Milian Wolff  ---
troll answer: yes, remove the project watcher as I told you to

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

[kdevelop] [Bug 387232] KDirWatch crash when calling KDW::addDir() during shutdown

2017-11-23 Thread RJVB
https://bugs.kde.org/show_bug.cgi?id=387232

RJVB  changed:

   What|Removed |Added

 Resolution|INVALID |FIXED

--- Comment #12 from RJVB  ---
Got rid of the watchDir signal and let the addDir() call be made directly by
the FileManagerListJob.

That solves the direct reason for the crash (no more signals, so none delivered
to a stale object either).

However, the underlying issue must persist and has nothing to do with my patch.
The CPU burning should have been a clear signal: the entire project is being
reloaded repeatedly because files keep changing in the project root. And as far
as I can see there is no protection whatsoever against doing multiple
concurrent reloads; FileManagerListJob happily runs as many copies of itself as
requested.

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

[kdevelop] [Bug 387232] KDirWatch crash when calling KDW::addDir() during shutdown

2017-11-23 Thread RJVB
https://bugs.kde.org/show_bug.cgi?id=387232

--- Comment #9 from RJVB  ---
So you can put a finger on the (supposed) bug in my patch, meaning the thing it
fails to do to avoid signals from being delivered to a stale object? Please
enlighten me if that's the case...

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

[kdevelop] [Bug 387232] KDirWatch crash when calling KDW::addDir() during shutdown

2017-11-23 Thread RJVB
https://bugs.kde.org/show_bug.cgi?id=387232

RJVB  changed:

   What|Removed |Added

   See Also||https://bugs.kde.org/show_b
   ||ug.cgi?id=387238

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

[kdevelop] [Bug 387232] KDirWatch crash when calling KDW::addDir() during shutdown

2017-11-23 Thread RJVB
https://bugs.kde.org/show_bug.cgi?id=387232

--- Comment #11 from RJVB  ---
That's a troll answer indeed (where's the flag/report thingy?). The same thing
would happen when using KDirWatch directly.

Kevin, I also feel like I'm rambling. The thing is I'm largely groping in the
dark with a test-case that is a huge project (the CodeBlocks source tree) and
am trying to provide whatever information that might ring a bell with someone
to help put me on the right track. Not writing all that will generate less
noise evidently, but is also the best way NOT to get useful feedback.

The patch we're talking about is this: https://phabricator.kde.org/D7995

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

[kdevelop] [Bug 387232] KDirWatch crash when calling KDW::addDir() during shutdown

2017-11-23 Thread Kevin Funk
https://bugs.kde.org/show_bug.cgi?id=387232

Kevin Funk  changed:

   What|Removed |Added

 Resolution|--- |WAITINGFORINFO
 Status|UNCONFIRMED |RESOLVED

--- Comment #7 from Kevin Funk  ---
Which patches do you have applied anyway? You're lacking that information. We
don't have projectwatcher.cpp in our code base.

How are we supposed to try to reproduce this without that information?

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

[kdevelop] [Bug 387232] KDirWatch crash when calling KDW::addDir() during shutdown

2017-11-23 Thread Kevin Funk
https://bugs.kde.org/show_bug.cgi?id=387232

--- Comment #6 from Kevin Funk  ---
René, this bug is three hours old and it already has several pages of text. Be
assured that there are very few persons having the time/motivation to read
through all of that. I did, and it's super noisy text (with very little actual
information).

Please, we don't need a live log of how you're trying to investigate this bug;
instead, do your analysis, tests, then *sum* up your findings and report them
here. It doesn't help updating bug reports on a hourly basis with your recent
brain dump.

I'm happy about your motivation to work on these issues; but the feedback needs
to be provided/presented differently.

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

[kdevelop] [Bug 387232] KDirWatch crash when calling KDW::addDir() during shutdown

2017-11-23 Thread RJVB
https://bugs.kde.org/show_bug.cgi?id=387232

--- Comment #5 from RJVB  ---
So... what seems to be burning CPU is a number of FileManagerListJob instances
that keep running and calling FileManagerListJob::startNextJob() which in turn
emits the watchDir signal.

What I fail to see (yet) is how emitting that signal can lead to this. Adding a
directory to the watch list doesn't have the direct effect of (re)loading that
directory, and there are no dirty signals being generated either (those could
of course cause directory reloading).

Yet, the issue goes away when I make ProjectWatcher::addDir() a stub (that
doesn't call KDirWatch::addDir()).

I could imagine how the autoconf and configure steps generate one or more
directories that should be ignored, but not how the current "stock" dirwatching
implementation isn't vulnerable to this situation.

The whole issue went away when I undid the configure.ac edit, restored the
original configure file and re-ran my configure command OUTSIDE of KDevelop.

Only to start anew as soon as I made a change to configure.ac in KDevelop,
before I even saved the file.

I'm going to see what happens when I emit the dirWatch signal only for
previously unwatched directories or from a different location, but I think the
issue goes deeper than just my new dirwatching algorithm.

It looks to me that there's an issue with the project manager being used here
which is exposed/triggered by my dirwatching algorithm.

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

[kdevelop] [Bug 387232] KDirWatch crash when calling KDW::addDir() during shutdown

2017-11-23 Thread RJVB
https://bugs.kde.org/show_bug.cgi?id=387232

--- Comment #4 from RJVB  ---
There's something else that's fishy, I'm now pretty certain that the CPU
burning is due to an issue in the AbstractFileManagerPlugin and/or the
FileManagerListJob classes which somehow start reloading all or part of a
project continuously. Hard to tell exactly what happens but I didn't see any
trace of my ProjectWatcher class causing this directly (activating a trace in
AFMPP::dirty() doesn't print anything).

The project that's causing this is one using autoconf, and the issue started
when I made an edit to its configure.ac . Looks like this starts an infinite
loop; autoconf is apparently called automatically and since the edit is
incomplete there's an error situation somewhere which isn't handled properly.

This doesn't always cause signals to be delivered to a stale ProjectWatcher
class but it seems I do have to rethink my design a bit :-/

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

[kdevelop] [Bug 387232] KDirWatch crash when calling KDW::addDir() during shutdown

2017-11-23 Thread RJVB
https://bugs.kde.org/show_bug.cgi?id=387232

RJVB  changed:

   What|Removed |Added

   Assignee|mp...@kde.org   |kdevelop-bugs-n...@kde.org
Product|frameworks-kcoreaddons  |kdevelop
  Component|general |general
Version|5.38.0  |5.2.0

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