You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've attached a rez file containing the definition of a FONT resource, as decompiled by MPW's DeRez. If I try to compile it with Retro68's version of Rez and give it the correct header search paths so that it can find SysTypes.r from Apple Universal Interfaces 3.4, then it'll get stuck and run indefinitely.
(Luckily it's not hard to work around since if I don't include SysTypes.r when running DeRez it'll export the FONT as just binary data, which compiles fine.)
Diagnosis: Rez miscalculates an array size and starts meditating about a gigabyte-sized FONT resource. Some unoptimized code that was never intended to deal with more than a few megabytes follows, so it seems stuck.
The reason for miscalculating it is that the array size is calculated from reading back parts of the already-written output, which the architecture I came up with for my Rez 10 years ago doesn't really support. At the very least, I'll have to rearrange some things in the code, so this will not be a quick fix.
Currently, Rez runs as in two passes; the first pass is supposed to lay things out and generate an intial version of the resource; the second pass then fills in things that depend on the first pass, such as $$CountOf, $$Word, $$Bitfield. This works nicely for the more common pattern where some integer in the resource is defined to be an array count or an offset, but it fails horribly for the FONT resource, where an array size is calculated in a non-trivial way.
I've attached a rez file containing the definition of a FONT resource, as decompiled by MPW's DeRez. If I try to compile it with Retro68's version of Rez and give it the correct header search paths so that it can find
SysTypes.r
from Apple Universal Interfaces 3.4, then it'll get stuck and run indefinitely.(Luckily it's not hard to work around since if I don't include SysTypes.r when running DeRez it'll export the FONT as just binary data, which compiles fine.)
test.r.txt
The text was updated successfully, but these errors were encountered: