Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Command timeout, abortPipe causes crash



Fernando,

I'm still pursuing my timeout problem. The documentation for DeviceRequestTO does not indicate that it returns an error if it the operation times out. Is there a specific error message returned in this case?

Also, if you use DeviceRequestAsyncTO, then how do you find if an error occurred on the operation?

Currently, my code is calling DeviceRequest from a pthread that is spawned each time it is called.

After DeviceRequest completes, the calling thread clears a busy a flag so the main process knows it is done. For some reason this flag is getting set or not getting cleared properly. The main thread is responsible for setting the busy flag and starting a new thread that calls DeviceRequest and the thread that calls DeviceRequest only clears this flag just before is completes and the thread expires. This should be safe. The flag is always checked to make sure it is cleared before a new thread which calls DeviceRequest is issued by the main thread, so I don't believe my code is nesting DeviceRequest calls.

But for some strange reason after about 12 feet of film is output by the hardware, the busy flag doesn't get cleared or it gets set by a gremlin. Console syslog messages appear to indicate that the call to DeviceRequest in the thread completed and the flag was cleared.

Is there anything wrong with the concept of repeatedly calling DeviceRequest from a newly spawned pthread, letting that thread expire after the call and repeating it continuously?

Also, I am seeing some strange things when I use GDB within ProjectBuilder to place a hardware watchpoint on the busy flag. It indicates the busy flag is changing value in the plugin main routine in a place where the code has nothing to do with it. How robust is the GDB watch command.

Thanks for the earlier tip on installing the proper debug libraries.

Paul
_______________________________________________
usb mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/usb
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Command timeout, abortPipe causes crash (From: Fernando Urbina <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.