Am I missing something in Xcode 4.4? How can I help?

200 views
Skip to first unread message

mhooge

unread,
Jul 26, 2012, 1:43:32 PM7/26/12
to coverstor...@googlegroups.com
I've been using CoverStory for a while with Xcode logic tests and application tests quite happily until Mtn. Lion and Xcode 4.4. Now CoverStory displays a page full of /*EOF*/. I've tried using lcov and genhtml and they product output, but the executed lines are offset, and I'm not getting reliable results. What can I do to help diagnose and solve the issue, or is it simply a configuration issue on my part? Any ideas?

Cheers,

Matt

Thomas Van Lenten

unread,
Jul 26, 2012, 1:45:47 PM7/26/12
to coverstor...@googlegroups.com
On Thu, Jul 26, 2012 at 1:43 PM, mhooge <mho...@gmail.com> wrote:
I've been using CoverStory for a while with Xcode logic tests and application tests quite happily until Mtn. Lion and Xcode 4.4. Now CoverStory displays a page full of /*EOF*/. I've tried using lcov and genhtml and they product output, but the executed lines are offset, and I'm not getting reliable results. What can I do to help diagnose and solve the issue, or is it simply a configuration issue on my part? Any ideas?


I haven't looked at 4.4 yet, but the last few OS and Xcode releases Apple has busted things in a new way each time.  Start with a clean build just to be safe, and then you may have to do a fair amount of digging/trouble shooting to figure out what changed.

TVL

 
Cheers,

Matt

--
You received this message because you are subscribed to the Google Groups "coverstory-discuss" group.
To view this discussion on the web visit https://groups.google.com/d/msg/coverstory-discuss/-/HxvRuOdzSTgJ.
To post to this group, send email to coverstor...@googlegroups.com.
To unsubscribe from this group, send email to coverstory-disc...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/coverstory-discuss?hl=en.

Dave MacLachlan

unread,
Jul 26, 2012, 4:09:27 PM7/26/12
to coverstor...@googlegroups.com
Are you using precompiled headers? Those have caused issues in the past.

Cheers,
Dave

mhooge

unread,
Jul 26, 2012, 8:02:18 PM7/26/12
to coverstor...@googlegroups.com
I have been, and I've tried disabling them. I have figured out that I do get code coverage in some files and /*EOF*/ in others. Using lcov and genhtml produces output for the files that come up /*EOF*/ in CoverStory, but the listed lines seem to be wrong, like they are offset by an incorrect amount. Code that I know has executed is not listed as having been executed. gcovr is the same way, output is produced, but it seems to be off by lines. But I have limited experience debugging this workflow, CoverStory has been working solidly for me since I started with with back in December. If any of you wrote it, good job. If there is anything I can do to help, please, let me know. For the record, I've been using precompiled headers this whole time with no ill effects, not that this means anything at this point. 

Can I rebuild the project with debugging or something? I checked the project out, but it wouldn't compile, there were some string formatting errors. I did not want to blindly dig in if I could find more information. 

Thanks again for the assistance. 

Cheers,

Matt

On Thursday, July 26, 2012 1:09:27 PM UTC-7, dmaclach wrote:
Are you using precompiled headers? Those have caused issues in the past.

Cheers,
Dave

On Thu, Jul 26, 2012 at 10:45 AM, Thomas Van Lenten <thom...@gmail.com> wrote:
>
> On Thu, Jul 26, 2012 at 1:43 PM, mhooge <mho...@gmail.com> wrote:
>>
>> I've been using CoverStory for a while with Xcode logic tests and
>> application tests quite happily until Mtn. Lion and Xcode 4.4. Now
>> CoverStory displays a page full of /*EOF*/. I've tried using lcov and
>> genhtml and they product output, but the executed lines are offset, and I'm
>> not getting reliable results. What can I do to help diagnose and solve the
>> issue, or is it simply a configuration issue on my part? Any ideas?
>>
>
> I haven't looked at 4.4 yet, but the last few OS and Xcode releases Apple
> has busted things in a new way each time.  Start with a clean build just to
> be safe, and then you may have to do a fair amount of digging/trouble
> shooting to figure out what changed.
>
> TVL
>
>
>>
>> Cheers,
>>
>> Matt
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "coverstory-discuss" group.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/coverstory-discuss/-/HxvRuOdzSTgJ.
>> To post to this group, send email to coverstory-discuss@googlegroups.com.
>> To unsubscribe from this group, send email to
>> For more options, visit this group at
>> http://groups.google.com/group/coverstory-discuss?hl=en.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "coverstory-discuss" group.
> To post to this group, send email to coverstory-discuss@googlegroups.com.
> To unsubscribe from this group, send email to

Thomas Van Lenten

unread,
Jul 26, 2012, 8:27:27 PM7/26/12
to coverstor...@googlegroups.com
On Thu, Jul 26, 2012 at 8:02 PM, mhooge <mho...@gmail.com> wrote:
I have been, and I've tried disabling them. I have figured out that I do get code coverage in some files and /*EOF*/ in others. Using lcov and genhtml produces output for the files that come up /*EOF*/ in CoverStory, but the listed lines seem to be wrong, like they are offset by an incorrect amount. Code that I know has executed is not listed as having been executed. gcovr is the same way, output is produced, but it seems to be off by lines. But I have limited experience debugging this workflow, CoverStory has been working solidly for me since I started with with back in December. If any of you wrote it, good job. If there is anything I can do to help, please, let me know. For the record, I've been using precompiled headers this whole time with no ill effects, not that this means anything at this point. 

Can I rebuild the project with debugging or something? I checked the project out, but it wouldn't compile, there were some string formatting errors. I did not want to blindly dig in if I could find more information. 

Thanks again for the assistance. 

We just happened to be doing enabling a bunch with format strings checks over in GTM, so that's what bubbled up here.  Just did a quick fix for a bunch of them, still two to go, but I gotta figure out the right way to let the compiler know they are ok.

TVL
 
To view this discussion on the web visit https://groups.google.com/d/msg/coverstory-discuss/-/JNFvt5OiDVIJ.

To post to this group, send email to coverstor...@googlegroups.com.
To unsubscribe from this group, send email to coverstory-disc...@googlegroups.com.

Thomas Van Lenten

unread,
Jul 26, 2012, 8:33:08 PM7/26/12
to coverstor...@googlegroups.com
On Thu, Jul 26, 2012 at 8:02 PM, mhooge <mho...@gmail.com> wrote:
I have been, and I've tried disabling them. I have figured out that I do get code coverage in some files and /*EOF*/ in others. Using lcov and genhtml produces output for the files that come up /*EOF*/ in CoverStory, but the listed lines seem to be wrong, like they are offset by an incorrect amount. Code that I know has executed is not listed as having been executed. gcovr is the same way, output is produced, but it seems to be off by lines. But I have limited experience debugging this workflow, CoverStory has been working solidly for me since I started with with back in December. If any of you wrote it, good job. If there is anything I can do to help, please, let me know. For the record, I've been using precompiled headers this whole time with no ill effects, not that this means anything at this point. 

CoverStory just invokes gcov under the hood, so it sorta sounds like Apple may have new bugs in what they are shipping with Xcode 4.4.  The bug can either be in gcov or in clang (the compiler) when the instrumentation is turned on, so if you have a simple example that shows it filing a bug with Apple is gonna be the next step.

TVL

To view this discussion on the web visit https://groups.google.com/d/msg/coverstory-discuss/-/JNFvt5OiDVIJ.

To post to this group, send email to coverstor...@googlegroups.com.
To unsubscribe from this group, send email to coverstory-disc...@googlegroups.com.

mhooge

unread,
Jul 27, 2012, 1:33:07 PM7/27/12
to coverstor...@googlegroups.com
Well I worked on it with a fresh approach today, and I think I have it figured out. CoverStory is producing a lot of "cannot open source file" errors, and I hadn't put them together before. The /*EOF*/ matches up with the source file that can't be opened. I'm thinking Xcode has changed file permissions, or locations. I'm not using the DerivedData folders, and I'm passing in .gcda file locations in on the command line to coverstory 'open /path/to/gcda/ -a coverstory' so that may not work anymore. 

Andy Obusek

unread,
Aug 19, 2012, 4:28:36 PM8/19/12
to coverstor...@googlegroups.com
I'm definitely interested in the solution here, as I'm experiencing the same problem.  For whatever reason CoverStory has the correct paths to my test source files, and also ONE of my source files under test.  No idea why it finds one of source files.  Anyway, I'm anxiously awaiting the fix to get CoverStory working with XCode 4.4 and ML.  I can help test any beta builds if needed.  Thanks

mhooge

unread,
Sep 1, 2012, 12:09:43 PM9/1/12
to coverstor...@googlegroups.com
I couldn't find a solution. I've pulled code coverage from the project. 

Ross Hambrick

unread,
Aug 14, 2013, 10:48:08 PM8/14/13
to coverstor...@googlegroups.com
It's been some time since this topic was active and I am currently facing this issue.  Does anyone know if a solution or workaround has been found?

Dan Herman

unread,
Dec 1, 2013, 4:39:57 PM12/1/13
to coverstor...@googlegroups.com
I too realize this is an old thread, but it's also unresolved and I suspect is the same as this open issue, and I have a bit more information on the symptoms. I'm using Xcode 5 (gcov 4.2.1) and CoverStory 4.4.1.

CoverStory is only able to find one source file in my project, and I can't see that there's anything special about that file except that it is the first alphabetically (so at top of the file list). For every other file, I get "cannot open source file" in the log and the file content appears as a long series of /*EOF*/. My files are referenced "Relative to Group" in Xcode 5, however this behavior persists when I switch them to "Absolute Path" references.

Interestingly, I can reproduce the problem running gcov from the command line, and I can also fix it at the command line (for bare gcov, not for CoverStory).

My project top-level dir is /Projects/Common/dev
(which I refer to as $PROJDIR below)

My build dir is ~/Library/Developer/Xcode/DerivedData/common-<hash>/Build/Intermediates/common.build/Debug/test.build/Objects-normal/x86_64
(referred to as $OBJDIR below)

From any directory other than $PROJDIR:

> gcov -o $OBJDIR DFGeometry.c
File '/Projects/Common/dev/util/DFGeometry.c'
Lines executed:11.11% of 81
/Projects/Common/dev/util/DFGeometry.c:creating 'DFGeometry.c.gcov'

File 'util/DFGeometry.h'
Lines executed:19.23% of 26
util/DFGeometry.h:creating 'DFGeometry.h.gcov'
util/DFGeometry.h:cannot open source file

DFGeometry.c.gcov now contains source code
DFGeometry.h.gcov contains all /*EOF*/'s

> cd $PROJDIR
> gcov -o $OBJDIR DFGeometry.c
File '/Projects/Common/dev/util/DFGeometry.c'
Lines executed:11.11% of 81
/Projects/Common/dev/util/DFGeometry.c:creating 'DFGeometry.c.gcov'

File 'util/DFGeometry.h'
Lines executed:19.23% of 26
util/DFGeometry.h:creating 'DFGeometry.h.gcov'

Both DFGeometry.c and DFGeometry.h contain source code this time.

Unfortunately there's no (reliable) way to change the CWD for Mac GUI apps. Is CoverStory doing anything explicit to point gcov at the project-dir for project-relative (group-relative) paths? Or is this something gcov is supposed to be able to do on its own and is somehow failing to do?

Thanks for any ideas!
Dan
Reply all
Reply to author
Forward
0 new messages