View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0012450CMake(No Category)public2011-09-09 08:032012-02-06 06:07
ReporterDruon 
Assigned ToDavid Cole 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionno change required 
PlatformOSOS Version
Product VersionCMake 2.8.5 
Target VersionCMake 2.8.6Fixed in VersionCMake 2.8.6 
Summary0012450: Xcode generator: removing dependency in Xcode crashes Xcode
DescriptionUsing a CMake-generated Xcode project file, it's not possible to remove a dependency without crashing Xcode. I'm not sure if this is a "supported operation", but I came across it by accident while investigating a dependency issue.
Steps To ReproduceUse the following CMakeLists.txt file with empty bar.c and foo.c. Generate an Xcode project then try to remove dependency 'bar' from the 'foo' target in Xcode.

cmake_minimum_required(VERSION 2.8)
add_library(bar bar.c)
add_executable(foo foo.c)
target_link_libraries(foo bar)
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0027397)
Druon (reporter)
2011-09-09 08:09

Some additional info:

In Xcode 4 the crash is immediately after removing the dependency.
In Xcode 3 the crash happens when closing Xcode after removing the dependency.

I'd like to add that the problem does not happen when removing dependencies that were added from within Xcode.
(0027399)
Druon (reporter)
2011-09-09 09:58

After discovering the existence of XCODE_DEPEND_HELPER, I'm now guessing that tinkering with dependencies in Xcode just isn't a good idea in general. ;)
(0027405)
David Cole (manager)
2011-09-12 10:28

Does this still happen with the latest release candidate of CMake 2.8.6? (rc3 from last Friday...?)

How do you "remove the dependency" in the Xcode 4 gui? I'm not sure I understand what you're doing to accomplish that... (The only sign of a dependency that I can see is that the library is named in the "Other Linker Flags" setting of the exe... Are you removing it from there to get this crash?)

The "Simple" project in the CMake test suite is basically equivalent to your example here, except the exe is named "Simple" and the lib is named "simpleLib"

As you say, there shouldn't be a need to tinker with dependencies in Xcode, but if you do, it probably shouldn't crash. I'm not sure what CMake is generating that causes this crash, but it's possible we could fix this by analyzing what's happening and generating different, but equivalent projects that do not cause the crash.

Or perhaps this is just a bug in Xcode, only exposed by CMake-generated projects, and you'll have to take it up with Apple for a fix in Xcode.
(0027406)
David Cole (manager)
2011-09-12 10:41

Never mind on trying rc3. I think I am reproducing what you're seeing here. And it's with the very latest 'next', so it will also happen with rc3.

In the project navigator view in Xcode 4, after clicking on "Simple", I looked at the "Build Phases" tab, and expanded the Target Dependencies. Then I clicked on "simpleLib" and hit the delete key, and got a dialog saying Xcode was in an inconsistent internal state. It gave me options, though: to crash, to continue anyway, or to "show details" and get call stack info.

If I choose "continue" things seem to still be fine, although, now that the dependency is missing until I re-run CMake again, things may not build in the correct order.

Is there a reason you need to remove a dependency in Xcode after CMake is done generating the project files...?
(0027407)
Druon (reporter)
2011-09-12 12:14

I came across this by accident while investigating the problem I reported in 0012451. Even though I don't normally remove dependencies, I thought I'd report it anyway. As far as I'm concerned this bug report can be closed.
(0027408)
David Cole (manager)
2011-09-12 12:44

This is an unexpected use case to say the least... If there is a bug here, I'm thinking it's a bug in Xcode for Apple to investigate. If we should change the generation of the Xcode project files in some specific way to remedy this, then please feel free to re-open this issue and attach details on what sort of changes those would be...
(0028498)
David Cole (manager)
2012-02-06 06:07

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2011-09-09 08:03 Druon New Issue
2011-09-09 08:09 Druon Note Added: 0027397
2011-09-09 09:58 Druon Note Added: 0027399
2011-09-12 10:28 David Cole Note Added: 0027405
2011-09-12 10:41 David Cole Note Added: 0027406
2011-09-12 12:14 Druon Note Added: 0027407
2011-09-12 12:42 David Cole Assigned To => David Cole
2011-09-12 12:42 David Cole Status new => assigned
2011-09-12 12:42 David Cole Target Version => CMake 2.8.6
2011-09-12 12:44 David Cole Note Added: 0027408
2011-09-12 12:44 David Cole Status assigned => resolved
2011-09-12 12:44 David Cole Fixed in Version => CMake 2.8.6
2011-09-12 12:44 David Cole Resolution open => no change required
2012-02-06 06:07 David Cole Note Added: 0028498
2012-02-06 06:07 David Cole Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team