[Bug] Missing Item 5-15 second Delay on Mac
Hi,
First off, I am submitting this bug to PhaseOne, but wanted to post what I have discovered so that others may help debug it further to aid PhaseOne and Apple in squashing this nasty multi-year-old bug. If you can test this under Leopard, or even on Snow Leopard again, it would greatly help.
Background and Bug Description
I think I first started noticing the 10-15 second delays under Leopard, but it may be only under Snow Leopard. When a catalog is opened that contains missing originals for any media items (i.e. a catalog of files on removable media, like a DVD) it can take up to 15 seconds before it actually opens (longer on older Mac hardware), or when navigating to a media item with a missing original. What appears to be happening is some type of file system search timeout while Media Pro (and other older, previously Carbon apps) looks for a possibly-mounted drive that contains the file in question. Once the catalog is open and you move within it between thumbnails you get more spinning-beachball timeouts. Worse is if you do a Find Missing Items... command and there are many missing items in your catalog; that could take 10s of minutes to execute! The bug basically makes EM2/MP1 useless unless your catalogs always contain media items whose originals are available on the attached file systems.
I tried about 8 times over the past year or so to find the cause of this bug and now, finally, can directly reproduce it on a clean system and user (though I still don't know exactly what's causing the file system search timeout).
REPRODUCING THE BUG
Basically (I'm kinda guessing here), when some other software does an Apple Event, like opening/reading a file, on the filesystem, the file system, or some OS daemon used for searching the file system, becomes messed up enough to affect older software (MP and Synchronize Pro X on my work Mac) that may be using Apple Events or older libraries to search the file system, compared to newer, strictly Cocoa apps. Before the other software causes this problem, MP runs fine, with or without missing file system items. After the problem occurs, I have not found a way to undo it, except for a restart of the Mac.
Here is an archive of a test catalog of items that I'm pretty sure no one has available on their file system (you can of course make your own test catalog with missing items) and a simple AppleScript that tells Apple's System Events.app to read the standard plist for general system configuration:
To test for the bug I recommend the following steps (tested under Snow Leopard 10.6.8, latest):
Create a new test administrator account (so MediaPro stays registered, as there are problems with standard users under multi-user systems and MP registration). Using any pre-existing accounts may introduce more unknown variables to the test.
Safe Mode boot the system (hold shift key on startup, takes some time to boot) to ensure the system isn't loading any third-party system drivers, etc.
Log into the new test administrator and unzip the test files on the Desktop. Open the MP test catalog that contains 4 media items with missing originals by double-clicking. The catalog should open quickly (after splash screen) and work just fine while moving between thumbnails and when changing focus to the Finder and coming back to MP and working with the media item thumbnails again.
Quit MP before continuing.
Double-click the simple AppleScript, opening it in AppleScript Editor (or your AS editor of choice), then compile and run the script. Nothing will happen, as the script just reads the basic System Config and assigns it to a variable:
Now reopen the test catalog into MP. You should see a 5-15 second timeout before it will open. This is the bug. Once open, the catalog may act OK for a while moving between thumbnails, but freeze up occasionally again. If you move focus to another app, like the Finder, then come back to MP, the next click or arrow key to another item will cause the freeze again. There is no fixing it until you restart.
However, if you were to log into another user (who doesn't have a login script or app that causes the problem upon login), MP will work fine with the test catalog. But, after running the test AppleScript (simulating an Apple Event file open/read command), MP will start freezing again. Logging out, then back in will not remedy, nor will logging back into the previously logged-into test administrator, only a restart of the OS will fix MP.
WHAT CAN BE DONE?
PhaseOne can possibly code MP to use a different method of searching for missing originals (which occurs a lot while using the program). Maybe when they completely move the app to Cocoa libraries this bug will disappear.
As a workaround, identify third-party apps that might cause this behavior in MP as programs to replace with different software, or to avoid, like the System Events.app scripting of file reads (GUI scripting with System Events.app seems to not trigger the problem, btw). There may be many older AppleScript Studio applications out there that use the same Apple Event for reading preference files, and you will not know it until you launch the program and notice MP doesn't work right with missing items. I fear that any app that uses Apple Events for reading files may cause the problem, though that is untested at this time.
Please take the time to help squash this bug. Thanks.
Larry
First off, I am submitting this bug to PhaseOne, but wanted to post what I have discovered so that others may help debug it further to aid PhaseOne and Apple in squashing this nasty multi-year-old bug. If you can test this under Leopard, or even on Snow Leopard again, it would greatly help.
Background and Bug Description
I think I first started noticing the 10-15 second delays under Leopard, but it may be only under Snow Leopard. When a catalog is opened that contains missing originals for any media items (i.e. a catalog of files on removable media, like a DVD) it can take up to 15 seconds before it actually opens (longer on older Mac hardware), or when navigating to a media item with a missing original. What appears to be happening is some type of file system search timeout while Media Pro (and other older, previously Carbon apps) looks for a possibly-mounted drive that contains the file in question. Once the catalog is open and you move within it between thumbnails you get more spinning-beachball timeouts. Worse is if you do a Find Missing Items... command and there are many missing items in your catalog; that could take 10s of minutes to execute! The bug basically makes EM2/MP1 useless unless your catalogs always contain media items whose originals are available on the attached file systems.
I tried about 8 times over the past year or so to find the cause of this bug and now, finally, can directly reproduce it on a clean system and user (though I still don't know exactly what's causing the file system search timeout).
REPRODUCING THE BUG
Basically (I'm kinda guessing here), when some other software does an Apple Event, like opening/reading a file, on the filesystem, the file system, or some OS daemon used for searching the file system, becomes messed up enough to affect older software (MP and Synchronize Pro X on my work Mac) that may be using Apple Events or older libraries to search the file system, compared to newer, strictly Cocoa apps. Before the other software causes this problem, MP runs fine, with or without missing file system items. After the problem occurs, I have not found a way to undo it, except for a restart of the Mac.
Here is an archive of a test catalog of items that I'm pretty sure no one has available on their file system (you can of course make your own test catalog with missing items) and a simple AppleScript that tells Apple's System Events.app to read the standard plist for general system configuration:
To test for the bug I recommend the following steps (tested under Snow Leopard 10.6.8, latest):
Create a new test administrator account (so MediaPro stays registered, as there are problems with standard users under multi-user systems and MP registration). Using any pre-existing accounts may introduce more unknown variables to the test.
Safe Mode boot the system (hold shift key on startup, takes some time to boot) to ensure the system isn't loading any third-party system drivers, etc.
Log into the new test administrator and unzip the test files on the Desktop. Open the MP test catalog that contains 4 media items with missing originals by double-clicking. The catalog should open quickly (after splash screen) and work just fine while moving between thumbnails and when changing focus to the Finder and coming back to MP and working with the media item thumbnails again.
Quit MP before continuing.
Double-click the simple AppleScript, opening it in AppleScript Editor (or your AS editor of choice), then compile and run the script. Nothing will happen, as the script just reads the basic System Config and assigns it to a variable:
tell application "System Events"
try
tell property list file "/Library/Preferences/SystemConfiguration/preferences.plist"
set plistContents to contents
end tell
end try
end tellNow reopen the test catalog into MP. You should see a 5-15 second timeout before it will open. This is the bug. Once open, the catalog may act OK for a while moving between thumbnails, but freeze up occasionally again. If you move focus to another app, like the Finder, then come back to MP, the next click or arrow key to another item will cause the freeze again. There is no fixing it until you restart.
However, if you were to log into another user (who doesn't have a login script or app that causes the problem upon login), MP will work fine with the test catalog. But, after running the test AppleScript (simulating an Apple Event file open/read command), MP will start freezing again. Logging out, then back in will not remedy, nor will logging back into the previously logged-into test administrator, only a restart of the OS will fix MP.
WHAT CAN BE DONE?
PhaseOne can possibly code MP to use a different method of searching for missing originals (which occurs a lot while using the program). Maybe when they completely move the app to Cocoa libraries this bug will disappear.
As a workaround, identify third-party apps that might cause this behavior in MP as programs to replace with different software, or to avoid, like the System Events.app scripting of file reads (GUI scripting with System Events.app seems to not trigger the problem, btw). There may be many older AppleScript Studio applications out there that use the same Apple Event for reading preference files, and you will not know it until you launch the program and notice MP doesn't work right with missing items. I fear that any app that uses Apple Events for reading files may cause the problem, though that is untested at this time.
Please take the time to help squash this bug. Thanks.
Larry
0
Post ist für Kommentare geschlossen.
Kommentare
0 Kommentare