V4CC - Cocoa examples problem

Dave Parizek dave at Parizek.com
Wed May 31 18:32:44 CDT 2006


I downloaded and installed Ruslan's Cocoa example and it built and  
ran fine.  Then I got Justin's excellent TableView example, made  
changes in where things were (as instructed), and it built and ran  
fine.  But now I try to re-run Ruslan's example and something must be  
broken - I get the error "EXC_BAD_ACCESS".  It builds but crashes  
when running.

As a Cocoa newbie I understand what all I need to do to code for  
Valentina (sort of at least) but I do not understand all this  
discussion of where things need to be so xcode can see them.  Is the  
above error caused by changing the locations of needed framework files?

Or have I messed something up:  googling this error suggests it is a  
memory management issue:

"EXC_BAD_ACCESS"
This error usually is caused because you refer to something that has
already been deallocated. Is can often happen if you forget to retain
an object that was autoreleased when it was created, and you try to
access it too late, i.e. after the pool has cleaned stuff up. It can
also happen if you release something more than you should, i.e. you
release an object that you did not own.  This is a good read to start
from:
http://www.stepwise.com/Articles/Technical/HoldMe.html


--Dave
__________________________________________
Dave Parizek


On May 17, 2006, at 3:21 AM, Justin Drury wrote:

> Pros for /Library/Frameworks/V4CC.Framework
> •Contains snapshot of Valentina Release, everything is contained.   
> (The VComponents are contained in the framework and have had their  
> names changed already. See bottom of email)
> •Easily added to xcode project
> •small application sizes(multiple apps link to the framework)
> •Apps can be updated to use new V4CC framework without recompiling 
> (see below #1)
>
> Con's
> •10.4u SDK sym link workaround(one time hit)
> •(#1)existing API 's shouldn't change, otherwise older apps linking  
> to the framework will crash(that method no longer exists)
> •That darn sym link in the application's package to libvkernel  
> (Hopefully you guys can fix that soon)
>
> ---------------------
> Pros for @executable_path/../Frameworks
> •Self contained application, no "install" necessary
> •Freedom to change API.  Application is snapshot of a particular time.
> •I suppose you could swap out the VComponents folder inside an app  
> to update it.
>
> Cons
> •Larger app size
> •Requires post flight script to use install_name_tool to change  
> VComponents to @executable_path
> •To use XCode with framework requires drag of V4CC.framework into  
> XCode project then all VComponents(framework cannot contain the  
> vcomponents in this instance), then setting up copy phases in XCode  
> to copy the V4CC.Framework into  Frameworks, and then setting up  
> the VComponents tree(yeach!)
>
>
> RUSLAN: Your XCode Project for V4CC, does it have a copy files  
> phase where it copies each of the VComponents into the Framework(I  
> was using Resources before), and did those files have the following  
> script run on it?  If not then you are just building a framework  
> that links against /usr/local/lib/vcomponents.  Nothing wrong with  
> that, its just not self contained... And a user now has stuff in 3  
> places (the application itself, usr/local/lib/vcomponents and / 
> Library/Frameworks)
>
> # change id of data library
> 	
> 	cd /usr/local/lib/vcomponents/
> 	install_name_tool -id "/Library/Frameworks/V4CC.framework/Versions/ 
> A/Resources/libicudata.dylib" libicudata.dylib
> 	install_name_tool -id "/Library/Frameworks/V4CC.framework/Versions/ 
> A/Resources/libicuuc.dylib" libicuuc.dylib
> 	install_name_tool -change "/usr/local/lib/vcomponents/ 
> libicudata.dylib" "/Library/Frameworks/V4CC.framework/Versions/A/ 
> Resources/libicudata.dylib" libicuuc.dylib
> 	install_name_tool -id "/Library/Frameworks/V4CC.framework/Versions/ 
> A/Resources/libicui18n.dylib" libicui18n.dylib
> 	install_name_tool -change "/usr/local/lib/vcomponents/ 
> libicudata.dylib" "/Library/Frameworks/V4CC.framework/Versions/A/ 
> Resources/libicudata.dylib" libicui18n.dylib
> 	install_name_tool -change "/usr/local/lib/vcomponents/ 
> libicuuc.dylib" 	"/Library/Frameworks/V4CC.framework/Versions/A/ 
> Resources/libicuuc.dylib" libicui18n.dylib
> 	install_name_tool -id "/Library/Frameworks/V4CC.framework/Versions/ 
> A/Resources/libicuio.dylib" libicuio.dylib
> 	install_name_tool -change "/usr/local/lib/vcomponents/ 
> libicuuc.dylib" 	"/Library/Frameworks/V4CC.framework/Versions/A/ 
> Resources/libicuuc.dylib" libicuio.dylib
> 	install_name_tool -change "/usr/local/lib/vcomponents/ 
> libicudata.dylib" "/Library/Frameworks/V4CC.framework/Versions/A/ 
> Resources/libicudata.dylib" libicuio.dylib
> 	install_name_tool -change "/usr/local/lib/vcomponents/ 
> libicui18n.dylib" "/Library/Frameworks/V4CC.framework/Versions/A/ 
> Resources/libicui18n.dylib" libicuio.dylib
>
>
> #####################################
>
> 	# change id of VSHARED
> 	install_name_tool -id "/Library/Frameworks/V4CC.framework/Versions/ 
> A/Resources/libvshared_fat_release.dylib" libvshared_fat_release.dylib
> 	install_name_tool -id "/Library/Frameworks/V4CC.framework/Versions/ 
> A/Resources/libvkernel_fat_release.dylib" libvkernel_fat_release.dylib
> 	install_name_tool -change "/usr/local/lib/vcomponents/ 
> libvshared_fat_release.dylib" 	  "/Library/Frameworks/ 
> V4CC.framework/Versions/A/Resources/libvshared_fat_release.dylib" 		 
> libvkernel_fat_release.dylib
> 	install_name_tool -change "/usr/local/lib/vcomponents/ 
> VSDK.framework/Versions/A/VSDK" "/Library/Frameworks/V4CC.framework/ 
> Versions/A/Resources/VSDK.framework/Versions/A/VSDK" 	 
> libvkernel_fat_release.dylib
> 	install_name_tool -change "/usr/local/lib/vcomponents/ 
> libicudata.dylib" "/Library/Frameworks/V4CC.framework/Versions/A/ 
> Resources/libicudata.dylib" 	libvkernel_fat_release.dylib
> 	install_name_tool -change "/usr/local/lib/vcomponents/ 
> libicuuc.dylib" 	"/Library/Frameworks/V4CC.framework/Versions/A/ 
> Resources/libicuuc.dylib" 	libvkernel_fat_release.dylib
> 	install_name_tool -change "/usr/local/lib/vcomponents/ 
> libicui18n.dylib" "/Library/Frameworks/V4CC.framework/Versions/A/ 
> Resources/libicui18n.dylib" 	libvkernel_fat_release.dylib
> 	install_name_tool -change "/usr/local/lib/vcomponents/ 
> libicuio.dylib" 	"/Library/Frameworks/V4CC.framework/Versions/A/ 
> Resources/libicuio.dylib" 	libvkernel_fat_release.dylib
>
>
> 	# change id of VCLIENT
> 	install_name_tool -id "/Library/Frameworks/V4CC.framework/Versions/ 
> A/Resources/libvclient_fat_release.dylib" libvclient_fat_release.dylib
> 	install_name_tool -change "/usr/local/lib/vcomponents/ 
> libvshared_fat_release.dylib" "/Library/Frameworks/V4CC.framework/ 
> Versions/A/Resources/libvshared_fat_release.dylib"  
> libvclient_fat_release.dylib
> 	
> 	cd VSDK.framework/
> 	install_name_tool -id "/Library/Frameworks/V4CC.framework/Versions/ 
> A/Resources/VSDK.framework/Versions/A/VSDK" VSDK
> 	
>
>
> _______________________________________________
> Valentina-beta mailing list
> Valentina-beta at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina-beta



More information about the Valentina-beta mailing list