Repository navigation
fix(mono): ensure active complex chart paints above overlapping native charts (#295) - #298
Draft
PawelTroka wants to merge 20 commits into
Draft
PawelTroka wants to merge 20 commits into
PawelTroka wants to merge 20 commits into
Conversation
…d render diagnostics
4 of 5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issue
Refs #295. Draft: do not merge or close the issue without owner approval and successful acceptance.
Confirmed diagnosis / limitation
The first Ubuntu 24.04 Mono/X11 test showed that switching to Complex leaves the visible
ComplexChartat child z-index 1, behind the hidden 2D plot at index 0. All three charts shareDockStyle.Fill. This is an observable stacking error and is capable of causing native sibling occlusion on WinForms/Mono backends. The initial hosted X11 environment nevertheless did renderz²successfully after Draw (13,347 sampled colored pixels at quality 25). Thus the user-reported blank screen is not yet reproduced on hosted Ubuntu, and stacking must not be presented as the conclusively proven cause of that screen.Focused change
__MonoCS__only, bring the selected chart control to the front on calculation-mode changes; retain the presenter's visibility filtering. Unsubscribe on disposal. No Windows path is changed.async void Redraw, and display a diagnostic directly in the chart. Reset the diagnostic on Clear/new Draw; retain version checks so superseded render errors cannot pollute a newer plot.z², and capture native before/after X11 screenshots (notGetImage()orDrawToBitmap()).libxtst6and cleans stale PNG evidence before each run.Evidence so far
Initial test-only SHA
da10c952passed 43/43 hosted Mono acceptance checks: on-screenz²pixels changed from 0 to 13,347; chart index was 1. Screenshots:complex-visible-before.png/complex-visible-after.pngin the October 26 baseline workflow artifact. Do not confuse these with pre-fix failure/recovery screenshots; the first baseline was already rendering.Outstanding acceptance
The expanded production startup + XTEST + state-transition CI must pass on this head. The original failing distro/build still needs a comparable run before #295 can be called definitively solved. Retain draft status and do not merge without explicit approval.
Compatibility
Separate from #296's Mono native 3D renderer; its chart is also selected with the same frontmost-control rule. Windows chart visibility/z-order is untouched by the conditional change; the recoverable async-error diagnostic catch is restricted to
__MonoCS__, retaining the established WindowsApplication.ThreadExceptioncontract.October 27 validation follow-up (in progress)
Exact branch head:
82e576d2cd843de6721065a12986487831951dff(commit).build/mono/SmokeTests/ComplexChartUiAcceptance.csinComputator.NET.slnx(825c5b7), fixing the shared developer-inventory failure that stopped many Windows workflows before testing.draw.PerformClick()while the passing bootstrapped desktop test drove real XTEST mouse input. Production acceptance now sends one genuine X11 pointer click, verifies button-event delivery, and records whether an actual complex function was attached and whether async rendering failed (cf82022). This was a differential test-harness defect; it is not yet proof that the original Linux graphical issue is completely fixed.ComplexChartRenderingTests.FailedRenderingReportsOnlyCurrentErrorsAndAllowsTheNextPlot("current"): Windows must surface current redraw exceptions throughApplication.ThreadException. Mono-only exception recovery now uses#if __MonoCS__, preserving the Windows contract (7965e05).Programcollided with PR feat(mono): native interactive f(x,y) 3D surfaces in Linux WinForms #296's native 3D acceptance. The Mono complex probes now use uniquely named P/Invoke declarations with unchanged native entry points (9549148). PR feat(mono): native interactive f(x,y) 3D surfaces in Linux WinForms #296's separatebuild/mono/validate.shand X11 package-list changes must be reconciled when integrated; it has not been merged into this branch.Prior failures reviewed: repeated Windows solution-audit failures share the missing-file issue; the two GSL desktop-test failures are distinct; the production X11 capture had 0 colored pixels although its bootstrapped UI check had 13,347. The production image showed axes but no function colors.
Earlier validation (
9549148): The full developer-solution, GSL source and GSL distribution workflows passed after solution and Windows exception-contract fixes. New exact-head validation for that earlier code was superseded: Mono/X11, Windows Cake, developer solution, GSL source and GSL packaged started; check their completed conclusions before treating the new head as accepted. Capture newproduction-complex-after.pngandcomplex-visible-after.pngfrom that exact-head Mono workflow. The original user environment is not reproduced here. Draft; merge only after owner approval.Actual production async-render root investigation and fix candidate
The second production X11 acceptance run on
35e8c5cd824422aea0ac64e46516b144d1cdd722confirmed that a real native click deliversz²to the control but drawing remains stuck after 30 seconds. Reflection observedredraw-active=True,redraw-version=8(unchanged),sample-quality=1, no sampled grid, the original 1440×1000 empty bitmap and a WinForms synchronization context. The 43 separate GUI smoke tests still passed. This rules out missing Draw delivery, overlaid chart, repeated resize requests, and simple failure to invalidate an already-published colored bitmap; the outstanding defect lies in the asynchronous render-to-publication pipeline.eeb395e: On__MonoCS__only, dispatch sampling on an explicit long-running default-scheduler background task and poll for completion on a WinForms UI timer instead of relying on an awaited WinForms synchronization-context continuation. Publish or discard results, errors and cached grids on the UI thread; preserve latest-version coalescing, clearing, disposal and retry behavior. The existing Windowsasync voidimplementation is unchanged.82e576d: Instrument the production probe with worker-task and UI-poll state for follow-up diagnosis if necessary.Exact-head Mono validation: PASS. Native Ubuntu 24.04 Mono/X11 CI completed successfully on
82e576d2cd843de6721065a12986487831951dff. The actual production application delivered one native X11 Draw click and painted 13,347 coloredz²pixels instead of the previous 0, completing its startup acceptance in 4.81 seconds. The bootstrapped suite passed 43/43 cases, including expression changes, resize, clear, error recovery and visible X11 screenshots. The workflow artifact contains visually inspectedproduction-complex-before.png,production-complex-after.png,complex-visible-after.png,complex-visible-render-failure.pngand recovery captures. Screenshots were captured from X11 screen pixels, not offscreen exports.Remaining exact-head CI checks: Cake Windows regression, full developer solution, GSL source and GSL distribution. The Mono/X11 workflow is complete and green. The Windows, GSL and developer-solution workflows were still running or queued at this update and are not claimed as complete. Keep draft and require owner approval to merge.
Exact-head Windows and solution results — October 27
82e576d2cd843de6721065a12986487831951dff. Native screen artifact: production-complex-after.png, renderedz².ComplexChartRenderingTests.FailedRenderingReportsOnlyCurrentErrorsAndAllowsTheNextPlot("current")previously broken by the shared catch. Other Cake Windows matrix jobs still running at this update..slnxsource registration.