ui-screen-shooter icon indicating copy to clipboard operation
ui-screen-shooter copied to clipboard

Segmentation fault: 11 error

Open skywinder opened this issue 10 years ago • 5 comments

I copied

capture.js
config-automation.js
config-screenshots.sh
ui-screen-shooter.sh
unix_instruments.sh

To root project folder, try to run ./ui-screen-shooter.sh

And after cleaning got error (only for the first run): ./ui-screen-shooter.sh: line 103: 45211 Bus error: 10

Clean.Remove clean /Users/petrkorolev/Library/Developer/Xcode/DerivedData/EconomicCalendar-gkqposcfrltfxocwxldozxpntlvm/Build/Intermediates/PrecompiledHeaders/Pods-DTFoundation-prefix-ajekpypvzzkmescxwqrvatwyqmku/Pods-DTFoundation-prefix.pch.pch
builtin-rm -rf /Users/petrkorolev/Library/Developer/Xcode/DerivedData/EconomicCalendar-gkqposcfrltfxocwxldozxpntlvm/Build/Intermediates/PrecompiledHeaders/Pods-DTFoundation-prefix-ajekpypvzzkmescxwqrvatwyqmku/Pods-DTFoundation-prefix.pch.pch
./ui-screen-shooter.sh: line 103: 45211 Bus error: 10           xcodebuild -sdk "iphonesimulator$ios_version" CONFIGURATION_BUILD_DIR="$build_dir/build" -workspace "$base.xcworkspace" -scheme "$base" -configuration Debug DSTROOT=$build_dir OBJROOT=$build_dir SYMROOT=$build_dir GCC_PREPROCESSOR_DEFINITIONS='$GCC_PREPROCESSOR_DEFINITIONS SCREENSHOTS=1' ONLY_ACTIVE_ARCH=NO "$@"

And all next attempts to run got another error: ./ui-screen-shooter.sh: line 103: 51123 Segmentation fault: 11

Check dependencies
./ui-screen-shooter.sh: line 103: 51123 Segmentation fault: 11  xcodebuild -sdk "iphonesimulator$ios_version" CONFIGURATION_BUILD_DIR="$build_dir/build" -workspace "$base.xcworkspace" -scheme "$base" -configuration Debug DSTROOT=$build_dir OBJROOT=$build_dir SYMROOT=$build_dir GCC_PREPROCESSOR_DEFINITIONS='$GCC_PREPROCESSOR_DEFINITIONS SCREENSHOTS=1' ONLY_ACTIVE_ARCH=NO "$@"

Can't figure out what cause this error. (With your example all works fine)

skywinder avatar Jan 30 '15 09:01 skywinder

Some more info: the script try to run this command:

xcodebuild -sdk iphonesimulator       CONFIGURATION_BUILD_DIR=/tmp/screen_shooter/build       -workspace EconomicCalendar.xcworkspace -scheme EconomicCalendar -configuration Debug       DSTROOT=/tmp/screen_shooter       OBJROOT=/tmp/screen_shooter       SYMROOT=/tmp/screen_shooter       GCC_PREPROCESSOR_DEFINITIONS=' SCREENSHOTS=1'       ONLY_ACTIVE_ARCH=NO     clean build

And it split error:

Check dependencies [1] 61538 segmentation fault xcodebuild -sdk iphonesimulator -workspace EconomicCalendar.xcworkspace

after removing one option (OBJROOT=/tmp/screen_shooter) this command works fine!

What is this option is using for?

skywinder avatar Jan 30 '15 10:01 skywinder

I found workaround by delete these strings:

  DSTROOT=$build_dir \
  OBJROOT=$build_dir \
  SYMROOT=$build_dir \

from: https://github.com/jonathanpenn/ui-screen-shooter/blob/master/ui-screen-shooter.sh#L118-L120 https://github.com/jonathanpenn/ui-screen-shooter/blob/master/ui-screen-shooter.sh#L127-L129

Now it's works, but I would like to know what the reason of this strings and why this error occur.

skywinder avatar Jan 30 '15 11:01 skywinder

What version of Xcode are you running?

jonathanpenn avatar Jan 31 '15 08:01 jonathanpenn

latest: Version 6.1.1 (6A2008a)

I think it's not a problem of IDE, because your example, clonned to this mac is works and other my project work perfect. Problem with one separate project. I checked all r/w rights of files. It looks the same as others.

BTW: the workaround in my prev comment help to build, but scripts fails, because it can't find app in expected destination. So, I completley fix this by replace tmp_dir="/tmp" to tmp_dir="~/tmp"

skywinder avatar Feb 01 '15 22:02 skywinder

upd: my /tmp dir is:

lrwxr-xr-x@   1 root         wheel    11B Sep 18 17:06 tmp -> private/tmp

skywinder avatar Feb 02 '15 11:02 skywinder