| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| OpenPublisher5-i386-windowsXP.exe | 2026-10-22 | 56.5 MB | |
| openpublisher5_amd64-windows-portable.exe | 2026-10-22 | 183.2 MB | |
| openpublisher5_amd64-windows.exe | 2026-10-22 | 165.2 MB | |
| openpublisher5_amd64-macos.dmg | 2026-10-22 | 233.1 MB | |
| openpublisher5_amd64-linux.run | 2026-10-22 | 193.4 MB | |
| openpublisher5_amd64-linux.rpm | 2026-10-22 | 215.4 MB | |
| openpublisher5_amd64-linux.flatpak | 2026-10-22 | 153.6 MB | |
| openpublisher5_amd64-linux.deb | 2026-10-22 | 156.2 MB | |
| 5.11.10_ Blank Ruler Canvas Recovery, GPU Context Loss Resilience, Background Tab Lifecycle Sync _ Autonomous Self-Healing source code.tar.gz | 2026-10-22 | 23.4 MB | |
| 5.11.10_ Blank Ruler Canvas Recovery, GPU Context Loss Resilience, Background Tab Lifecycle Sync _ Autonomous Self-Healing source code.zip | 2026-10-22 | 23.6 MB | |
| README.md | 2026-10-22 | 10.6 kB | |
| openpublisher5_amd64-linux.AppImage | 2026-10-22 | 166.4 MB | |
| openpublisher5_amd64-freebsd.pkg | 2026-10-22 | 185.5 MB | |
| Totals: 13 Items | 1.8 GB | 0 | |
🚀 Summary
Version 5.11.10 completely resolves an issue where the horizontal and vertical ruler bars along the top and left sides of the canvas could become blank after the application was left inactive in the background, subjected to low memory pressure, or experienced a brief window compositor re-initialization (white flash):
- HTML5 2D Canvas GPU Context Loss Resilience: Added dedicated event handling for
contextlostevents on both#ruler-h-canvasand#ruler-v-canvas. Callinge.preventDefault()prevents Chromium from permanently discarding the 2D context backing store, allowing the browser graphics subsystem to recover gracefully following GPU driver resets or memory pressure. - Automated
contextrestoredRepainting: Attachedcontextrestoredlisteners to the horizontal and vertical ruler canvases that immediately execute a full redraw of all ruler divisions, numerical units, and margins the moment GPU resources are restored. - Background Tab & Hibernation Lifecycle Synchronization: Wired listeners for
document.visibilitychange,window.focus, andwindow.pageshowto guarantee ruler canvases instantly repaint whenever returning from background tabs or OS-level canvas hibernation, eliminating the need to reload the page. - Autonomous Per-Frame Self-Healing Guard: Added a lightweight canvas liveness check inside
trackSelection()that continuously monitors canvas context validity and buffer dimensions. If a canvas ever loses its backing store or collapses, the engine autonomously detects the failure and restores the rulers within moments. - Zero-Dimension Collapse Protection in
syncRulers: Guardedwindow.syncRulers()against collapsing canvas dimensions to 0x0 if a sync event occurs while the window is minimized or during background layout reflows, scheduling a clean retry once the window is foregrounded. - Idempotent High-DPI Matrix Scaling: Replaced compounding
scale(dpr, dpr)calls with idempotentsetTransform(dpr, 0, 0, dpr, 0, 0)so repeated repaints and zoom changes maintain crisp, pixel-perfect fidelity without graphical degradation. - Ruler Origin Marker Recovery Integration: Wired direct click recovery to the top-left ruler intersection corner (
.ruler-c), ensuring any manual interaction immediately triggers an on-demand ruler canvas repaint. - Background Polling & Timer Deduplication: Removed redundant, duplicate 100ms background polling loops in
extensions/system-patches.jsandui/ui-interactions.js, and addeddocument.hiddenguards to pause background canvas and DOM polling, reducing idle memory churn and preventing GPU driver timeouts.
Asset cachebusters across all 84 resource tags in index.html have been upgraded to ?v=5.11.10, and the Service Worker cache has been bumped to open-publisher-v5-11-10.
🎨 Key Features & Architectural Improvements
1. HTML5 Canvas GPU Context Loss & Restoration Engine (canvas/canvas.js)
- Root Cause Analysis:
- In Chromium and Electron applications, when the graphics subsystem encounters memory exhaustion, OS display mode switches, or a Windows Display Driver Model (WDDM) Timeout Detection and Recovery (TDR) event, the GPU process briefly restarts (visible to users as a quick white flash).
- While HTML DOM nodes and styling are preserved by the renderer, hardware-accelerated 2D
<canvas>elements lose their GPU texture backing stores. - According to the HTML5 2D Canvas specification, when context loss occurs, the browser dispatches a
contextlostevent to the canvas. If the web application does not calle.preventDefault(), the browser marks the context as permanently dead and never restores it. - Previously,
canvas/canvas.jsdid not registercontextlostorcontextrestoredhandlers. As a result, when GPU memory was reclaimed in the background or during high load, the ruler canvases remained permanently blank until manually forced by dragging the origin corner marker or reloading the window. - Architectural Solution:
- Implemented
wireCanvasLossRecovery(canvas)incanvas/canvas.js:- Attaches a
contextlostlistener callinge.preventDefault(), instructing the browser that OpenPublisher is resilient and ready to restore the context. - Attaches a
contextrestoredlistener that immediately schedules a complete repaint viarequestAnimationFrame(window.syncRulers).
- Attaches a
2. Multi-Layered Window & Tab Lifecycle Synchronization (canvas/canvas.js)
- Lifecycle Integration:
- Attached listeners for
document.addEventListener('visibilitychange'),window.addEventListener('focus'), andwindow.addEventListener('pageshow'). - When a user returns to OpenPublisher from another tab or window, the engine checks
!document.hiddenand immediately scheduleswindow.syncRulers(), ensuring canvas textures discarded during browser tab suspension or canvas hibernation are painted before the user clicks or scrolls. - Guarded with
window._rulerLifecycleListenersAttachedto prevent duplicate event bindings across re-initialization calls.
3. Dimension Collapse Protection & Idempotent Transforms (canvas/canvas.js)
- Zero-Rect Guarding:
- In
window.syncRulers(), ifhRect.width <= 0 || vRect.height <= 0(e.g. while the window is minimized or in an offscreen reflow state), OpenPublisher avoids assigning 0 tocanvas.widthandcanvas.height. - Schedules a single retry via
requestAnimationFramewhen the document becomes visible. - Idempotent High-DPI Transform:
- Replaced
ctx.scale(dpr, dpr)withctx.setTransform(dpr, 0, 0, dpr, 0, 0). - In standard Canvas 2D, setting
canvas.widthresets the transform matrix to identity, but ifcanvas.widthremains unchanged across calls,ctx.scale()compounds the scaling factor on each call.setTransformexplicitly resets and sets the exact DPR matrix, ensuring consistent, ultra-sharp 1px tick marks on standard and Retina displays.
4. Autonomous Per-Frame Health Guard (extensions/ui-interactions.js, canvas/canvas.js)
- Proactive Health Verification:
- Implemented
window.isRulerCanvasHealthy()incanvas/canvas.jsto inspect canvas presence, positive dimensions, and 2D context status (ctx.isContextLost?.()). - Implemented
window.ensureRulersRendered()as an on-demand self-healing utility. - Background Health Loop Integration:
- In
extensions/ui-interactions.js, updatedtrackSelection()(which runs per-frame for selection indicator tracking) with a throttled 1-second health guard. - If ruler canvases ever report unhealthy or collapsed while the document is active, the engine autonomously invokes
window.syncRulers(), restoring ruler graphics without any user action. - Added click recovery to
.ruler-cso clicking the ruler intersection box also guarantees an instant redraw.
5. Background Polling Optimization & Resource Cleanup (extensions/system-patches.js, ui/ui-interactions.js)
- Deduplication of Canvas Engine Intervals:
- Removed duplicate
setInterval(..., 100)blocks and duplicateMutationObserverdefinitions inextensions/system-patches.jsandui/ui-interactions.js. - Added
if (document.hidden) return;at the entry point of the remaining canvas orientation intervals, stopping background DOM queries andnew Image()allocations when the app is in the background, significantly reducing memory and GPU pressure.
📁 Files Modified in 5.11.10
| File | Changes |
|---|---|
canvas/canvas.js |
Added wireCanvasLossRecovery() with contextlost (e.preventDefault()) and contextrestored event listeners on #ruler-h-canvas and #ruler-v-canvas. Added visibilitychange, focus, and pageshow lifecycle listeners. Added zero-rect bounds collapse protection, idempotent setTransform(dpr, 0, 0, dpr, 0, 0), and exported window.isRulerCanvasHealthy() and window.ensureRulersRendered(). Bumped module header to v5.11.10. |
extensions/ui-interactions.js |
Added throttled 1-second autonomous canvas health check in trackSelection() to auto-heal blanked or context-lost ruler canvases. Bumped module header and console log to v5.11.10. |
extensions/system-patches.js |
Guarded canvas engine interval with if (document.hidden) return; to pause background processing. Removed duplicate 100ms interval and duplicate thumbObserver block. |
ui/ui-interactions.js |
Guarded canvas engine interval with if (document.hidden) return; to pause background processing. Removed duplicate 100ms interval and duplicate thumbObserver block. |
core/core.js |
Bumped Core Engine header to v5.11.10. |
core/boot.js |
Bumped Application Bootstrapper header to v5.11.10. |
sw.js |
Bumped Service Worker cache name to open-publisher-v5-11-10 and header to v5.11.10. |
index.html |
Updated all 84 asset cachebusters from ?v=5.11.9 to ?v=5.11.10. |
✅ Verification Checklist
- [x] Initial Ruler Canvas Health: Verified that
#ruler-h-canvasand#ruler-v-canvasinitialize with positive dimensions and fully painted tick marks and metric labels. - [x] HTML5
contextlostEvent Resilience: Verified that dispatching acontextlostevent hasdefaultPrevented === true, ensuring Chromium does not discard the canvas context. - [x]
contextrestoredEvent Auto-Repaint: Verified that artificially clearing the canvas and dispatchingcontextrestoredrestores all ruler pixel data. - [x]
visibilitychangeBackground Tab Recovery: Verified that blanked canvases automatically repaint upon simulating background tab return viavisibilitychange. - [x] Window Focus Auto-Repaint: Verified that blanked canvases automatically repaint when the window receives focus.
- [x] Ruler Corner Marker Click Recovery: Verified that clicking the
.ruler-cintersection box immediately restores the ruler canvas. - [x] Autonomous Self-Healing Guard: Verified that collapsing ruler canvas dimensions triggers the autonomous health guard in
trackSelection(), restoring valid dimensions and repainting within 1.3 seconds. - [x] Visual Layout Verification: Captured visual proof in
v5_11_10_ruler_recovery_verified.pngconfirming crisp alignment, font rendering, and centimeter ticks. - [x] Service Worker & Cachebusters: Verified all 84 asset cachebusters in
index.htmland the Service Worker cache name (open-publisher-v5-11-10) are upgraded tov5.11.10.
🎉 Version 5.11.10 - Open Publisher