Skip to content

Get Mactracker for macOS (Xojo) to its main window - #460

Merged
colemancda merged 3 commits into
masterfrom
mactracker-gaps
Nov 25, 2026
Merged

colemancda merged 3 commits into
masterfrom
mactracker-gaps

Conversation

@colemancda

Copy link
Copy Markdown
Member

Follows #452. Mactracker 8.3.2 for macOS (a Xojo app, x86_64).

  • libunwind (Sources/PerrySystem/unwind.c, x86_64): unw_getcontext, unw_init_local, unw_step, unw_get_reg, following the frame-pointer chain. Xojo walks its own stack with them. Only IP, SP and RBP are reported; other registers give UNW_EBADREG.
  • UpgradeScriptInfoToTextEncoding: a Mac script code (0–32) is its encoding; "don't care" is Mac OS Roman. Language, region and font are ignored.
  • Text Encoding Converter speed: CoreFoundation's functions are looked up once and kept. A lookup by name on every conversion made Mactracker's database load take minutes.
  • CFStringCreateWithSubstring: clamps the range to the string instead of trapping. At start-up Xojo formats 16:40:50 UTC and searches for "11" and "40" to find the hour and minute; in UTC there's no "11", so it passes a range at -1. Release CoreFoundation doesn't check.

Testing

On the HP laptop (Debian 13 container, x86_64):

  • With the first three changes, Mactracker loads its database, creates its main window (703×515) and its Xojo views, then traps in CFStringCreateWithSubstring.
  • A build with the substring change and a two-minute run are in progress.

Still logged as missing (continued past): removeAllToolTips, setAlignment:range:, +[NSWindow windowNumbersWithOptions:], setAutorecalculatesKeyViewLoop:, disableSnapshotRestoration, setArrowsPosition:, NSBitsPerPixelFromDepth.

Xojo apps walk their own stack with unw_getcontext, unw_init_local,
unw_step and unw_get_reg.
…ons once

Programs convert text a piece at a time, many thousands of times; looking
each function up by name every call made Mactracker's database load crawl.
CoreFoundation doesn't check it in release builds, and Xojo passes one
from a search that found nothing (location -1).
@colemancda
colemancda merged commit aef0fe8 into master Nov 25, 2026
2 of 6 checks passed
@colemancda
colemancda deleted the mactracker-gaps branch November 25, 2026 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant