Repository navigation
2.0.1 - #43
2.0.1#43
Conversation
| if (index >= count) throw new InvalidDataException("DSF point run exceeds its pool."); | ||
| if ((encoding & 1) != 0) value = (value + previous) & 65535; | ||
| previous = value; | ||
| points[index++][plane] = scale == 0 ? value : (value * (double)scale) / 65535 + offset; |
| string NumberHex(double value) | ||
| { | ||
| var bytes = new byte[8]; | ||
| System.Buffers.Binary.BinaryPrimitives.WriteDoubleLittleEndian(bytes, value == 0 ? 0 : value); |
| { | ||
| try { await _mainWindowViewModel.PrepareForShutdownAsync(); } | ||
| catch (Exception ex) { StartupTrace.Write($"Active-mode shutdown cleanup failed: {ex.Message}"); } | ||
| catch (Exception ex) { ClientLog.Write($"Active-mode shutdown cleanup failed: {ex.Message}"); } |
| try { await _removalsUpdateTask; } | ||
| catch (OperationCanceledException) { } | ||
| catch (Exception ex) { StartupTrace.Write($"Removals update shutdown error: {ex.Message}"); } | ||
| catch (Exception ex) { ClientLog.Write($"Removals update shutdown error: {ex.Message}"); } |
| catch | ||
| { | ||
| // Logging must not interrupt simulator or scenery operations. | ||
| } |
| private void RaiseDebugModeChanged(DebugModeChangedEventArgs change) | ||
| { | ||
| try { DebugModeChanged?.Invoke(this, change); } | ||
| catch (Exception ex) { _logger.LogDebug(ex, "X-Plane debug event handler failed"); } |
| { | ||
| try { SceneryService.Instance.SetSelectedPackage(airport.ICAO, configuredSim, match.Name); } | ||
| catch (Exception ex) { StartupTrace.Write($"SceneryService.SetSelectedPackage error: {ex.Message}"); } | ||
| catch (Exception ex) { ClientLog.Write($"SceneryService.SetSelectedPackage error: {ex.Message}"); } |
| { | ||
| try { SceneryService.Instance.SetSelectedPackage(airport.ICAO, configuredSim, defaultPackage.Name); } | ||
| catch (Exception ex) { StartupTrace.Write($"SceneryService.SetSelectedPackage error: {ex.Message}"); } | ||
| catch (Exception ex) { ClientLog.Write($"SceneryService.SetSelectedPackage error: {ex.Message}"); } |
| catch (Exception ex) | ||
| { | ||
| ClientLog.Write($"MSFS removal startup sync failed: {ex}"); | ||
| RunOnDispatcher(() => { Status = $"Could not sync MSFS removals: {ex.Message}"; LogLines.Add(Status); }); | ||
| } |
|
| var decoded = Decode(bytes); | ||
| List<GeometryCandidate> candidates = []; | ||
| List<string> comments = []; | ||
| Process(decoded, [], candidates, comments, selectors.Select(selector => selector.Definition).ToHashSet(StringComparer.Ordinal)); |
There was a problem hiding this comment.
For a supported 7z-compressed DSF, selector resolution decodes the file and stamps candidates with the decoded buffer's SHA-256. Patch then validates those selectors against the original compressed bytes, so the hashes differ and it throws “DSF source changed.” As a result, removals cannot be applied to compressed DSF files.
Prompt To Fix With AI
This is a comment left during a code review.
Path: Infrastructure/Simulators/XPlane/XPlaneDsfPatcher.cs
Line: 210-213
Comment:
**Compressed DSF Patching Fails**
For a supported 7z-compressed DSF, selector resolution decodes the file and stamps candidates with the decoded buffer's SHA-256. `Patch` then validates those selectors against the original compressed bytes, so the hashes differ and it throws “DSF source changed.” As a result, removals cannot be applied to compressed DSF files.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Summary
Fix v2.0.1 issues affecting airport detection, server connectivity, X-Plane removals, debug mode and client notifications.
Changes Made
Author Information
VATSIM CID: 1658308
Checklist: