-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Dartium - Aw Snap in unchecked mode #14742
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
cc @vsmenon. |
My observations so far:
Couple of stack traces when it seems to hang with the optimizer turned off: #0 BitmapFilter._premultiplyAlpha (package:stagexl/src/filters/BitmapFilter.dart:30:33) #0 int.> (dart:core-patch/integers.dart:75) In optimized mode the crash appears to be in Set owner to @sgmitrovic. |
Crashes with -optimization-filter=dart_BlurFilter_apply. Works fine with --no-use-inlining |
Inlining of dart:html_ImageData_get__data seems to cause the crash: class ImageData extends NativeFieldWrapperClass2 { List<int> get data { For yet unknown reasons, __data is computed to be non-nullable and the check against null is eliminated in ConstantPropagator::VisitStrictCompare. 38: v295 <- LoadField:56(v12 T{not-null, ImageData, ?}, 16 {__data@0x3918afae} [non-nullable _ExternalUint8ClampedArray@0x6006a0b], immutable=0) T{not-null, _ExternalUint8ClampedArray@0x6006a0b, Type: class '_ExternalUint8ClampedArray@0x6006a0b'} cc @mraleph. |
Dartium allocates objects without calling their constructor, i.e., the compiler never has a chance to initialize the field's nullability. Changing Dart_Allocate to always mark the fields as nullable. Added Started label. |
Some context: these are wrapper objects that are only allocated from native code. We use Dart_Allocate to avoid declaring a public constructor. E.g., AudioProcessingEvent is defined in dart:web_audio and extends Event in dart:html. Neither type has a generative constructor. If we had to add generative constructors, we'd need to make at least some of them public (so AudioProcessingEvent's could call Event's), and we'd need insert a runtime check to ensure it doesn't get called from Dart code (only the native bindings C++ code can create an Event). |
Added Fixed label. |
This issue was originally filed by @bp74
What steps will reproduce the problem?
I had a similar bug a few month ago (see issue #11815). Back then a newer release of Dartium fixed the problem. Unfortunately it seems the same problem is back.
I have attached a test application which runs fine if Dartium/DartVM runs in checked mode. If i deactivate the checked mode and start the application from Dart Editor again the browser crashes.
What is the expected output? What do you see instead?
The application runs a loop of 100 blur filters. A blur filter reads and writes the pixels of ImageData (CanvasRenderingContext2D getImageData/putImageData). Probably the crash is related to this.
The test application is only a few lines of code, but it uses a much bigger package. The sample application from issue #11815 works fine.
What version of the product are you using? On what operating system?
Dart Editor version 0.1.2_r29785
Dart SDK version 0.1.2.0_r29782
Windows 7/64 bit.
Please provide any additional information below.
Attachment:
filterTest.zip (246.32 KB)
The text was updated successfully, but these errors were encountered: