Archive for 2006

Report-an-Apple-bug Friday! 14

Friday, March 24th, 2006

This bug is Symbols listed in File Manager Reference, not defined in header. It was filed on 2006-03-24 at 23:00 PST.


Summary:

The File Manager Reference contains 394 symbols that are not actually defined in any current header.

Steps to Reproduce:

  1. Open the File Manager Reference.
  2. Scroll.
  3. Scroll.
  4. Scroll.
  5. Scroll.

Expected Results:

No signature and file-type constants are ever encountered, because no such constants are defined in the headers.

Actual Results:

You eventually arrive at 394 file type and signature constants, listed in eight sections in the Constants section.

Regression:

This wasn’t a problem back when these constants were actually defined.

Notes:

I constructed a header file from the header excerpts shown in the docs. It is attached.


Technorati tags: , .

A musing

Friday, March 24th, 2006
Bad dream:
You have fallen out of a plane and are hurtling toward the ground.
Good dream:
You are skydiving.
Middle-of-the-road dream:
You are still on the plane.

Report-an-Apple-bug Friday! 13

Friday, March 24th, 2006

This bug is IPA support in Speech Synthesis Manager. It was filed on 2006-03-24 at 00:36 PST.


Summary:

Speech Synthesis Manager does not support IPA (International Phonetic Alphabet).

Steps to Reproduce:

  1. Call a function such as CreateIPAStringFromString, which converts natural-language text into IPA.
  2. Call a function such as SpeakIPAString, which speaks the text represented in IPA aloud.

Expected Results:

CreateIPAStringFromString returns a CFString containing the IPA version of the text.

SpeakIPAString parses the IPA text in the CFString passed in, and speaks it.

Actual Results:

The program fails to compile because Speech Synthesis Manager has no such functions.

Regression:

None known.

Notes:

IPA is a standard alphabet for representing pronunciation. It has its own block in Unicode, making CFString a natural fit. Thus, this report extends #4489914, “Speech Managers do not support Unicode” [see Apple bug Friday! 12 —the Bored Zo].

IPA used in this context would be a substitute for the phoneme syntax currently used in Speech Synthesis Manager (specifically, TextToPhonemes and SpeakBuffer).


At 04:11, I added the following:

I should clarify that I simply made up the names CreateIPAStringFromString and SpeakIPAString. I am not under a belief that those functions are supposed to already exist. I’m requesting functions that do those things, whatever they end up named.


Technorati tags: , .

Apple bug Friday! 12

Friday, March 24th, 2006

This bug is Speech Managers do not support Unicode. It was filed on 2006-03-23 at 23:07 PST.


Summary:

Neither the Speech Synthesis Manager nor the Speech Recognition Manager has support for Unicode text (CFStrings).

Steps to Reproduce:

  1. Attempt to speak Unicode text using Speech Synthesis Manager.
  2. Attempt to receive Unicode text from the Speech Recognition Manager.

Expected Results:

The Unicode text is successfully spoken, and speech from the user is successfully received as Unicode text.

Actual Results:

No results, because it is impossible to write such an application. Neither Manager supports Unicode.

Regression:

None known.

Notes:

Since Mac OS X now has CFStrings, the Speech Managers should at the very least support using these for input and output, even if actual parsing and recognition are limited to ASCII or MacRoman.

This could be extended in a future version of Mac OS X, with better support for other languages and accents using a broader range of the Unicode character set. Hard, I know — it would be a major feature, not a relatively-minor API enhancement like simply supporting CFStrings. CFString support is simply a first step in that direction.


Technorati tags: , , .

Report-an-Apple-bug Friday! 8 (follow-up)

Thursday, March 23rd, 2006

I got a follow-up to Report-an-Apple-Bug-Friday! 8. I’ve HTMLized it, but otherwise it is unchanged.

This is a follow-up to Bug ID# 4481916. We have received the following update regarding your report:

Ray SAMPSON:

Engineering has determined this issue behaves as intended based on the following information:

Please know, EV_EOF is not to be set for just reaching the current end of a regular file. Otherwise, you could never wait for more data to arrive.

The flag indicates that no more data will ever be present to read – as when the sending end of a socket is closed. The closest thing for a regular file is when the containing filesystem is force-unmounted (which is when EV_EOF will be set for a regular file).

I’m satisfied. I put the following comment on the bug:

I suggest that this information be added to the manpage for kqueue, that EV_EOF does not get returned for a regular file unless the device containing the file disappears (along with any other circumstances that would cause that).

Thanks for the information.

Technorati tags: , .

New Cocoa docs!

Tuesday, March 21st, 2006

The Cocoa documentation was completely redesigned this month. Class docs are now whole sections, rather than a single page each, and each such section now has the same look and feel as a Carbon Manager’s docs. Check it out:

My favorite feature of the new design is that the class names are no longer in two columns. The two-column design was theoretically a good idea, because it meant that the page was shorter (which would ordinarily mean less scrolling), but bad in practice because it means you have to look in both columns to find a class (especially if its name is near the middle of the alphabet, like the NSMutableFoo classes are — there were some of those in each column in the old design).

You can copy these docs to your own machine by going to Xcode’s Preferences, Documentation pane, and clicking “Check Now”.

Technorati tags: ,

Free stuff on iTunes: 2006-03-21

Tuesday, March 21st, 2006

Two videos, no songs (aside from the SOTW — there isn’t even a Discovery Download this week, though):

Technorati tags: iTunes, iTunes Music Store, iTMS, iTunes Video Store, iTVS, NCAA, Basketball.

Hosting

Sunday, March 19th, 2006

So most of you probably know that I’m in the market for real hosting. I’ve identified two companies (a host and a domain registrar) that look suitable for my patronage.

If anybody has a better suggestion for either (or both) roles, please post in the comments. I need at least 100+ MiB of space (with room to grow, so call it at least 200) with Python and PHP support (I want to give self-hosted WordPress a try, and run some of my own things which will be written in Python).

Definitely do not recommend DreamHost. I’ve given up trying to get them to change their TOS.

UPDATE 2006-08-26 21:10 PDT: And it’s done. The blog is now on TextDrive+Active-Domain. ☺

Technorati tags: .

Report-an-Apple-bug Friday! 11

Friday, March 17th, 2006

This bug is -[NSMenu menuBarHeight] always returns 0.0f. It was filed on 2006-03-17 at 23:55.

UPDATE 2006-03-25: Uploaded test app to GeoCities.


Summary:

NSMenu‘s -menuBarHeight method always returns 0.0f. Even the main menu’s.

Steps to Reproduce:

  1. Call [[NSApp mainMenu] menuBarHeight].

Expected Results:

The method returns 22.0f.

Actual Results:

The method returns 0.0f.

Regression:

None known.

Notes:

Appearance Manager (in the form of the GetThemeMenuBarHeight function) and NSMenuView (in its +menuBarHeight method) both return 22.0f, the correct height of the menu bar under Tiger.

The documentation for +[NSMenuView menuBarHeight] recommends using -[NSMenu menuBarHeight] instead.

This method is superseded in Mac OS X v10.4 by the NSMenu menuBarHeight instance method.

Following this advice would break one’s app on 10.4.3 through 10.4.5 (the bug exists on 10.4.5 as well).

The bug works with any menu — the main menu isn’t the only one. It’s just the most obvious menu to call that method on.

Workarounds:

Use GetThemeMenuBarHeight or +[NSMenuView menuBarHeight].


Technorati tags: , .

Report-an-Apple-bug Friday! 10

Friday, March 17th, 2006

This bug is iTunes should have a “Free Downloads” section on other front pages. It was filed on 2006-03-17 at 21:19.


Summary:

iTunes Video Store front pages don’t have a “Free Downloads” section like the Music Store’s does.

Steps to Reproduce:

  1. Launch iTunes.
  2. If the Music Store source is not already selected, select it.
  3. Click on Movie Trailers, Music Videos, or TV Shows.
  4. Click on the background inside the Music Store view (to the right of the source list).
  5. Hit End.

Expected Results:

You see a “Free Downloads” section in the bottom-left corner.

Actual Results:

You don’t see a “Free Downloads” section in the bottom-left corner.

Regression:

None known.

Notes:

The Video Store (especially the TV Shows section) has had a number of free downloads lately, such as the free pilot and feelies for Conviction and the free “This is SportsCenter” commercials. There is no centralized place on any Video Store front pages where people can easily find these free downloads. One must look at all the values for the rotating poster views at the top of the page, and the non-rotating poster views in the middle of the page (below the first middle row).


And yes, this feature request does go toward making it easier for me to compile the “Free Stuff on iTunes” posts. ;)

Technorati tags: , , , , , , .

Report-an-Apple-bug Friday! 9

Friday, March 17th, 2006

This bug is Terminal should support xterm‘s 256-color mode. It was filed on 2006-03-17 at 20:44.


Summary:

xterm has a 256-color mode. Terminal should support it.

Steps to Reproduce:

  1. Launch Terminal.
  2. Run 256colors2.pl from the above website.

Expected Results:

Lots of pretty colors.

Actual Results:

Lots of backslashes and 16 pretty colors.

Regression:

None known.

Notes:

Some applications, including vim, look for TERM to be set to xterm-256color. Therefore, Terminal’s default should be changed to this if 256-color support is added.


Technorati tags: , .

How to eject a CD

Friday, March 17th, 2006

I posted this to IOMUG‘s mailing list on 2004-04-05. I’ve HTMLized it, added Unicode, and added Tiger info.


Here are all the ways to do it using Apple software (the OS and the programs that come with it). Note that all the same methods work for DVDs as well, so, if you have a DVD drive, you can read “CD/DVD” wherever you see “CD”. Unless otherwise noted, these all take place in Finder.

These require a CD in the drive.

  • Hold down the mouse button at startup.
  • Select the volume and press ⌘E, or choose Eject from the File or Special menu.
  • Drag the volume to the Trash (on Mac OS X, the Trash icon will change to an ⏏ icon).
  • Mac OS only: Select the volume and press ⌘Y, or choose Put Away from the File menu. This is the only way to unmount a server in Mac OS.
  • Mac OS 7.5 and later only: In the Control Strip, choose Eject from the Audio CD module (the one with a CD icon).
  • Mac OS 8 and later only: Right-click on the volume and click Eject.
  • Mac OS X only: Select the volume and click the ⏏/Eject button on the toolbar.
  • Panther only: Select the volume and click the ⏏ button in the sidebar. (Works in Navigation Services dialogs, too.)
  • Mac OS X only: From Disk Utility, select the volume and click the ⏏/Eject button on the toolbar.
  • Mac OS X only: From Disk Utility, select the volume and choose “Eject” from the File menu.
  • Mac OS X only: Press the Eject key on the keyboard. (Thanks, Andrew Wellington! Added 2006-03-18.)
  • Old Mac OS X only: From Terminal, type “disktool -e device”. (Thanks to Sören Nils “chucker” Kuklau for telling me about this one.)
  • Mac OS X only: From Terminal, type “diskutil eject device”. device is one of /dev/diskN”, “diskN”, or “/Volumes/Name”. Use diskutil list to determine an appropriate value of N. (Thanks to Graham Booker for reminding me of diskutil.)

These do not require a CD in the drive if you have a tray-loading drive. In this case, the tray will open so you can put in a CD.

  • From Open Firmware, type “eject cd”. (Note: you can’t substitute “dvd” here. It must be “eject cd”, even if you have a DVD drive.)
  • Burners only: from Terminal, type “drutil tray eject -drive N”, where N is the number of your drive. You can use “drutil list” to determine the value of N.
  • Burners only: from Terminal, type “drutil eject -drive N”.
  • Press F12, or on *Books, press fn-F12. On Mac OS 9, you may need to add the ⌥ key, depending on your keyboard settings.
  • Mac OS X only: with the Eject MenuExtra enabled, choose “Eject ‘Volume Name’” or “Open/Close CD-ROM Drive” from the ⏏ menu.
  • In iTunes, click ⏏ on the iTunes window.
  • In iTunes, choose “Eject Disc” from the Controls menu.
  • In DVD Player, click ⏏ on the controller.
  • In DVD Player, choose “Eject” from the Controls menu. (May vary by version. What I said is true of 4.0, i.e. Panther’s DVD Player, and 4.6, i.e. Tiger’s DVD Player.)

* Mac OS is the OS before Mac OS X. The latest version of Mac OS is 9.2.2.

** You can enable this MenuExtra by opening /System/Library/CoreServices/Menu Extras/Eject.menu.

Troy Stephens is cool

Friday, March 17th, 2006

I emailed him early this morning about the fact that I wasn’t credited on the 0.9 release, which incorporates my patch. He has fixed the IconFamily webpage and will add me to the ReadMe for 0.9.2.

And when 0.9.2 comes out, I’ll check it into Adium, killing three of its deprecation warnings. Sweet! (I never applied my patch in Adium because my preference was for it to be applied in the master IconFamily source, and now it has been.)

Technorati tags: .

Report-an-Apple-bug Friday! 8

Friday, March 17th, 2006

This bug is kevent does not return EV_EOF when an open regular file reaches EOF. It was filed on 2006-03-17 at 02:27.


Summary:

EVFILT_READ on a regular file never returns an event with the EV_EOF flag set.

Steps to Reproduce:

  1. Create a kqueue.
  2. Open a file for reading.
  3. Add a kevent description to the queue from step 1 with EVFILT_READ and the fd from step 2.
  4. Read until the end of file.
  5. Call kevent.

Expected Results:

The data member of the returned kevent structure has the EV_EOF bit set.

Actual Results:

The data member of the returned kevent structure never has the EV_EOF bit set, so if your app is expecting it, it keeps on polling forever and never closes the file.

Regression:

None known.

Notes:

I also tried calling read and kevent one more time (testing for feof behavior), but still did not get EV_EOF.

A test case is included.


(Note: GeoCities is being cranky today. The test case will be up eventually.)

Technorati tags: , .

Report-an-Apple-bug Friday! 7

Friday, March 17th, 2006

So much for filing these earlier in the week. I spent the whole week pounding on the test cases.

This bug is kevent read events’ .data is random when st_size > ULONG_MAX. It was filed on 2006-03-17 at 01:55.


Summary:

When the size of a regular file exceeds ULONG_MAX, the value of the event’s data member can be truncated.

Steps to Reproduce:

  1. Create a kqueue.
  2. Open a file for reading.
  3. Add a kevent description to the queue from step 1 with EVFILT_READ and the fd from step 2.
  4. Poll the queue for events.

Expected Results:

The data member of the returned kevent structure, indicating the amount of data between the file’s current position and the end of file, is capped to ULONG_MAX to work around truncation issues.

Actual Results:

The data member of the returned kevent structure, indicating the naked size of the file, may be truncated or appear negative.

Regression:

None known.

Notes:

The st_size member of struct stat is an off_t (a long long), which is 8 bytes. The data member of struct kevent is an intptr_t (a long), which is 4 bytes.

kevent appears to simply assign the .st_size value directly to event.data in all read events. This produces the exhibited effect: only the low 4 bytes are copied; the high 4 bytes are thrown away. If the .st_size value exceeds ULONG_MAX, then the resulting 4-byte value would appear random if you didn’t know what was going on.

The other problem is that, unless I’m wrong about what a ‘vnode’ is, this behavior does not match the manpage’s description:

EVFILT_READ

Takes a file descriptor as the identifier, and returns whenever there is data available to read. The behavior of the filter is slightly different depending on the descriptor type.

Vnodes
Returns when the file pointer is not at the end of file. data contains the offset from current position to end of file, and may be negative.

.data only contains the offset to the end of file when the open file’s position is at the start of the file, since at that time, that value is equal to the length of the file.

.data should always contain the offset, unless that value exceeds ULONG_MAX, in which case it should be ULONG_MAX (that is to say, .data should be capped to ULONG_MAX).

Workarounds:

  • Don’t use kevent.
  • Ignore event.data and only use results from fstat/read/fread.
  • Use mmap.

A test case is included.


(Note: GeoCities is being cranky today. The test case will be up eventually.)

UPDATE 2007-08-02: I’ve updated the test case to fix a bug. Here’s kevent-read-bug r2.


Technorati tags: ,

About my grammar

Friday, March 17th, 2006

Most of you are used to me not capitalizing the first letter of sentences. I’ll still be this way on IRC, at least for a little while longer, but you should get used to seeing me capitalize. I’ve been doing this in the past couple days with my replies to emails sent to the Adium feedback list, and starting today I’ll be doing it with other emails and blog posts too. I’ll be doing it with everything eventually.

You know, I actually used to capitalize when I started on the internet. Guess I got lazy. Funny how things come full circle, huh?

Free stuff on iTunes: 2006-03-14 (part 2)

Tuesday, March 14th, 2006

I don’t remember this being up before, and it’s enough extra stuff that I think it merits an extra post. iTVS now has SportsCenter ads. they are 15 and 30 seconds, they are free, and they are not on the front page of iTMS.

there are apparently other commercials at the ESPN website. if you want more, you’ll have to go there.

Technorati tags: , , , , , , .

Multi-pass implementation no longer sucks

Tuesday, March 14th, 2006

multi-pass notification emails are clearer now about how you would go about getting the new episodes that are waiting for you. this is what they used to say:

The latest episode of The Daily Show is now available for you to download. Simply sign in to iTunes and it will begin downloading immediately.

… which, as I said before, is not the whole story. if you stay signed in all the time, like I do, you must sign out first.

then patr1ck suggested (in the comments on that post) that I try the “Check for Purchases” menu item in iTunes. that worked, and now Apple backs the same suggestion:

The latest episode of The Daily Show is now available for you to download. Click here and it will begin downloading immediately. You can also select ‘Get Purchases’ from the Advanced menu of iTunes.

the link, interestingly enough, appears to be equivalent to the “Check for Purchases” menu item. I get the idea that every feature of iTMS, even those features that don’t appear in the iTunes window, can be expressed as some kind of URL.

and yes, the email gives the name of the menu item inaccurately, but it’s a huge step up from where they were.

UPDATE 2006-03-16: they fixed it. it says “Check for Purchases…”, which is close enough. the actual title is “Check for Purchases…”, with the Unicode HORIZONTAL ELLIPSIS character instead of three FULL STOPs. (that’s the correct way to write a menu item title, BTW, and it has been since the HIG were first written in 1984.)

Technorati tags: , , , , .

Free stuff on iTunes: 2006-03-14

Tuesday, March 14th, 2006

nothing was up initially, but there’s now one free item on iTMS that’s not listed on the front page. as usual, it’s a video: NASCAR Daytona 500 Preview.

Technorati tags: iTunes, iTunes Music Store, iTMS, iTunes Video Store, iTVS.

Season pass (or not)

Tuesday, March 14th, 2006

iTunes added “season passes”. it’s mentioned on the iTVS page, as well as on the front page of the TV Shows section.

Screenshot of the top-right corner of the iTVS front page, showing a poster link to the NASCAR section, with the caption “Season Pass Just Added”.

ah, but it doesn’t work. there are two three episodes there, and they total $4. the price of a season is $25. not much of a discount, hm?

Technorati tags: iTunes, iTunes Music Store, iTMS, iTunes Video Store, iTVS.