Download Latest Version openpublisher5g_amd64-windows.exe (81.1 MB)
Home / 5.11.10
Name Modified Size InfoDownloads / 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):

  1. HTML5 2D Canvas GPU Context Loss Resilience: Added dedicated event handling for contextlost events on both #ruler-h-canvas and #ruler-v-canvas. Calling e.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.
  2. Automated contextrestored Repainting: Attached contextrestored listeners 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.
  3. Background Tab & Hibernation Lifecycle Synchronization: Wired listeners for document.visibilitychange, window.focus, and window.pageshow to guarantee ruler canvases instantly repaint whenever returning from background tabs or OS-level canvas hibernation, eliminating the need to reload the page.
  4. 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.
  5. Zero-Dimension Collapse Protection in syncRulers: Guarded window.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.
  6. Idempotent High-DPI Matrix Scaling: Replaced compounding scale(dpr, dpr) calls with idempotent setTransform(dpr, 0, 0, dpr, 0, 0) so repeated repaints and zoom changes maintain crisp, pixel-perfect fidelity without graphical degradation.
  7. 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.
  8. Background Polling & Timer Deduplication: Removed redundant, duplicate 100ms background polling loops in extensions/system-patches.js and ui/ui-interactions.js, and added document.hidden guards 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 contextlost event to the canvas. If the web application does not call e.preventDefault(), the browser marks the context as permanently dead and never restores it.
  • Previously, canvas/canvas.js did not register contextlost or contextrestored handlers. 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) in canvas/canvas.js:
    • Attaches a contextlost listener calling e.preventDefault(), instructing the browser that OpenPublisher is resilient and ready to restore the context.
    • Attaches a contextrestored listener that immediately schedules a complete repaint via requestAnimationFrame(window.syncRulers).

2. Multi-Layered Window & Tab Lifecycle Synchronization (canvas/canvas.js)

  • Lifecycle Integration:
  • Attached listeners for document.addEventListener('visibilitychange'), window.addEventListener('focus'), and window.addEventListener('pageshow').
  • When a user returns to OpenPublisher from another tab or window, the engine checks !document.hidden and immediately schedules window.syncRulers(), ensuring canvas textures discarded during browser tab suspension or canvas hibernation are painted before the user clicks or scrolls.
  • Guarded with window._rulerLifecycleListenersAttached to prevent duplicate event bindings across re-initialization calls.

3. Dimension Collapse Protection & Idempotent Transforms (canvas/canvas.js)

  • Zero-Rect Guarding:
  • In window.syncRulers(), if hRect.width <= 0 || vRect.height <= 0 (e.g. while the window is minimized or in an offscreen reflow state), OpenPublisher avoids assigning 0 to canvas.width and canvas.height.
  • Schedules a single retry via requestAnimationFrame when the document becomes visible.
  • Idempotent High-DPI Transform:
  • Replaced ctx.scale(dpr, dpr) with ctx.setTransform(dpr, 0, 0, dpr, 0, 0).
  • In standard Canvas 2D, setting canvas.width resets the transform matrix to identity, but if canvas.width remains unchanged across calls, ctx.scale() compounds the scaling factor on each call. setTransform explicitly 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() in canvas/canvas.js to 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, updated trackSelection() (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-c so 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 duplicate MutationObserver definitions in extensions/system-patches.js and ui/ui-interactions.js.
  • Added if (document.hidden) return; at the entry point of the remaining canvas orientation intervals, stopping background DOM queries and new 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-canvas and #ruler-v-canvas initialize with positive dimensions and fully painted tick marks and metric labels.
  • [x] HTML5 contextlost Event Resilience: Verified that dispatching a contextlost event has defaultPrevented === true, ensuring Chromium does not discard the canvas context.
  • [x] contextrestored Event Auto-Repaint: Verified that artificially clearing the canvas and dispatching contextrestored restores all ruler pixel data.
  • [x] visibilitychange Background Tab Recovery: Verified that blanked canvases automatically repaint upon simulating background tab return via visibilitychange.
  • [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-c intersection 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.png confirming crisp alignment, font rendering, and centimeter ticks.
  • [x] Service Worker & Cachebusters: Verified all 84 asset cachebusters in index.html and the Service Worker cache name (open-publisher-v5-11-10) are upgraded to v5.11.10.

🎉 Version 5.11.10 - Open Publisher

Source: README.md, updated 2026-10-22