-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Access violation when checking for updates #201
Comments
Catching those errors and surfacing them as Now that someone else has hit the same issue, I feel much more confident about adding those in, for real. |
Oops, I'm not thinking of something I planned to do, but something I'd already shipped: Ok, so coming back to your code above - there's two things we could do in this case: Throw an exceptionPros:
Cons:
Don't throw an exceptionPros:
Cons:
I'm still leaning towards the first scenario (why the exception messages aren't being raised correctly is something I'll look into) - how would you expect this "configuration is wrong" message to appear to your application? |
Exception based flow control is tha shit!
Let the exceptions buble -> e.g AggregateException
Hmm, that's a though one. Maybe something like this:
These exceptions should inherit from UpdateAggregateException so you only need to declare a catch clause Find new names please, these are terrible 👯 |
So I added a test like this:
Gives me this lovely error: I suspect I need to revisit the behaviour of the custom awaiter we're using here as there's too much wrapping of crap (basically). Does that line up with what you're seeing in your testing? |
Yes, sir! |
Cool, solves #201 (comment) |
@peters ok great, that gives me more to go with In terms of raising exceptions, these are my current thoughts on it: Things which need to be addressed (either by the user or by the developers who wrote the application) should be raised and handled accordingly. If an update cannot be done (for whatever reason) it should not impact the behaviour of the application. Don't nag the user and don't crash the app - the user doesn't care, unless they're updating the application by hand.
I'd group these together with a helpful error message for each - they both occur within
We're now ensuring we return an
Two things can come up here:
I think the first one is worth interrupting the user for. The second one, not really.
This is where we get into the hairy stuff, things like:
These should interrupt, but how much can be resolved at this point is hard to say.
If you want to swallow the exceptions, just listen for I've got background updating to implement for the desktop demo - I'll use async/await there as a way of fleshing out these bugs and scenarios. |
Yeah, this is pretty hairy stuff. I'm thinking maybe monotorrent could I've used monotorrent in a project before, it's simple to use. Probably post 1.0 though 🐹 |
Nice! |
We've been looking to use BITS to support more robust downloading of updates, but this is definitely a post-1.0 feature... |
@shiftkey Hmm, i'm trying to exclude two packages from my nuspec dependency list because these are being <?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
... bla bla bla ...
<dependencies>
<dependency id="AbbyyOnlineSdk" version="$version$" />
<dependency id="AsposeCloud.SDK" version="$version$" />
<dependency id="HigLabo" version="$version$" />
<dependency id="Magick.NET-Q16-x86" version="$version$" />
<dependency id="ModernUI" version="$version$" />
<dependency id="NLog" version="$version$" />
<dependency id="protobuf-net" version="$version$" />
<dependency id="semver" version="$version$" />
<dependency id="ServiceStack.Text" version="$version$" />
<dependency id="Tesseract" version="$version$" />
<dependency id="xps2img" />
<!- two packages has been purposely left out here -->
</dependencies>
</metadata>
</package> Any ideas on how i this can be achieved? |
Edit: The nupkg is generated correctly, but it's shimmer that references them (full pkg). |
Inside the |
👍 👍 👍 👍 👍 |
Right, so I'm now stuck between a rock and a hard place on this issue. When you throw an exception after the fact (like we do when we await an Without a really nice message (or stacktrace) these issues were almost impossible to resolve without a debugger attached. I wanted something better, which meant wrapping the exception to preserve the stacktrace. Time to spend some time digging into CLR bits |
@shiftkey In Shimmer 0.7.4 suddenly all project references (not nuget packages) are by default added to the nupkg and this was not the case before. Trying to override with |
This is only fixed in .NET 4.5, if you're using 4.0 you're up a creek :( |
@paulcbetts I eventually moved the entire build process out of visual studio and ending up with function MyGet-Squirrel-New-Release {
param(
[Parameter(Position = 0, Mandatory = $true, ValueFromPipeline = $true)]
[string]$solutionFolder,
[Parameter(Position = 1, Mandatory = $true, ValueFromPipeline = $true)]
[string]$buildFolder
)
$packagesDir = Join-Path $solutionFolder "packages"
$commandsPsm1 = MyGet-Grep -folder $packagesDir -recursive $true `
-pattern "Shimmer.*commands.psm1$" |
Sort-Object FullName -Descending |
Select-Object -first 1
if(-not (Test-Path $commandsPsm1.FullName)) {
MyGet-Die "Could not find any Squirrel nupkg's containing commands.psm1"
}
MyGet-Write-Diagnostic "Squirrel: Creating new release"
Import-Module $commandsPsm1.FullName
New-ReleaseForPackage -SolutionDir $solutionFolder -BuildDir $buildFolder
} |
In shimmer 0.7.4 automatic updates are still broken. I get the following error message when attempting
|
Assembly manifest <?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Data.SQLite" publicKeyToken="db937bc2d44ff139" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.0.89.0" newVersion="1.0.89.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Common.Logging" publicKeyToken="af08829b84f0328e" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IO.Abstractions" publicKeyToken="d480b5b72fb413da" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.4.0.68" newVersion="1.4.0.68" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="NuGet.Core" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.7.40911.225" newVersion="2.7.40911.225" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration> |
Specify Shortcut Locations on Update.exe
@shiftkey
Version: 0.7.2
Please note that the update directory is empty, and i just wanted to test what
Shimmer does in that case. Appearently it results in a epic crash.
Also access violation is also observed in these scenarios:
So.... This is not quite ready for prime time i guess 🚒
Log
Partial stack trace
The text was updated successfully, but these errors were encountered: