Xcode 10: ASSERTION FAILURE in DVTFilePath.m

Originator:rsfinn
Number:rdar://44914907 Date Originated:2018-10-01
Status:Duplicate/42425247 (Closed) Resolved:2018-10-08
Product:Xcode Product Version:10.0 (10A255)
Classification:Crash Reproducible:Always
 
I have discovered a repeatable assertion failure in Xcode 10. I am bringing an older project up to compatibility with the C++ compilers in Xcode 10; the project contains references to symbols defined in <unistd.h> (e.g. "assert", "F_OK", "gid_t") that compiled with legacy project settings (references to libstdc++ et al.).

When attempting to add an include directive for unistd.h using autocompletion, the Xcode IDE crashes with an assertion failure that references the source file DVTFilePath.m.  Although I cannot include the project due to its proprietary nature, I hope that the attached information will allow you to find and fix the issue. (In the crash logs, the identifier "DeviceControlSDK" is the name of the project in which the edits are being applied.)

Steps to Reproduce:
1. Open a C++ source file that has failed to compile due to a reference to a symbol such as "gid_t" that is declared in <unistd.h>.
2. Place the insertion point adjacent to a previous #include directive.
3. Type "#include" and allow the autocomplete menu to appear.
4. Choose the option "#include <header>".
5. Begin to type the header file name "unistd.h".

Expected Results:
The IDE allows the header file <unistd.h> to be entered.

Actual Results:
After typing between one and three characters, the Xcode IDE crashes with the error:
ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/DVTFrameworks/DVTFrameworks-14317.18/DVTFoundation/FilePaths/DVTFilePath.m:908

Version/Build:
Xcode Version 10.0 (10A255)

Comments

Appears to be fixed in Xcode 10.1; original report closed

I cannot reproduce the crash in Xcode 10.1. Apple has indicated that the original repot (42425427) has been closed as well.


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!