Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The past few weeks have seen a steady trickle of obscure, difficult to investigate issues. This pull request attempts to extend CKAN's debugging capabilities in specific areas to make it possible to make progress on those issues. It also addresses a few very small or simple problems that came up.
Debian dependency on webrequest
A user reported in a random comment on unrelated issue #1817 that the .deb package should depend on the
webrequest
package. This is now added todebian/control.in
.Remove unnecessary
async
keywordinstallFromckanToolStripMenuItem_Click
is marked asasync
, but it doesn't need to be, which causes a warning to be raised at compile time. This is now removed.Fixes #2376.
Include webexception info in failure message for repo updates
#2391 contains multiple attestations that refreshing the registry sometimes fails, possibly related to how long CKAN has been running. A
WebException
is thrown when this happens, but its details are discarded.Since the cause of this is unclear, we now add the exception to the error output. This is not a fix but may allow us to discover how to create a fix.
Suppress exceptions in OnPaint and skip Mono 3 workaround in Mono 5
A user reports in #2396 that the CKAN window turns into a big red X sometimes on MacOSX. This is apparently something WinForms does when you throw an exception in a control's
OnPaint
method, which we have here:CKAN/GUI/MainModList.cs
Lines 427 to 444 in a495f43
That was originally done to work around a bug in Mono 3 that was fixed in Mono 4. The idea was that the code would use the
IsMonoFour
check to avoid running on versions where the bug was fixed. However, now that we are mostly on Mono 5,IsMonoFour
is no longer an adequate check; since Mono 5 is not Mono 4, this Mono 3 workaround has come back to life and is running on Mono 5.Now all of that code is wrapped in a
try
/catch
block that discards all the exceptions, andIsMonoFour
is replaced withIsMonoFourOrLater
to reflect the real intent of this code, preventing the Mono 3 workaround from running on Mono 5.May or may not fix #2396.
More debug messages around lock acquisition and registry creation
KSP-CKAN/NetKAN#6459 describes an issue in which CKAN "has stopped working" immediately on launch, even if you just run
ckan scan
from the command line. When we tried capturing the--debug
output, the last message wasCKAN/Core/Registry/RegistryManager.cs
Line 241 in a495f43
In a working install, the next message would be one of these:
CKAN/Core/Registry/RegistryManager.cs
Line 291 in a495f43
CKAN/Core/Registry/RegistryManager.cs
Line 317 in a495f43
So something between those statements is somehow causing a crash. There's a lot of code in that gap. This pull request adds more
DebugFormat
statements to log all those various steps so we can narrow down what's happening.Not a fix for KSP-CKAN/NetKAN#6459, but should help us to figure out what's going on with that issue.