Closed zanderso closed 8 years ago
1.16.0-dev.5.5 Does not crash. I'll try to narrow it down a little more...
1.17.0-dev.2.0 also does not crash.
@stereotype441 @scheglov
Yes, repro instructions would be very useful.
@pq
Apologies that the easiest way for me to tell you how to reproduce involves checking out and building Mojo:
Assuming you have depot_tools installed, on a Linux machine:
$ fetch mojo
$ cd src
$ ./mojo/tools/mojob.py gn --debug
$ ./mojo/tools/mojob.py build --debug
Then patch in a change with the SDK update and gclient sync:
$ git cl patch 1976783002
$ gclient sync
$ ./mojo/tools/mojob.py analyze-dart --debug
And you should see the analyzer crashing.
The SDK lives in //third_party/dart-sdk/dart-sdk in the checkout. Please let me know if there's anything else you need. Thanks!
Thanks for the repro instructions. Taking a look now.
@zanderso : are you able to hang tight with 1.17.0-dev.2.0
until we get this sorted?
Yes, we were updating to grab configuration specific imports, so we're good with anything after 1.16.
Great. Thanks @zanderso!
Follow-up question... How are you grabbing and installing the SDK into third_party
? Is that scripted?
It's scripted, with the version specified at the top of //tools/dart/update.py. For testing a fix, it should also be possible to move the one that's there out of the way, and e.g. symlink in a different one.
Thanks! Working on a fix now. Hope to have something before the next dev build this week.
Hmmmm. When I try and repro, I see this and a quick return:
[~/src/tmp/mojo/src] (scratch) $ ./mojo/tools/mojob.py analyze-dart --debug
Running python 'mojo/public/tools/dart_pkg_static_analysis.py' '--dart-pkg-dir=out/Debug/gen/dart-pkg' '--dart-sdk=third_party/dart-sdk/dart-sdk' '--package-root=out/Debug/gen/dart-pkg/packages' ...
The build step fails for me too (but I'm not sure that matters). I am on a mac though...
Quick thought. It would be great if I could just repro with a direct call to the analyzer. Something like?
third_party/dart-sdk/dart-sdk/bin/dartanalyzer --dart-sdk=third_party/dart-sdk/dart-sdk --package-root=out/Debug/gen/dart-pkg/packages --packages=out/Debug/gen/dart-pkg ...
On the bright side, I have an idea of what's up. It would just be awesome to actually repro it so I can get some confidence that we've got it fixed. 😄
Here's the build failure if it helps at all:
[~/src/tmp/mojo/src] (scratch) $ ./mojo/tools/mojob.py build --debug
Building in out/Debug ...
ninja: Entering directory `out/Debug'
[184/4549] CXX obj/third_party/skia/src/ports/skia.SkFontHost_mac.o
FAILED: obj/third_party/skia/src/ports/skia.SkFontHost_mac.o
../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/third_party/skia/src/ports/skia.SkFontHost_mac.o.d -DV8_DEPRECATION_WARNINGS -DNO_TCMALLOC -DDISABLE_NACL -DCHROMIUM_BUILD -DCR_CLANG_REVISION=259396-1 -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DSK_GAMMA_SRGB -DSK_GAMMA_CONTRAST=0.0 -DSK_HIGH_QUALITY_IS_LANCZOS -DSK_DEFAULT_FONT_CACHE_LIMIT=20971520 -DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS -DSK_SUPPORT_LEGACY_SHADERBITMAPTYPE -DSK_SUPPORT_GPU=1 -DSK_BUILD_FOR_MAC -I../.. -Igen -I../../third_party/skia/include/private -I../../third_party/skia/src/core -I../../third_party/skia/src/image -I../../third_party/skia/src/opts -I../../third_party/skia/src/pdf -I../../third_party/skia/src/ports -I../../third_party/skia/src/sfnt -I../../third_party/skia/src/utils -I../../third_party/skia/src/lazy -I../../third_party/skia/include/utils/mac -I../../third_party/skia/include/utils/ios -I../../skia/config -I../../skia/ext -I../../third_party/skia/include/c -I../../third_party/skia/include/config -I../../third_party/skia/include/core -I../../third_party/skia/include/effects -I../../third_party/skia/include/images -I../../third_party/skia/include/lazy -I../../third_party/skia/include/pathops -I../../third_party/skia/include/pdf -I../../third_party/skia/include/pipe -I../../third_party/skia/include/ports -I../../third_party/skia/include/utils -I../../third_party/skia/include/gpu -I../../third_party/skia/src/gpu -I../../third_party/zlib -fno-strict-aliasing -fstack-protector-all -arch x86_64 -fcolor-diagnostics -fvisibility=hidden -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -mmacosx-version-min=10.9 -Xclang -load -Xclang ../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib -Xclang -plugin-arg-find-bad-constructs -Xclang check-templates -Xclang -add-plugin -Xclang find-bad-constructs -O0 -g2 -Wno-inconsistent-missing-override -Wendif-labels -Werror -Wno-missing-field-initializers -Wpartial-availability -Wno-c++11-narrowing -Wno-char-subscripts -Wno-covered-switch-default -Wno-deprecated-register -Wno-shift-negative-value -Wno-constant-conversion -fvisibility-inlines-hidden -Wno-undefined-bool-conversion -Wno-tautological-undefined-compare -std=c++11 -fno-rtti -fno-exceptions -c ../../third_party/skia/src/ports/SkFontHost_mac.cpp -o obj/third_party/skia/src/ports/skia.SkFontHost_mac.o
../../third_party/skia/src/ports/SkFontHost_mac.cpp:315:53: error: 'kCGEncodingMacRoman' is deprecated: first deprecated in OS X 10.9 [-Werror,-Wdeprecated-declarations]
CGContextSelectFont(cgContext, "Helvetica", 16, kCGEncodingMacRoman);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGContext.h:57:3: note: 'kCGEncodingMacRoman' has been explicitly marked deprecated here
kCGEncodingMacRoman
^
../../third_party/skia/src/ports/SkFontHost_mac.cpp:315:5: error: 'CGContextSelectFont' is deprecated: first deprecated in OS X 10.9 [-Werror,-Wdeprecated-declarations]
CGContextSelectFont(cgContext, "Helvetica", 16, kCGEncodingMacRoman);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGContext.h:1031:16: note: 'CGContextSelectFont' has been explicitly marked deprecated here
CG_EXTERN void CGContextSelectFont(CGContextRef __nullable c,
^
../../third_party/skia/src/ports/SkFontHost_mac.cpp:320:5: error: 'CGContextShowTextAtPoint' is deprecated: first deprecated in OS X 10.9 [-Werror,-Wdeprecated-declarations]
CGContextShowTextAtPoint(cgContext, -1, 0, "|", 1);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGContext.h:1045:16: note: 'CGContextShowTextAtPoint' has been explicitly marked deprecated here
CG_EXTERN void CGContextShowTextAtPoint(CGContextRef __nullable c,
^
3 errors generated.
[193/4549] CXX obj/third_party/skia/src/gpu/skia.GrLayerCache.o
ninja: build stopped: subcommand failed.
It looks like the build is failing on some Mac-specific stuff. The Mac build is not well-supported. The build assembles some stuff in the output directory (e.g. the package root) that the analysis step needs. If you don't have access to a Linux machine, I can put together a self-contained repro sometime tomorrow.
That would be really great. I don't have a linux box handy...
Popping up, I'll speculate about what I think is going on and get some of the right folks thinking about it.
@stereotype441, @bwilkerson : the issue, almost certainly, is in the use of a summarized SDK in the presence of SDK extensions. A short term fix will be to skip the summarized SDK in case an sdk_ext
(or _embedder.yaml
) but we should be thinking about something better.
FWIW I've opened a tracking bug for the meta issue of making summaries work in the presence of embedders and sdk extensions here: https://github.com/dart-lang/sdk/issues/26467.
Repro'ed locally and confirmed that using the summarized SDK is the cause. Patch on the way.
Thanks @zanderso for the help!
This should be fixed as of https://github.com/dart-lang/sdk/commit/31a03ec31b1dc1c7db8b6cecd61fbca746766a73.
The next dev build (> 3.0
) should be safe.
Thanks! I'll give the roll into Mojo a try on Monday =)
Awesome. Let me know how it goes!
Verified that the crash is gone after rolling Mojo to 1.17dev-4.1. Thanks!
Great. Thanks for following up!
Please let me know if you need repro instructions.