Showing posts with label Bug. Show all posts
Showing posts with label Bug. Show all posts

02 September 2026

Why is Android text such a buggy mess?


Why is Android text handling such a buggy mess?

Because it is built on three layers of inaccurately-parsed encodings.

“Standards and wonderful – so many to choose from!”


Plain text

First came plain text to emulate and automate the typewriter.

So we had ASCII printable characters 32 to 127, beneath which were encoded via control codes to command typewriter actions to move the “paper” around.

Critically, 10 rolled paper down a line, while 13 returned the print position to the start of the line.

At this point, plain text went tribal; some expected a normal carriage return to do 13 only, others though it cheaper for 13 to imply a full 13, 10 (or is that 10, 13) sequence.

This UNIX vs. DOS squabble screws up text to this day.


Rich text

After emulating the humble typewriter, word processors privatized attempts to encode the full printing press. Rich Text Format was an early attempted standard, the way XML-based open alternatives [1] to MS Word may do today, while the PostScript printer control language morphed into PDF, the de facto standard to preserve DTP layout as editable text.

So far, so messy - but wait, it’s about to get worse.

To embrace the world’s glyphs beyond US/UK English, character size doubled from 8-bit bytes to 16-bit Unicode characters.

That in itself added a new spin to tribalized ASCII vs. ANSI vs. IBM vs. bits lost to transmission overheads. Let’s skip the quagmire of code pages, MIME encodings, 8-bit extensions for now (ideally, forever)...

ASCII defined 7 bits, with one bit of a byte (first or last end? pick your tribe) free for other use. But communications needed more bits that either had to be stolen from characters, or padded in such that 10 communication bits carried a character or control code.

Typically, these added communication control bits meant Parity, Escape, etc. (I can’t recall the details, dial-up notworking modems were so long ago and therapy has helped forget the horror)

So… there’s all that - but that was before HTML Hell.


HTML

HTML said; “forget rigorous formatting and DTP typesetting, let’s cheapen and enshittify that to simply pouring enriched text into whatever container the display device makes available”.

Not a bad idea in itself, but screwed up by three deep problems.

First, it inherited the “one lump or two” 10, 13, 10+13, 13+10 Carriage Return squabble, and to that, added a cavalier disregard for white space.

Spaces, tabs and line breaks get stripped and simplified to whatever deranged mess the parsing code deems appropriate. Program-to-blog has been a nightmare ever since.

Second, Gates’ Windows 98 “everything is a web page” mania that spread HTML into CHM Help files and HTT Folder Views, coincided with the big ‘oops’ of OOP - which created the exploitable mess we endure today.

Object Oriented Programming meant that everything was to be treated as an Object, with Properties (hidden internal variable) and Methods (code interfaces to expose variables… and ‘do stuff’).

So what was harmless readable text became a script-encrusted code risk… by design.

Third, “RTF’s Revenge” was added to the mix.

While HTML dumbed down text layout, Markup was added as a way to candy-up Comments and bloggery in general. This supported *bold*, /italics/, _underlining_ and to provide an antidote to proportional fonts, so that spaces to align columns could finally work like a real typewriter… but why bother, when HTML will screw that up anyway, unless it understands the ‘display as code’ directive.

All this in the hope some formatting bling will reduce ENRAGED ALLCAPS SCREAMING in Comments; don’t you know ALlCAPS should only be used to make EULAs unpalatable in tiny scroll-to-death frames?


So:

We now have three levels of interlocking syntax to parse; plain text control codes and escape sequences, HTML, and Markup. This is further polluted via Word behavior, e.g. “smart quotes”, should ‘text’ be pushed through .doc(x) rather than the Open word processor ODF file format that nothing in the ‘real’ (commercialized) world seems to use.


Can AI Help?

I submit to UI pressure and chat to Gemini, who understands the problem but cannot fix it, thus failing the performance evaluation part of the interview.

We chat, and at the end I ask for a transcript to paste from Google’s AI, through Google’s Android clipboard, into Google’s Docs App to store on Google’s Drive so I can FINALLY download ‘my’ chat back to my Android phone, so I can get it off the phone as a file to my PC via USB to pretend my content hasn’t been sucked into the Cloud.

The result is a total folkup. Fails to Copy to clipboard. Fails to Paste into Docs. Does not Select All, only some stuff. No alerts or errors of course, so things may look as if they worked, only to find you only have the last AI response of an hour-long 10-prompt Chat.

AND THEY WONDER WHY WE SCREAM IN ALLCAPS. Do you have an emoji for ‘tears of frustration and retching’? I do... &-Q


PS: [1] I asked CoPilot of ODF was based on XML, and it replied:

Not based on XML

OpenDocument Format (ODF) is not based on XML. ODF is an open file format for word processing documents, spreadsheets, presentations, and graphics, developed with the aim of providing an open, XML-based file format specification for office applications. It was based on the Sun Microsystems specification for OpenOffice.org  XML and is published as an ISO/IEC international standard ISO/IEC 26300 – Open Document Format for Office Applications (OpenDocument). 

So... it’s not based on XML, because it’s developed to provide an XML-based file format.

In other news, this chunk of AI-generated text line-breaks in the middle of words when pasted into this post (via LibreOffice Writer), as every “space” character is a no-break-space character, using a different underlying character code that looks the same (hello, homoglyph exploits) 


09 September 2025

KB5063878: Too many NTFS Extents?

Still thinking about KB5063878 (when you get to remember a KB number, it's usually a bad one) and several things in the code stack may apply; Device Encryption, Ring -2, bigLITTLE cores and threads, file system resource depletion, motherboard and device firmware, processor microcode, motherboard chipset, and those elusive "Hardware Error" items that turn up in Reliability.

Disable Sandbox?

This recent article holds a clue, if you scroll down about a third way down, and I paste: 

“I myself was able to recreate the same initial error I got while copying the 151G file. Not only that, but the epic fail originated a WHEA hardware error in the event viewer related to the PCIe controller, which eventually forced me to restart. I then disabled sandbox, uninstalled the update, and the file copied just fine without a hitch… no errors, no freezes, no hangs.”

“I have a Crucial T710 2T, and I also suffered a glitch. Not as serious, but nevertheless, a glitch. I tried transferring a 151G file; it failed, and it lingered in my SSD as a ‘ghost’ file. I could not delete it, access it, or anything. After 3 attempts, I was able to delete it via Safe Boot Minimal,” another tester told Windows Latest.

After that, the article blandly states...

We don’t know how some people have a botched-up SSD after the recent Windows updates, but it appears to affect a very small number of users, and unless Microsoft finds something in telemetry data, we’ll never know what really happened.

No, it's not OK to shrug off data and storage loss as JOOTT (Just One Of Those Things), even if affecting "a very small number of users".  

Good to know that disabling Sandbox may be a workaround, and a lot cleaner than "just" trying to uninstall the face-hugging KB, where disabling the Sandbox may be required before this will work beyond an error and failure to uninstall.

Dead runtimes don't talk

Forget telemetry, it can't tell you anything about the most significant failures that kill the runtime, if not the entire system.  A bullet through the brain means you can't even log "Something went wrong"; don't get distracted by the tyranny of the measurable!

Reliability: Hardware Error

Part of the support ritual is to check Reliability, a useful feature prototyped in Vista and maturing somewhat thereafter, as a manageable tap into the fire-hose of Event Spewer.

There, I often see "Hardware error" in systems that are otherwise fine, with nothing amiss on DISM and SFC do-it-for-me code fixers.  There are no further details for these entries, and so far my limited efforts to link them to Event Viewer items has not shed a light.  Perhaps they are related to GPU glitches, or something else too deep in the hardware, such as... PCIe.

Ring -2

I can't find links for this, or recall the name of the subsystem involved, but I remember what I read; that a deep processor ring -2 mode is how "BIOS" presents USB keyboard and mouse to software as if they were PS/2, and by implication, possibly legacy hardware emulation in general.

In this mode, regular CPU execution (including kernel Ring 0) is paused while the Ring -2 code does its thing.  Any bugs here are likely to hard-hang the system, but could delay return to the point that time-sensitive code may time out or fail.  This code is so deep under the kernel carpet, perhaps Windows can only report "Hardware error"?

Under-the-rug stuff like this, or "remote admin" opportunities, are a great place for malware to dabble.

Current favorite: NTFS Extents

We know not to defrag SSDs, as that "just moves the junk around" and hammers the flash memory cells' limited write life; it's better to ask the SSD firmware to Trim, and hope it will eventually do so.  

Keeping track of where the file system thinks things are, and where the SSD firmware chooses to (eventually) write them, is the black art of the SSD firmware, and likely a big reason why SSDs cost more than the bare flash memory sold as camera cards and USB flash drives.  There's very likely to be resource limitations and opportunities for things to go wrong in this space, which may be why Phison found themselves in the cross-hairs after KB5063878 brought our new crisis du jour.

Upstairs in the NTFS, there's a known resource depletion risk; cluster chaining info "Extents".  Whereas FATxx dedicates slabs of pre-booked space for cluster chaining info (i.e. which storage block is next after reading the current one), NTFS stores the start of each run of contiguous clusters, and presumably how long the chain will be before the next extent is to continue the chain.

This avoids the scalability impact of FATxx File Allocation Tables, at the risk of adding the "lie to me" meta-bugs of "thin provisioning", e.g. where assumed compression, sparse files etc. fail to actually fit within available space.  There's also a lot of hop, skip and jump when MFT and other files have to extended to arbitrary fragments in the storage map, inviting further resource depletions and errors elsewhere, boosting write amplification, and widening critical periods while our digital Superman is poised mid-leap between skyscrapers.

The mystery is then not why things go wrong during massive file ops on a busy NTFS that has never been defragged, but why this is only rearing its head after KB5063878?  

  • What code has KB5063878 changed?  
  • Is it specific to the Sandbox subsystem?  
  • Is it affected by Intel's bigLITTLE mix of "real" and "eco" cores, and how Windows assigns threads to these? 
  • Does it happen less if stealth Device Encryption is not imposed?  
  • Does it still happen when offline, excluding incoming pokes?  
  • Does it still happen if all Power Management is disabled and flattened, including Modern Connected Standby and network "magic packet" wakes?  
  • Is it related to any particular hardware or firmware, aside from SSD controllers?  
  • Does it happen to low-spec SSDs, eMMCs and hard drives, or over SATA or USB?

These may be the next set of questions to test, now that we may have repro(ducability) at last.


04 September 2025

KB5063878 Bug: Gotcha!!

I think I've figured out the data-killing KB5063878 bug; it's when UAC tangles with UI-less activities, as described in this report.  Throws back to Vista's birth pains, when attempting add back lost immutability to the many-to-many relationship between things that happen, to what should not be allowed  :-)

The report speaks of unexpected UAC prompts that now pop up due to changes added by KB5063878.  

If that collides with last month's changes to UI-less "pre-Windows" code, e.g. before BCD is processed to menu OSLoaders (or blunder into {default}), or when WinRE boots instead, or when a "mini-Windows" is applying deep code changes before Windows loads, then you'll never see an error message, let alone UAC prompt to which the user can respond.  

This is vendor-knows-best territory, locking out users and administrators alike.

Now if those changes were attempting to change partitioning, e.g. to shrink C: for space to be assigned to a new WinRE Recovery partition, then things could get messy - especially in a multi-threaded environment, and/or failure of the "black box" of steps to be properly atomic.  

For example, imagine if one part of the process is allowed to message updated partition info to other threads, but another part of the process is blocked from actually applying those changes, then the runtime hopefully will screw up and crash out of functioning before it writes raw data to the wrong storage addresses, trashing file systems and/or partitions.  If less lucky, such writes may trash these structures, so the storage is latched into a corrupted state.

So, is an apparent automatic recovery on reboot, actually safe?  Well, if NTFS C: is foreshortened, everything may still appear valid and work.  If the runtime crashes out, then the "dirty bit" should remain set, prompting the next boot's AutoChk to "kill, bury, deny" the file system's partition-end mismatch, "fixing" it to something at least valid for future file system operations. 

The user may or may not see an AutoChk prompt to press a key to skip checking drive C:, but with fast-enough SSDs and the trend to hide details from users ("don'tcha wurry your pretty littul haid, Sue-Ellen, ever'thing's gonna be fine-just-fine"), perhaps that will be hidden, too.

This assumes Fast Startup doesn't just resume the doomed runtime and botch everything not already botched thus far, but that's likely to have been disabled for the next boot by some sort of "update in progress, boot properly, run this OSLoader instead" or similar logic.

Anyway, I think that is where I'd dig next, if trying to fix this mess, rather than just claiming "not my dog" after testing to clear a path to legally disclaim responsibility.

Why does bulk testing miss this?

Previous post explains that; bug may only arise when the full set of real-world conditions apply.  Simply trashing an SSD controller with bulk writes from a KB5063878-updated Win11 won't do it, and neither may a virginal Win11 24H2 update to KB5063878 do it, if bulk writes don't happen at a time to overlap other factors that may not be present, etc.

Why only with bulk operations?

There may be race conditions involving various levels of OS and component cache managements that arise only in the context of cache saturation and flush periods extending beyond sate time-outs or blind wait periods.  There may also be interplay with Delayed Start and Scheduled Tasks, especially when certain OEMs trigger underfootware to run every few minutes.

Vendor disclosure attempted

I've alerted Microsoft via Feedback Hub, and my ex-MVP colleagues via private email list, in case they don't experience the same lightbulb effect I did, when reading the "feed seed" article linked above.


02 September 2025

KB5063878 Storage Corruption: External Factors?

Following up on reports and post-test denials of August Cumulative + SSU KB5063878 corrupting and possibly destroying storage when under a 50G+ bulk operation load, some likely scenarios come to mind, that may be missed during artificial accelerated testing sessions.

The initial focus was on SSDs based on Phison controllers, prompting Phison to test and exclude their controllers as a cause of the problem, while recommending heat sinks to protect SSDs against load-related failures.  Subsequent reports suggest other SSDs, and even hard drives, can also be affected.

Accelerated testing?

Phison claims 4,500 cumulative testing hours across the drives reported as potentially impacted and conducted over 2,200 test cycles, which would be 187 days of testing if done on a single device.  Testing 1,000 devices in parallel would reduce testing clock time to 4.5 hours per device, each iterating to a bit over 2 test cycles per device.  You can shift the numbers around, e.g. 100 devices etc. limited by the number of clock days since the problems were first reported - but it's unlikely testing would have been real-world, i.e. based on individually-installed Windows 11 with a wide range of co-installed software, etc.

From Phison's perspective, all those software variables are irrelevant; as long as the hardware itself can be shown to work, it's some other vendors' problem if it's a software thing.  In any case, attention shifts off Phison, and hardware specifics, once reports of other storage devices are considered.  This spectrum of affected devices also suggests this isn't limited to overheating hi-performance SSDs.

The MemTest86 experience

A familiar type of artificial accelerated testing is MemTest86, in search of "bad RAM", but also as proof of hardware ability to not crash, power off, reset or lock up over a "long enough" clock-time period.  I've done this for decades of PC builds, troubleshooting, laptop pre-acceptance testing, etc. and have settled on 24 hours as the shortest 99%-certain test period.  

I've seen one case where the first error showed up at around 25 hours, and one where the first error showed up in an over-weekend 100+hour unattended test run.  In both cases, the first error was the only error, and neither system latched into a persistent error state thereafter.

Shorter test periods, e.g. 18 hours, would be more convenient, e.g. allowing in and out turnaround within the same time of day, but I saw too many first-errors within the 18 to 24 hour period.  Clearly, this makes the typical default 4-pass loops completing in an hour or two, unfit to be trusted as exclusionary.

Even so, "burn-in" testing with MemTest86 is not real-world, as it exercises a very limited subset of what the tested hardware has to do.  It doesn't test GPU or DMA access to RAM, localized heat related to different kinds of CPU activity, and obviously anything to do with storage or other components.

Cache and Race Conditions

Microsoft's test methods are reportedly thorough, but not detailed, and are likely also to involve accelerated automated test methods that may be as narrow in their way, as is MemTest86's testing of processor and RAM.  

Variables may include how soon after Windows 11 boot the tests are started, bearing in mind how "underfootware" can be triggered at arbitrary times - consider Delayed Start, that seeks to pretend Windows boots faster than it actually completes all inits and startups; application pre-loading that seeks to pretend applications aren't slow, but your Windows and hardware may be, stuff triggered via Scheduled Tasks, and hidden ServiceWorkers that may be triggered remotely.

Bulk operations will saturate caches, possibly revealing lower raw direct transfer speeds.  These caches will be full at the "end" of file operations, needing time to spool out to where the data has already pretended to have been written... can you guess the problems that may happen next?

Modern PCs are more like networks of DOS-sized systems.  A modern CPU has enough cache RAM to run a Windows 9x installation, while firmware logic within black-box devices such as hard and solid-state "disk" storage is at least a 20th-century DOS or BIOS.

Computational scale

There's a certain size of code that we may expect to be bug-free, at least if kept fully encapsulated; I'd guess somewhere between a DOS in a 1M memory map, and a Win9x in 4M or so.  

Beyond that, things rapidly bog down such that attempts to complete a project will fail and have to be abandoned (WinAmp 3, Netscape, the original Microsoft Edge, even Windows 11 24H2's attempts to become acceptably reliable before 25H2 is due), or it will become a bunch of separate boxes of code linked together, as is the case with modern PC hardware subsystems and "web apps", or a thin layer of new top-soil over a decades-old mass of existing code, e.g. just about every OS other than Windows that is based on ancient *NIX, or how Windows 95 had to re-use solid 16-bit Assembly code to dance within 4M of RAM.

Whether it's a team of human workers, or a map of code black-boxes, new challenges and inefficiencies arise in how these interact.  Add race conditions that arise when critical periods shift in phase, and exclusionary testing becomes a really hard problem that may defy automation.

So yes; Phison may prove thier controllers are OK, and Microsoft may conclude KB5063878 is OK, but neither may satisfy our need to be sure the KB will be safe on our particular systems, for reasons that both vendors can blow off as "not our problem".  And what happens with this KB, may happen again with others, so we need a systematic fix for future scenarios.

Power (mis-)management

One very likely scenario involves power management, when power to a subsystem is cut before that subsystem has actually done the work that it claimed to have finished.

Consider an external USB hard drive and "Safe To Remove".  To be aware that an external device is connected, it helps to see the relevant icon in the SysTray (sorry, "notification area"), but it's hidden under the More... by default.  To click on it in order to initiate a "Safe To Remove" data flush to storage, you have to see the icon, which is instead hidden on the assumption you only need to see it when it has something to "notify" you.  So far, so... not good.

Let's say you do remember you have an external plugged in and you do click the icon, then await the feedback that the device is safe to remove, or should not be removed because it is still in use.  If you have Focus Assist enabled, you will never see that feedback, because that Notification is not considered sufficiently important, even though it's a part of your Focus that is to be Assisted.  So, how are you supposed to know you can safely unplug the storage device?

We're told this "doesn't matter", but I've seen enough corrupted external storage to know that it does.  The damage may be hidden by the "kill, bury, deny" logic of NTFS transaction rollback, AutoChk and ChkDsk, but you're still losing data that you expected to have been written to storage.

Finally, listen to how external USB hard drives often burble on after the "Safe To Remove" notification pops up.  Has the drive firmware really flushed its cache to platters, or did it lie when it told the parent subsystem that it had finished all pending writes?  Which drives do you think will look faster when tested by hardware reviewers, and feel faster to users (at least while all appears to be well)?

The same glitches that can corrupt external drives, can lose data if a component is expected to be idle, having completed all pending tasks, thus safe to be powered off.

Fast Startup and partition changes

So far, we've considered loss of pending write operations when caches take too long to flush, and/or when subsystems are prematurely disconnected and/or powered off - but there's another aspect to KB5063878 that could trash file systems and partitioning, if factors excluded from automated and/or accelerated testing were to pop up in real-world scenarios as occasional race conditions.

By duhfault, Windows 11 fakes "shutdown" as part of the Fast Startup "feature".  Specifically, instead of doing a true shutdown (which has its own risks when wait time is shorter than time needed to complete tasks), Fast Startup hibernates the system state after all users are logged out.  

The next startup then appears to be faster, because the previous runtime state is Resumed, persisting any runtime glitches, resource depletions, etc.  More to the point, all sorts of sanity-checks and initializations are bypassed, on the assumption that the way things were at (fake) "shutdown", are still holding true when the runtime session is resumed.

So, if an external USB drive was disconnected while the system was "shut down", anything that was still to be saved within the hibernated runtime, will be lost.  And if any changes to partitioning were made in between the (fake) "shutdown" and "startup", then the continued runtime will be unaware, and will write raw storage data blocks to where the partitions and file systems... used to be.

It was this that alerted me to the dangers of "Fast Startup", after booting USB partitioning tools to resize and shift partitions while the system was "shut down".  The next Windows boot then promptly destroyed C: and other partitions, by overwriting the raw areas of storage where these partitions and their file systems were defined.  Fast Startup is Not Your Friend.

The failure pattern I saw when Fast Startup missed out-of-runtime partition changes, is similar to that reported for KB5063878; drives "stop responding" and/or vanishing, once write operations no longer continue using stale and invalid in-memory assumptions on partition and file system raw locations, which may only happen once those raw storage blocks are lost from cache and have to be reloaded, only to find the structures trashed by preceding mis-directed writes.

The next boot may or may not silently "fix" things, either via AutoChk file system "repair", or by WinRE's startup recovery, or even the new "call home and auto-fix" facility that may or may not yet be in play.  These "fixes" may cover up the damage and data loss, but is that enough for you?

KB5063878 and WinRE

KB5063878 does more than change code within Windows; it also changes WinRE.  The previous monthly Cumulative also changed pre-OS code, such as the mini-Windows that hosts the installer for Windows, and/or that which processes the BCD before the decision to boot Windows is taken, as well as the Servicing Stack.  These deeper changes make it harder to uninstall the KB, as the code that manages the uninstallation is itself subject to changes imposed by the KB being uninstalled!

When setting up a new laptop already running 24H2, I noted a 850M Recovery partition as expected.  From within Windows, I shrunk C: to 150G, creating a new D: partition to fill the remaining space on the 500G SSD up to the 850M Recovery and vendor-specific 260M MyAsus partitions at the "end".

Windows Update installed only one Cumulative update, being KB5063878, along with the usual Defender and Dot Net updates.  This may or may not have included changes added by the July 2025 Cumulative, thus creating a "YMMV" for those who had already installed the July Cumulative separately, to become the baseline to which uninstalling KB5063878 would return.

So right there, we have a divergence that would probably be missed by automated testing my Microsoft and Phison, as they seek to disclaim responsibility for reported problems.

After these updates, the space previously occupied by the 850M Recovery partition was left empty, while C: was now smaller, with space between C: and D: being allocated to a new 950M Recovery partition.  It's unclear as to when these partitioning changes were applied, and there may be opportunities for these changes to be mis-merged with bulk file operations, lost to un-flushed caches in prematurely disconnected subsystems and/or hardware devices, tangled up with Modern Connected Standby and/or fake "Shutdown" of Fast Startup, etc.  

"Many a slip between cup and the lip", as they say.  These are the specific scenarios I'd set out to test, if I had the resources to do so - KB5063878 and/or Phison may not be "to blame" when considered in isolation, but nothing exists in isolation in today's sprawling, over-connected infosphere.

What next?

Microsoft is still pushing KB5063878 while still investigating reports of significant data loss.

So, as we can't trust vendors to block dangerous updates from the server side, we need ways to block specific updates before they install, especially when these are too entangled to be uninstalled once injected into the system.

And yes, we can expect scenarios where a malicious FUD campaign may socially-engineer users into delaying updates, to hold the door open to exploit code defects the updates would have fixed.

As it is, this risk is greater when we have to advise users to Pause all updates altogether, as the only way to avoid a specific update reported to be toxic.


29 August 2025

Microsoft: Stop Pushing KB5063878 "Death Patch"

Please, Microsoft; place a "hold" on KB5063878 August Cumulative Update for Windows 11, until it can be trusted not to destroy storage devices, installations and data.

We're encouraged to trust vendors to know best, including blocking updates known to cause trouble and/or suffer from compatibility issues.  Microsoft knows that KB5063878 corrupts storage (although this is not documented here), including destroying storage hardware, yet even after testing indicated the issue affects more than just a few particular SSDs, but also hard drives as well, it still pushed this update yesterday (28 August 2025) to a brand new laptop.

Yes, the issue may "only affect a few systems" and only when doing bulk file transfers of 50G+, but that's exactly what a new system will do straight after mandatory updates; bulk transfer data onto the new system from the one it is to replace.  This scenario is even more likely at a time Microsoft is telling us to replace perfectly capable Windows 10 systems so we can "be supported" on Windows 11 - even as that "support" involves pushing known-lethal updates "to keep us more secure".

As it is, KB5063878 is a nasty face-hugger beast, including as it does a Servicing Stack Update as well as changes to code outside Windows itself; since the previous month's Cumulative changed WinRE, thus the automatic recovery system for failed boot, and likely WinPE, perhaps pre-BCD and UEFI, who knows?  Now that "BIOS" is "extensible", toxic OS drivers can permeate that space via UEFI drivers, as already afflicting the BCD Boot Menu.

So, it's not as simple as uninstalling the update, and/or blocking it by hiding it from future Windows Update activity.  Uninstalling the update may fail with errors, requiring a more elaborate approach via DISM, possibly disabling WinRE and Sandbox first, etc.  Advice then suggests Pausing updates in the hope that Microsoft fixes what is quite a deep change to the code base, in the hope that this happens before the maximum allowed Pause time expires, that rushed fixes don't create new issues, and that exploits don't start hitting whatever KB5063878 may have fixed while we wait.

If we cannot trust Microsoft to place a "hold" on updates that can destroy data, installations and hardware - surely the biggest impact possible - then we need a way to block particular updates before they get rammed into the system.  We should not have to first accept the update before uninstalling and blocking it, nor should we have to Pause updates altogether, just to avoid a crisis du jour.

05 August 2025

Bug: Windows 11 Safe Cmd OSLoader loads Explorer.exe as shell

Using BCDEdit to /Copy {default} to two new GUIDs, setting those to Safe Mode and Safe Cmd, then adding the GUIDs to {bootmgr} via /DisplayOrder, is a great way to pause the Windows boot process at a BCD boot menu, to either power off or choose a safer option when needed.

I started doing this in Windows 7 and it's worked well up until Windows 11, possibly version 24H2, where the alternate shell directive (SafeBootAlternateShell)  in the Safe Cmd OSLoader is ignored, causing Explorer.exe to load as the shell instead. This may run unwanted code integrated into Explorer.exe, or cause the system to crash if something is seriously awry within the Explorer.exe shell sub-system - so advice to "just RegEdit HKLM...WinLogin, Shell and restart" won't avoid that risk.

If I navigate the BCD boot menu via the Tab key or mouse to "Change defaults or choose other options" section below the OSLoader list, and use the Boot Options there to force Cmd as shell, that works after the usual restart and boot.  Command Prompt also works when selected from OSLoaders that launch a .wim via RAM Drive, e.g. the built-in WinRE or added WinPE, such as offered by Macrium Reflect, EaseUS To Do Backup, or your own "home-rolled" WinPE.

So there's something amiss with how Windows 11's pre-OS code interprets OSLoader settings to ignore the setting to use alternate shell , or something else at that fork in the BCD interpretation logic.

Here's what these OSLoaders look like, from a working Windows 10 22H2 system:

C:\WINDOWS\system32>BCDEdit /Enum OSLoader

Windows Boot Loader
-------------------
identifier              {current}
device                  partition=C:
path                    \WINDOWS\system32\winload.efi
description             Windows 10
locale                  en-US
inherit                 {bootloadersettings}
displaymessageoverride  Recovery
recoveryenabled         Yes
isolatedcontext         Yes
osdevice                partition=C:
systemroot              \WINDOWS
resumeobject            {<GUID1>}
nx                      OptIn
bootmenupolicy          Standard

Windows Boot Loader
-------------------
identifier              {<GUID2>}
device                  partition=C:
path                    \WINDOWS\system32\winload.efi
description             Safe Mode
locale                  en-US
inherit                 {bootloadersettings}
displaymessageoverride  Recovery
recoveryenabled         Yes
isolatedcontext         Yes
osdevice                partition=C:
systemroot              \WINDOWS
resumeobject            {<GUID1>}
nx                      OptIn
safeboot                Minimal
bootmenupolicy          Standard
sos                     Yes

Windows Boot Loader
-------------------
identifier              {<GUID3>}
device                  partition=C:
path                    \WINDOWS\system32\winload.efi
description             Safe Cmd
locale                  en-US
inherit                 {bootloadersettings}
displaymessageoverride  Recovery
recoveryenabled         Yes
isolatedcontext         Yes
osdevice                partition=C:
systemroot              \WINDOWS
resumeobject            {<GUID1>}
nx                      OptIn
safeboot                Minimal
bootmenupolicy          Standard
safebootalternateshell  Yes
sos                     Yes

It is the safebootalternateshell = Yes that is ignored, in Windows 11 24H2.


05 November 2024

Firefox 132.0 Breaks Netflix, 132.0.1 Still Broken?

Firefox 132.0 breaks Netflix at the point content should start streaming, with Netflix error code F7361-1253-806E0005, as tested on Windows 10 22H2, Firefox 32-bit on 64-bit Windows.  

This is positioned as a DRM issue (no surprise, as DRM is code designed to break playback), said to be fixed in Firefox 132.0.1, but I'm still seeing the same failure pattern.

Well, bugs like this can happen; that's Strike One - but wait, this reveals two deeper issues...

1: No way to undo a toxic update

If your code needs to be "updated" (i.e. fixed) so often that automatic updates are preferred (at least by the vendor), then you need to be humble about such updates, in case they create new problems.  That means the ability to undo an update that may be messing things up - but I can't find that facility in Firefox; Strike Two. 

2: Update breaks data?

Fortunately, I kept a full offline installer for the previous version of Firefox, to undo whatever the latest update may have broken.  I could install that over the newer code base as an "upgrade"; no warnings about version revision or side effects.  But when Firefox started after this version fall-back, it warned: "Using an older version of Firefox can corrupt ... an existing Firefox profile.  To protect your information, create a new profile for this version of Firefox".  

Only choices from that modal dialog box were Exit or Create New Profile.  I certainly did not want to botch my profile by starting a new one that might lose all "my stuff", so chose to Exit. Strike Three.

Now, this worrying if this is not specific to 132.0, i.e. if Mozilla thinks it's OK to routinely botch user profiles and "just" spawn new ones, whenever one tries to undo a toxic update.  Changing data compatibility is non-trivial, should seldom happen, and be well-tested and documented if it does.  

A bland "well, we may botch your data, so let us 'protect' you as the only way to run the program, or go away" doesn't cut it, especially with no further details on what would happen if one "just" starts a new profile.  That approach amounts to "Trsut us, we're a software vendor" when the competence layer of the trust stack is already broken by the toxic update.

I re-installed broken 132.0, used Edge instead, watched for a bug-fix version, saw 132.0.1, downloaded and installed that, and lo!  Netflix still broken.  I presume the Netflix issue will eventually be fixed, or maybe it's something specific to my setup, making "Strike One" a "No Ball".  But now we've caught the "man behind the curtain" on Strikes Two and Three, not sure if I'll go back for more of the same.

10 April 2024

Black but Working BCD Boot Menu; A Fix

In the age of UEFI PCs running Windows 10 and later, you may find a situation where the BCD Boot Menu is invisible as a black screen, but still works if navigated from the keyboard.  Enter will end the timeout, arrow keys will change the selection, etc.

This problem pattern is not the same as others that are more commonly described online; the menu that does not appear because it is bypassed (Fast Start, Timeout = 0, etc.) or other boot issues that may use a different BCD, bypass the BCD altogether, boot the wrong storage device, hang or crash before reaching UEFI boot due to hardware issues, etc.  

Recently I saw my 3rd case of this problem pattern, having described the first and second cases previously.  In all three cases, the boot menu works just fine, but can't be seen because the screen (or all screens, if multiple connected) stay black.  There's signal to the screen that the monitor accepts, rather than suspending due to incompatibility, but everything is black, with no visible mouse pointer or text-mode blinking cursor.

One fix is to disable the graphics adapter in Windows Device Manager, forcing Windows to use the Microsoft Basic Adapter driver instead of the driver specific to the system's GPU (as detected by Windows).  This proves this to be a "kick away the ladder" metabug, where something that should affect only Windows (the choice of graphics driver) affects the underlying UEFI system level beneath, with the potential to make it impossible to boot Windows to undo the damage.

Another fix for older systems, is to avoid UEFI in favor of CSM "BIOS", but this option is no longer available with Class 3 UEFI, and is increasingly untenable as Windows and hardware evolves.

Today's fix is to force the "legacy" type of BCD Boot Menu via a BCDEdit setting, specifically...

bcdedit /set "{current}" bootmenupolicy legacy

 ...where "{Current}" can be replaced with "{Default}" or more specific OSLoader GUIDs, as displayed explicitly via the /V option in BCDEdit. The visible impact is a text-mode white on black boot menu instead of the blue graphic boot menu; also, the menu text for OSLoaders that use RAMDisk will be taken from the RAMDisk defining GUID in BCD, rather than the OSLoader's GUID.

The implications of all this are twofold. 

First, the pre-Windows UEFI boot process is affected by choice of drivers in Windows, extending to how the BCD registry hive is interpreted by {bootmgr} (as seen from BCDEdit).

Second, the code that processes the BCD to display the Boot Menu has two pathways; that of the Windows 7 era Boot Menu that still works when forced via "bootmenupolicy legacy", and the newer Windows 10 era code that screws up the display when problematic drivers are in effect.

The safety implications go deeper; that an attack can be made through Windows to "brick" the system at the pre-Windows UEFI system level, such that no storage device can boot.  "Windows" device drivers should not integrate into the system as firmware "Extensions"!

14 November 2020

Intel 10nm GPU Driver Blanks BCD Boot Menu

This is the second case of a brand new laptop based on Intel's 10nm 10xxGx processors, in which the Intel Display Adapter driver causes the BCD {BootMrg} menu to be invisible (black-on-black), though still working.  Here's how to demonstrate the bug:

  1. Run BCDEdit from an "As Admin" Cmd or PowerShell
  2. Add an OSLoader entry to BCD {BootMgr}, so BCD boot menu will be invoked
  3. Set the Timeout to 15 or so
  4. Restart system from cold, i.e. not "Fast Startup", Resume from Sleep or Hibernate, etc.
  5. Rotating dots will vanish to blank black screen, where you should have seen the boot menu
  6. Wait for timeout or press Enter; system will boot as expected
  7. Device Manager, select Intel Display Adapter, Disable
  8. Repeat from (4), menu will now appear as it should, OK
  9. Device Manager, select Intel Display Adapter, Enable
  10. Repeat from (4), menu will fail to be visible again

The current case is a Dell Inspiron 3593 based on i7-1065G7, whereas the first case was an Asus X509JA-i541GT based on i5-1035G1.  Both processors are 10nm but have different integrated GPUs.  Windows 10 versions 1909 (Dell original), 2004 (Asus updated) and 20H2 (Dell updated) equally affected.

Click the link words to drill down into detail, and here for a fuller description of the problem.

26 October 2020

Firefox Memory Leaks

 I use Firefox without extensions and plugins, and find it "leaks memory"; specifically, the memory footprint as seen via Win10 Ctl+Alt+Del Task Manager increases towards 2G over days of mult-tab use, whereupon the entire system slows down and becomes less responsive, while Firefox becomes as crabby as a sleepless toddler (prolly for much the same reasons).

For this reason, I use 32-bit Firefox, to limit its address range and thus impact on the rest of the system.  Going 64-bit would only "solve" the problem in the same way a bigger gas tank would "solve" a leak, i.e. delay the onset of inevitable problems.  32 bits can address a 4G range, halved to 2G for signed offset addressing as is likely for Firefox's internal memory (mis-)management.

So when I saw "CVE-2020-15254: Undefined behavior in bounded channel of crossbeam rust crate" (seriously, WTF is a "crossbeam rust crate"?), I went Aha!  And when I read "The impact on Firefox is undetermined", I went Aha! again, as in "geez Mozilla, don't you know Firefox leaks like a tennis net in a wind tunnel, haven't you even begun to wonder why?"

At the meta level, there's a familiar problem of per-instance vs. aggregate cost; since the days of DOS and Borland's program compilers, it's been "do we frequently ask the OS for small memory allocations, or do we seldom ask for large allocations and manages the details in-house?".  Do you pull cash from an ATM for each cash purchase, or do you draw once a week and manage your own wallet of cash?

Such details may be managed in-house by Firefox developers, or more it's more likely "sub-contracted out" to some 3rd-party generic code library, prolly whatever came with the source code compiler or other development tools.  As a cross-platform program, this is less likely to be handed off to the platform-specific OS; in fact, platform independence is a strong reason for in-house memory management.

Which brings us to another meta-level problem; "black box" code re-usability.  The idea is that such blocks of code should hide their internal details and only expose a limited surface that is trivial enough to rely on (if all non-trivial code has bugs, keep all crucial code trivial!) but in practice they always leak, and such leaks may be exploitable - hence the CVE number.

26 September 2020

Invisible BCD Boot Menu; Intel Graphics Driver

Geek summary: First post-install Win10 update of Intel Graphics drivers for i5-1035G1 renders the BCD Boot Menu invisible, although it still works.  Fixed if Device Manager, Display Adapter is Disabled; problem reproduced if Enabled, effects taking place after Windows restart.

I suspect the cause is failure of the driver to attain color values when started in the raw EFI context, as using the Win10 Settings, Recovery, Advanced UI will show the boot menu in proper color.  That UI reaches a different boot menu, with the normal boot menu seen via Other Operating Systems UI, without restarting through raw EFI boot.  Either the first menu applies the needed color settings, or bypassing the raw EFI phase preserves the successful Win10 OS context.

Test system where problem encountered; brand new Asus laptop based on new 10nm 10xxGx series processor, specifically i5-1035G1.  Not encountered in a new desktop PC built on Gigabyte motherboard with Pentium Gold G6400 processor, also as set up last week.

Background

EFI boot from internal storage enters that storage via {bootmgr}, which displays a boot menu if there are more than one OSLoader entry in the "DisplayOrder".  By default there's only one entry to boot Windows 10, so this boot menu is normally bypassed, and the bug is thus unobserved.

As part of my standard setup, I add boot entries for Safe Mode and Safe Cmd, to float these less-destructive troubleshooting opportunities above the deceptively-named "Refresh Your PC" (a bit more than a F5 web page "refresh") and "Reset Your PC" (far beyond pressing the Reset button to force a bad-exit Restart) bear-traps that you'd have to walk past to eventually find the Safe Modes.  This causes {bootmgr} to display the BCD Boot Menu for the Timeout seconds, thus revealing the bug.

Failure pattern

This particular system displays a GUI "Asus" image during the EFI firmware phase of the boot process, which fades before the BCD Boot Menu appears.  As this logo fades, the color undergoes a subtle shift to a less-blue hue of white; possibly a switch to greyscale, rather than a Win10 "night light" setting (as changing that setting does not change this behavior).  When the failure pattern is not in effect, the Asus logo does not change hue as it fades.

Normally, you'd then see the Boot Menu, but instead, the screen stays black.  There's still display signal present, and if if blindly use the arrow keys before pressing Enter, the menu works; you'd load whichever menu item you'd blindly selected.  If you use the trackpad or a mouse to move the mouse pointer, it will appear as the expected white arrow, and blindly clicking will also succeed in selecting and launching a menu entry.  

If you do nothing, the screen remains black for Timeout seconds and then boots normally.  The initial impression is that the system has "hung" or "crashed" (untrue, as safely tested by pressing Caps Lock to toggle the keyboard LED) or that the system is way slower to boot than expected, especially for an NVMe SSD.

Problem onset

I set up systems offline, to limit problems to one system rather than whatever is being pushed from the entire Internet.  During this phase, the BCD Boot Menu worked normally as expected, both before and after upgrading the "new laptop" Windows 10 version to a freshly-made version 2004.

Problem only appeared after attempting to disable Asus's aggressive underfootware, and initially I ascribed it to this and quickly reversed changes back to the default non-Microsoft Services, Startup entries, and Scheduled Tasks. However, this was also the first Restart after going online and letting Windows Update pull down and install updates, which included "driver updates", which in turn included OEM programs now pushed as "drivers" to evade user management via Settings, Apps or Control Panel, Programs and Features.

The fix

BIOS update, re-defaulting CMOS Setup settings, power off at the mains, holding down Power switch (part of keyboard) for 20+ seconds, BCDEdit nudge to {bootmgr} do not fix.  Device Manager, Display Adapter, Update Driver reports the latest (thus surely the "best") driver is already installed, and the Rollback Driver button is greyed out.

What fixes the problem, is Device Manager, Display Adapter, Disable and then a Shudown UI, Restart to put this change into effect across the EFI boot phase.  Enabling the Display Adapter reproduces the failure pattern after the Restart; the problem remains present until Display Adapter is Disabled again.

Note; I also disable the Windows 10 "Fast Startup" setting via the convoluted Settings, Power UI required.  So at least we know we're not resuming a flawed system runtime after a fake "shutdown".

Likely cause

I suspect the Intel graphics driver depends on context established by Windows, which is absent (nul pointer, anyone?) when the driver is run from raw EFI.  It either sets an incorrect graphics mode, or draws color values from zero'd memory such that "ink" and "paper" are both black.

Safety implications

Class 3 UEFI forces EFI boot, and thus all the flaky complexities of "Extensibility".  Whereas the ancient BIOS/MBR code was sufficiently trivial to be free of bugs, EFI is not, and adds the risk of malware positioning itself to run before any OS or storage device can boot.

The fact that a Windows driver can poison the pre-OS EFI boot process is worrying, especially as the choice of driver to load is either read by pre-OS EFI from Windows, or has been latched into pre-OS EFI behavior by a setting applied from within Windows.

Scenario 1

EFI executable .efi files are able to read the Windows registry, and do so, as the BCD is in fact a Windows registry hive in structure.  However, {bootmgr} is expected to be OS-agnostic, as at the time the Boot Menu is displayed, no decision has been taken as to what OS to boot - could be any version of installed Windows, a PreOS WinPE, a Linux, anything.  So the code that runs before the Boot Menu should not dip into Windows registry hives, e.g. to load drivers or pull variables such as the colors to use for the boot menu, etc.

In fact, safest would be for pre-OS {bootmgr} code to use the lowest default screen resolution, rather than loading any 3rd-party "drivers" for a "better visual experience".  This is a similar safety issue as code integration into "safe modes" (e.g. screen savers).

Scenario 2

When a device driver is selected in Windows, e.g. by disabling or enabling a Display Adapter, Windows may also be changing drivers within firmware EFI.  If so, then a different EFI driver will load, depending on that Windows setting, and a buggy EFI display driver could cause the problem directly, rather than via using null data.

All this is hard to assess, as modern systems blur hardware, firmware, "BIOS", drivers and OSs.  Everything is now likely to contain non-trivial and thus buggy code, and everything is treated as a black-box object that may "leak".  The interface programming model is supposed to blacken the boxes of the object-orientated model, hiding the gooey details more effectively; instead of the "calling code" examining exposed variables (object Properties), it now asks the object to return these variables (object Methods), trutsing the object's code to do that - which is not a great safety/security idea.

03 April 2020

Win10 Bug: .evtx Files Rapidly Fills C: Free Space


This very nasty Windows 10 bug has been around for over two years at least; crippling, often associated with "Feature Updates", i.e. new versions of Windows 10, and still there from at least as far back as 1803, to current 1909.

Note that each of those hyperlinked words in the previous paragraph, is a link to a forum thread on this issue, so while it not be common enough "all at once" to attract attention and get fixed, it's always around, and always eating systems - no magic bullets, typical advice is a shrug and "just re-install Windows" or equally-hi-impact brute-force "fixes".

I suspect it's a generic category of bug within the Microsoft Store and UWP Apps subsystem, regardless of which of these Apps is the "cause" of the problem on any particular system. Never use Apps, Microsoft Store, or UWP stuff?  Too bad, that "updater" or "installer" will still flood your drive with pointless error messages and make it impossible to use your PC.

What you will see

The bug presents as an inexplicable runaway filling of free space on the C: drive, no matter how much free space you had there before.  Disk Cleanup doesn't show the bulk that needs to be cleared; Settings, Storage Sense may pop up and show the material as in "Temporary Files", yet not in any of the checkbox sub-categories offered to be cleared.

Users will then turn to Windows Directory Statistics (WDS) and/or TreeView or similar, and may get side-tracked into arguing which is better, etc.  I use WDS, and it will show a massive "Unknown" accounting for the lost storage space.  If I right-click WDS and "Run As Admin", I will then see this bulk as thousands of small files (between 68k and 20M) within %WinDir%\Temp

Most of these will be .evtx files, as "opened" by Event Logger; the rest will be .txt files, and these will be date-stamped as being spawned several times a minute, if not every few seconds, until the free space is exhausted.  Deleting these doesn't help; they will immediately start flooding again.

What appears to be cause


AppXSvc is a Windows service that "deploys UWP Apps"; I found little documentation of the service, but finds this Fortnet zero-day alert, FWIW.  Looking at...

Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\AppXSvc

...via Regedit, we see the following settings:

Start = 3, i.e. Manual
Type = 32 (0x20), i.e. can share address space with other services of the same type
ErrorControl = 1, i.e. warn but do not abort starting Windows

So, something else starts it all the time, as it's always running yet not set to start automatically.

Recovery actions, as seen via the Services UI (where everything is "greyed out"), appear reasonable...

1st failure: Restart the service
2nd failure: Restart the service
3rd and subsequent failures: Take no action

...so if this service repeatedly falls on its ass, it should stop running, limiting the impact to at most 2 sets of .evtx and related error logging files in %WinDir%\Temp.  So what's going wrong, here?

I suspect whatever is starting this wretched (and for most of us who only use "real" Windows preograms, totally useless) service isn't paying any attention to those Recovery actions, and is just endlessly banging away, restarting the service "Manually".  If each time the service considers itself to have been launched for the first time, it will always "Restart the service".

Also, in one of the two cases I've seen first-hand (manual Media Creation Tool upgrade to 1909 from inside Windows), I noticed odd behavior in the Services UI.  Specifically, the service Properties (as seen via Services UI) offered to Start the service, even though Ctl+Alt+Del Task Manager showed it to be still running.  If the service and/or managing code gets confused about whether it's running or not, that too may screw up the "FFS stop trying to start the &^$& thing, it's already failed 3 times" logic.

The other system I saw and managed via TeamViewer, was after an auto-upgrade to 1903.  On that system, setting the AppXSvc Start value to 4 (Disable) will hopefully kill the service, plus I wrote a brute-force batch file set to "Run As Admin" as follows:
@Echo Off
Set Secs=15
Set Mask=*.evtx
Echo.
Echo Deleting %WinDir%\Temp\%Mask% files every %Secs% seconds...
:LoopForever
    Echo.
    Del %WinDir%\Temp\%Mask%
    Echo.
    Timeout 15
GoTo LoopForever
None of this a proper fix, especially on an SSD where you don't want tends of thousands of pointless file writes every hour or few.  At the basic level, Microsoft needs to muzzle the UWP App subsystem so it doesn't stomp all over the system willy-nilly, and ensure that every logging process has a basic LIFO clue so as not to consume all available storage space.  A specific fix would be nice, too, but we also need a more respectful vendor-to-user relationship.

PS: What is it with HTML text editing (e.g. in Blogger) that messes up blank line spacing around subheadings, etc.?




21 August 2012

LibreOffice 3.6 “The Selected JRE Is Defective”

Having got past some initial installation hassles that required deleting my LibreOffice profile, I hit a problem with Java, while in Tools, Options.  Here’s how to test this if it happens to you; go to the MediaWiki section in Options…

If you have the problem, you will get this error dialog:

I “fixed” this by installing the 32-bit Java JRE 6 update 33, being the current most updated version of the fading Java 6 line.  It has to be 32-bit as LibreOffuce is a 32-bit application (and fair enough), and it has to be Java JRE 6 rather than 7, because for practical purposes, LibreOffice 3.6 doesn’t work with modern Java JRE 7.5

There’s a lot of “UI pressure” at the Oracle site to download and use JRE 7 rather than JRE 6, which I took to mean 7 is fairly mature and 6’s days are numbered, so I recently switched from the 6 update 31 I was using, to the current 7 update 5.

There’s also a lot of detail on LibreOffice 3.6 and Java JRE 7, claiming that the new Java is supported, why Oracle’s poor installation practices get in the way, and how one overcomes this.

Originally, the LibreOffice code base started as Star Office, which was acquired by Sun and user as a poster child for Java.  This continued with OpenOffice, but since the developers left after the Oracle takeover, the intention is to dump Java.  I’d be very glad if they did, because:

  • LibreaOffice already loads faster than OpenOffice after reducing Java
  • Java is edge-facing, frequently exploited and frequently updated
  • LibreOffice lags behind effective support for latest Java updates
  • Java installs tend to leave exploitable older versions in place

The last is a very old issue that still hasn’t gone away completely.

LibreOffice 3.6 “Unhandled Exception” Error

I’ve just upgraded from LibreOffice 3.5.2 to 3.6.0, and ran into two sets of problems; the one documented here, and issues with Java. 

I didn’t install over my old version as I usually do, because this is noted not to work in the release notes for 3.6…

For Windows users that have LibreOffice prior to version 3.4.5 installed, either uninstall that beforehand, or upgrade to 3.4.5. Otherwise, the upgrade to 3.6.0 may fail.

…and I couldn’t find 3.5.5 anywhere on the LibreOffice site.  Also recently released by LibreOffice is 3.5.6, but documentation is poor (many links go to 3.6, not 3.5.6) and it’s unclear as to whether this will install over 3.5.2 as 3.5.5 would do, as a version waypoint for those wanting an over-old path from < 3.5.5 to 3.6

So I uninstalled LibreOffice 3.5.2 from my Windows 7 64-bit SP1 PC with 64-bit Java JRE 7.5, then installed LibreOffice 3.6, but after an initial pause on first run, every attempt to launch LibreOffice failed with this “Unhandled exception: InvalidRegistryException” error…


…followed by this “Runtime Error! This application has requested the Runtime to terminate in an unusual way.” from the Microsoft Visual C++ Runtime Library:

Attempts to uninstall and re-install 3.5.6 or 3.6 again did not fix this issue, including after shutting down and restarting Windows.  Uninstalling the older co-installed OpenOffice (which worked fine with LibreOffice up to 3.5.2) did not make any difference, the same failure pattern remained.

I followed advice to delete my LibreOffice profile, i.e. the subtree within AppData\Roaming for LibreOffice, and that fixed the issue, which may have been linked to a language dictionary I’d added to Open Office.  I didn’t try a more refined fix (i.e. trying to isolate which part of the old profile was bad) as I didn’t need anything in the old profile; I did rename it away (while LibreOffice was completely closed, QuickStarter included) rather than delete it, in case I want to go deeper into this issue later.

Which let me get far enough to hit the Java problem (those who noted “Windows 7 64-bit with JRE 7.5 64-bit” may take a guess at the cause before reading my next post)

20 August 2012

Missed UAC Prompts May Silently Undo Installs

This is a more generic issue than what can go wrong with AVG installation, but not the usual user account rights issue.

Windows 7 makes UAC somewhat less obtrusive in various ways, which is generally welcome – but a side-effect can be to silently undo a software installation. 

What happens:

  • you start an installation
  • you aren’t prompted for admin permission
  • you leave the install process to run unattended
  • a UAC prompt pops up while you’re away
  • In Windows 7, this is now a discreet flashing item on Taskbar
  • the UAC alert is ignored, times out and assumes “no”
  • the installation is silently aborted
  • you think the installer completed OK
  • then you find your new software’s simply “not there”!

I notice this in particular with LibreOffice, where the expected UAC prompt only appears quite late in the installation process. A possible factor may be renaming the installation executable (e.g. from “Setup.exe” to “NameOfApp.exe”), as this may defeat Windows recognizing it as an installer requiring administrator rights, and thus prompting early for permission to continue.

LibreOffice is an object lesson in why Open Source may be more useful than just being free of charge.  When Oracle took over Sun and cut off the salaries of the Open Office development team, the code itself was beyond their reach – so the product could survive, as continued by the same coders working elsewhere.

One beneficial side-effect of leaving Sun, was a move away from Java, for which Open Office was something of a “poster child”.  LibreOffice is already faster to start up (even without the “quickstarter”) as a result.

AVG Vanishes After Cleanup and New Install

This is not the generic issues of user account permissions or missed UAC prompts; it’s something more specific to AVG’s installation tools.  Here’s what happens:

  • you uninstall AVG
  • you restart Windows if prompted to do so
  • you do some manual cleanup of AVG leftovers
  • you run AVG’s cleanup tool
  • you install AVG
  • AVG works fine
  • you shutdown and restart
  • on next Windows session, AVG has vanished

If you run the AVG cleanup tool after uninstalling AVG (and perhaps being prompted to restart Windows) just before installing AVG, then install AVG, you won’t have been prompted to restart Windows between the cleanup and the new install.  The cleanup works by seeding HKLM..RunOnce with an entry to uninstall AVG, which it does, the next time to shutdown and restart Windows – so it kills the new install you have just completed!

The bug may be that because the cleanup tool finds no active traces of AVG when it runs, it doesn’t see a need to prompt a restart of Windows.  It then exits, so is no longer there to note the new material added by the fresh AVG installation.

There also may be a bug in the fresh (in my case, offline installer for AVG Free 2012 32-bit downloaded 19 August 2012) installer, if that fails to look for and detect the RunOnce entry created by the cleanup tool.

I’m fairly sure of the mechanism of this issue, because while still in Windows after installing AVG anew, I spent some time in Regedit and noted the RunOnce entry there.  I’m also fairly sure this is not a malware effect, as the PC had not been online since formal scanning with a variety of antivirus rescue CD scanners (via Sardu) and other tools (via Bart).

However, a possible contributor may be the manual clean-up I did before running the cleanup tool and the new install.  This was in XP SP3, and my efforts were limited to deleting the AVG and MFAData subtrees in Documents and Settings, All Users, Application Data.  I did no registry cleanup (either manual or automated), nor did I clear other Documents and Settings or Program Files AVG locations (where leftovers are trivial compared to 100M or so for each of the two I deleted).  I did delete \$AVG from hard drive all volumes, and both old and new AVG installations were to a non-default path in C:\Program Files.

Also, before uninstalling AVG originally, I cleared Virus Vault and logs via the AVG UI, and during the uninstall thereafter, checked Yes to clear the Virus Vault, but not User Settings.  The latter are probably held in the small Application Data locations in the per-user subtrees, where I did not delete anything.  I also (heh, lot’s off “also”, all of which should be declared in case the bug hinges on them) deselect the “security toolbar”, opt out of sending info to AVG, delete unwanted desktop shortcuts and relocate Start Menu shortcuts to a different folder within the same All Users, Programs.

So, steps to avoid this issue:

  • shutdown and restart after running the AVG cleanup tool
  • check HKLM..RunOnce is clear
  • then do the fresh install of AVG
  • shutdown and restart Windows
  • check HKLM..RunOnce is clear
  • check AVG is present and running
  • re-check AVG is present and running after further startups

Some of the re-checking should be redundant, but I’m reluctant to turn my back on it again!

Perhaps the time has come to use Microsoft’s free antivirus instead.  I’m less keen on Avira (the Rescue CD is prone to false-positives) or Avast, but they’ll have their proponents too.  I’ve used and supported AVG for years, but am getting fed up with frequent large new versions, unwanted Do Not Track and “PC Tuneup” stuff (including the especially-unwanted “registry cleaner”) and the way recent versions push users into using these unwanted items.

04 October 2011

SkipRearm Setting for SysPrep Failure

Technorati Tags: ,

Here’s how it goes; you have an un-activated Vista or Windows 7 reference system ready for SysPrep and .WIM harvesting, but SysPrep fails.  You search, and find articles that mutter about adding a “SkipRearm” setting to an “answer file”, but get stuck there if you don’t know how to apply an answer file.

Fortunately, there’s a simpler fix that I found and tested for Windows 7, and it works.  For Vista (which I didn’t test)…

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurentVersion\SL\SkipRearm = 1

…and for Windows 7 (as tested OK):

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\SoftwareProtectionPlatform\SkipRearm = 1

The nice thing is, you don’t have to fiddle with “answer files”, or .WIM mounting and manipulation in WAIK.

This fits with the simplistic way I use .WIM imaging; I use only WinPE 3.0, ImageX, and the GimageX GUI wrapper for convenience.  My WinPE 3.0 is standard other than the addition of GimageX and ImageX, and a setting to prevent the WinPE boot from falling through to boot the hard drive if no key is pressed (sorry, no link for that).

When building a system, I partition via BING, format the prospective C: to NTFS via WinPE, then apply the .WIM, so I have a baseline installation that when booted, will resume Windows Setup as part of what SysPrep did prior to the creation of the .WIM image.  I do the first boot OFFline, and kill the duhfault setting to automatically activate Windows. 

Then I update and install free software to taste, until the new PC is generically fully set up.  I use BING to image the C: partition for safekeeping (in case SysPrep screws up), then run SysPrep and Generalize the new PC.  I then boot WinPE to capture C: as a new and updated .WIM, then I boot BING to restore the partition to the state before SysPrep was run.  At this point I can apply client-specific changes, activate Windows, and ship the new PC.

SysPrep does not maintain undoability, and tends to screw up.  When it does, you can be left with no bootable reference system and no usable new .WIM, so I again stress the need to image-backup C: before SysPrep.  If you’ve done that, you may prefer to restore that image rather than wade through and clean up after SysPrep’s effects.

Key safety

One of the things you want to avoid when working with what you hope to harvest as a reference .WIM, is inadvertently activating the build, especially with the wrong product key:

  • Disable the “automatically activate” setting
  • Keep new PC offline from build until first backup image of C:
  • Re-check “automatically activate” setting before going online
  • Do the “image backup, SysPrep, restore C:” sandwich
  • Check the current key before activating
  • Activate before shipping as new PC

When I tested SysPrep with SkipRearm, I did not enter a product key when prompted, and used Nirsoft’s Produkey tool to check the key.  This showed a key other than that of the client, so SysPrep had stripped that OK, and presumably fallen back to some previous or fake key.  When I restored the pre-SysPrep BING partition image as C:, this showed the expected client’s key, as I’d entered when originally starting the build from the previous .WIM

Final tip; if/as SkipRearm doesn’t reset the full grace period for activation, you may want to minimize the days spent between restoring the previous .WIM and capturing the next one.