sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: flutter
Issue: Slow scrolling on ios when the scroll view or any of it's children contains an image.
Labels: e: device-specific,platform-ios,engine,c: performance,dependency: skia,a: images,has reproducible steps,P2,team-engine,triaged-engine,found in release: 3.13,found in release: 3.15

Scrolling is super slow and choppy when it or any of it's children contain and image. No matter where I initialize the image (as a method variable, directly in the Widget, or even if I initialize it outside of the method and just pass it in as a parameter) which leads me to believe that it has to do with fetching the image (in this case it's provided not fetched over a network). This doesn't happen on the android emulator, but it does happen on the iOS simulator (all models) and an actual iPhone 6. However i wasn't as bad when i tested on the iOS simulator but it was still awful.


```dart
 Widget sidePager(BuildContext context, String imageUrl) {
    final _width = MediaQuery.of(context).size.width;
    final _height = 125.0;
    final _image = new Image.asset(imageUrl);
    
    return new SingleChildScrollView(
      scrollDirection: Axis.horizontal,
      child: new Row(
        children: <Widget>[
          new Container(
            height: _height,
            width: _width,
            color: Colors.blue.withOpacity(0.3),
            child: new Container(
              height: _height,
              width: _height,
              decoration: new BoxDecoration(
                shape: BoxShape.circle,
                border: new Border.all(color: Colors.white, width: 1.0),
              ),
              child: new ClipOval(
                  // TODO: Figure out why scrolling is choppy and slow when image is used
                  child: _image,
                  ),
            ),
          ),
          new Container(
              height: _height,
              width: _width,
              color: Colors.orange.withOpacity(0.3),
              child: new CupertinoButton(child: new Text("Enter Lockdown"), onPressed: presentLockdownView)),
        ],
      ),
    );
  }
```
Repository: go
Issue: runtime: panic: runtime error: index out of range on all commands on Darwin
Labels: OS-Darwin,NeedsInvestigation

Please answer these questions before submitting your issue. Thanks!

### What version of Go are you using (`go version`)?
$ go version
panic: runtime error: index out of range

goroutine 1 [running]:
os.executable(...)
	/usr/local/Cellar/go/1.10/libexec/src/os/executable_darwin.go:13
os.Executable(...)
	/usr/local/Cellar/go/1.10/libexec/src/os/executable.go:21
cmd/go/internal/cfg.findGOROOT(0xc42001e2c0, 0x17)
	/usr/local/Cellar/go/1.10/libexec/src/cmd/go/internal/cfg/cfg.go:107 +0x441

### Does this issue reproduce with the latest release?

I don't know what version, I think 1.10 based on the .pkg download

### What operating system and processor architecture are you using (`go env`)?

OSX 10.12

$ go env
panic: runtime error: index out of range

goroutine 1 [running]:
os.executable(...)
	/usr/local/Cellar/go/1.10/libexec/src/os/executable_darwin.go:13
os.Executable(...)
	/usr/local/Cellar/go/1.10/libexec/src/os/executable.go:21
cmd/go/internal/cfg.findGOROOT(0xc42001e2c0, 0x17)
	/usr/local/Cellar/go/1.10/libexec/src/cmd/go/internal/cfg/cfg.go:107 +0x441

### What did you do?

Installed go. 


Let me know if you need any other docs. 
Any idea why it isn't working?
Repository: flutter
Issue: Clearer error message for crash when mixing 64 and 32 bit code on Android
Labels: c: crash,platform-android,tool,customer: posse (eap),t: gradle,P2,team-android,triaged-android

According to @jason-simmons, on 64-bit Android devices, Flutter will automatically build with 64-bit native code but it's possible to bring in other 32-bit JNI code via gradle. Launching an app built this way would crash on launch.

```
03-14 12:49:37.531  4779  4779 D AndroidRuntime: Shutting down VM
03-14 12:49:37.531  4779  4779 E AndroidRuntime: FATAL EXCEPTION: main
03-14 12:49:37.531  4779  4779 E AndroidRuntime: Process: com.hamilton.app, PID: 4779
03-14 12:49:37.531  4779  4779 E AndroidRuntime: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.hamilton.app-2/base.apk"],nativeLibraryDirectories=[/data/app/com.hamilton.app-2/lib/arm, /data/app/com.hamilton.app-2/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]] couldn't find "libflutter.so"
03-14 12:49:37.531  4779  4779 E AndroidRuntime: 	at java.lang.Runtime.loadLibrary0(Runtime.java:972)
03-14 12:49:37.531  4779  4779 E AndroidRuntime: 	at java.lang.System.loadLibrary(System.java:1567)
03-14 12:49:37.531  4779  4779 E AndroidRuntime: 	at io.flutter.view.FlutterMain.startInitialization(FlutterMain.java:163)
03-14 12:49:37.531  4779  4779 E AndroidRuntime: 	at io.flutter.view.FlutterMain.startInitialization(FlutterMain.java:148)
03-14 12:49:37.531  4779  4779 E AndroidRuntime: 	at io.flutter.app.FlutterApplication.onCreate(FlutterApplication.java:20)
03-14 12:49:37.531  4779  4779 E AndroidRuntime: 	at com.hamilton.app.App.onCreate(App.kt:16)
03-14 12:49:37.531  4779  4779 E AndroidRuntime: 	at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1032)
03-14 12:49:37.531  4779  4779 E AndroidRuntime: 	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5970)
03-14 12:49:37.531  4779  4779 E AndroidRuntime: 	at android.app.ActivityThread.-wrap3(ActivityThread.java)
03-14 12:49:37.531  4779  4779 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1710)
03-14 12:49:37.531  4779  4779 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:102)
03-14 12:49:37.531  4779  4779 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:154)
03-14 12:49:37.531  4779  4779 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:6776)
03-14 12:49:37.531  4779  4779 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
03-14 12:49:37.531  4779  4779 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
03-14 12:49:37.531  4779  4779 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)
``` 

If possible, detect and adapt automatically while building. 

The current solution according to Jason is to build on the command-line and switch everything to 32-bit by building with something like `flutter run --target-platform android-arm`.

cc @devoncarew since this workaround doesn't seem to be available in IntelliJ.
Repository: pytorch
Issue: Add hookable weights
Labels: module: nn,triaged,enhancement

It would be nice to have hookable weights, where per-layer parameters can be operated upon and determined dynamically during each forward pass. The following is a short list of techniques that could benefit from this functionality:

- Quantization[[1]](https://arxiv.org/abs/1609.07061)
- Pruning[[2]](https://arxiv.org/abs/1510.00149)[[3]](https://arxiv.org/abs/1707.06168)[[4]](https://arxiv.org/abs/1802.00124)
- Stochastic gradient estimation[[5]](https://arxiv.org/abs/1711.00123)[[6]](https://arxiv.org/abs/1703.07370)
- DropConnect[[7]](https://cs.nyu.edu/~wanli/dropc/)
- Regularization[[8]](https://openreview.net/forum?id=H1Y8hhg0b)
- Manifold Tangent Classifier[[9]](https://papers.nips.cc/paper/4409-the-manifold-tangent-classifier.pdf)

I've begun work on [such a framework](https://github.com/castorini/candle), but the code is research-oriented and not production ready. I think the community would benefit from having official support for hookable weights.

I think it would also be interesting to have a more extensible backprop framework, in the sense of allowing for computation of different user-defined quantities across the computation graph. For example, the Hessian diagonals can be computed efficiently[[10]](http://yann.lecun.com/exdb/publis/pdf/lecun-90b.pdf) using a backprop-like approach.

Thanks for reading.


cc @albanD @mruberry @jbschlosser @jerryzh168 @jianyuh @dzhulgakov @raghuramank100 @jamesr66a @vkuzo
Repository: rust
Issue: improve wording of "possible candidate is found in another module" with enums
Labels: A-frontend,C-enhancement,A-diagnostics,T-compiler,WG-diagnostics

When compiling:
```rust
enum E { Foo }
fn main() {
    println!("{}", Foo);
}
```
rustc currently produces:
```rust
error[E0425]: cannot find value `Foo` in this scope
 --> src/main.rs:3:20
  |
3 |     println!("{}", Foo);
  |                    ^^^ not found in this scope
help: possible candidate is found in another module, you can import it into scope
  |
1 | use E::Foo;
  |
```
This is a great error message except for one thing: the enum `E` is not really a "module" (even if it behaves like one for scoping purposes), so saying the candidate is "in another module" can be confusing.  It would be better to modify the wording in this case.
Repository: go
Issue: plugin: type switches fail with reflect-created types
Labels: help wanted,NeedsFix,compiler/runtime

cmd/compile generates type hashes using MD5, but package reflect uses FNV-1 when dynamically constructing anonymous types. This causes type switches (which first search on type hash) to misbehave when using package plugin:

    $ go build -buildmode=plugin w.go
    $ go run x.go
    FAIL; got *[8675309]int
    
    $ cat x.go
    package main
    
    import (
    	"plugin"
    	"reflect"
    )
    
    func main() {
    	v := reflect.New(reflect.ArrayOf(8675309, reflect.TypeOf(0))).Interface()
    
    	p, err := plugin.Open("w.so")
    	if err != nil {
    		panic(err)
    	}
    	f, err := p.Lookup("F")
    	if err != nil {
    		panic(err)
    	}
    	f.(func(interface{}))(v)
    }
    
    $ cat w.go
    package main
    
    import "fmt"
    
    func F(x interface{}) {
    	switch x.(type) {
    	case *[8675309]int:
    		fmt.Println("ok")
    	default:
    		fmt.Printf("FAIL; got %T\n", x)
    	}
    }

Notably, the failure goes away if the array type is constructed after the plugin.Open call, or if there's an explicit `*[8675309]int` type in x.go.

/cc @ianlancetaylor @mwhudson @crawshaw
Repository: rust
Issue: panic mode where it aborts upon panic iff there are no catch_unwind calls to catch it
Labels: A-codegen,T-lang,C-feature-request

The two options for panic handling, abort and unwind, seem insufficient to cover my use case. When I release my app to users, I use a crash reporter (catches crash signals with a signal handler, records the stack trace, and uploads it). If I use abort for panics, then I'll see the stack trace of the panic in my crash reporter, but I won't be able to catch panics. If I use unwind, then I'll be able to catch panics, but uncaught panics will unwind all the way to the FFI boundary (this is an app built in another language and calls into Rust). This means that I won't be able to see the full stack trace. I see a few existing solutions:
- Use abort mode and never catch panics (this won't work for me personally, because there are places where I need to catch panics, e.g. for OOM)
- Have a thread-local variable with the number of catch_unwind calls that I'm currently nested in. Use my own version of catch_unwind to update it. If this number is 0, then that means the panic is going to abort after some amount of unwinding, so just abort it right there. Otherwise, leave it alone because it will be caught gracefully. This will cause aborts if the catch_unwind calls are outside of my code base, but that doesn't seem too common

Any ideas what a good way to deal with this is?
Repository: rust
Issue: Possible Vec::split improvement
Labels: T-libs-api,C-feature-request

Hi guys! The other day I was working on something where I had some ``Vec<u8>`` data and wanted to split on two consecutive bytes. Normally with strings I can just do:
```rust
let v: Vec<&str> = "Hello\r\nWorld!".split("\r\n").collect();
```
But for ``Vec<u8>`` it only accepts a closure rather than a Pattern type, so it's not very easy to split on consecutive bytes. I noticed that ``String::split`` coerces closures and strings into Patterns that it uses to do the split. Do you think it would be possible (or even a good idea) to modify ``Vec::split`` and ``slice::split`` to accept any Pattern type and implement a new searcher for any PartialEq type? That would be pretty nice. Then we could do things like:
```rust
let v: Vec<u8> = b"Hello\r\nWorldWithOtherNonUtf8Stuff".split(b"\r\n").collect();
```
Which is useful if you're dealing with lots of bytes that may or may not be valid UTF-8.
And just generally it makes sense to me that if ``String::split`` accepts a ``&str``, that ``Vec<T>::split`` would accept a ``&[T]``.

Maybe I'm missing something obvious that makes this impossible since I imagine someone would've done it already if it were possible.
Repository: flutter
Issue: Document widget creation source in Timeline RenderObject and Layers
Labels: c: new feature,framework,d: api docs,f: inspector,a: debugging,P3,team-framework,triaged-framework

With debugProfilePaintsEnabled and --trace-skia turned on, a nice RenderObject.paint call stack and Layer stack on the engine is printed. But it's hard to figure out where they are and where they came from. 

If possible reuse widget inspector magic to tag these Timeline entries with args to show its source code widget creation place.
Repository: flutter
Issue: Create a debug rebuild rainbow debug overlay like the repaint rainbow?
Labels: c: new feature,framework,a: debugging,P3,team-framework,triaged-framework
Repository: flutter
Issue: If downloading dart sdk fails, cache is left in a bad state: FileSystemException: Cannot open file, path = '.../flutter/bin/cache/dart-sdk/version'
Labels: c: crash,tool,P2,team-tool,triaged-tool

Get a new flutter version, run flutter, ctrl-c as soon as Downloading Dart SDK from Flutter engine xxxx... appears. 

I ended up in a state where 
```
Building flutter tool...
Unhandled exception:
FileSystemException: Cannot open file, path = '.../flutter/bin/cache/dart-sdk/version' (OS Error: No such file or directory, errno = 2)
#0      _File.throwIfError (dart:io/file_impl.dart:628)
#1      _File.openSync (dart:io/file_impl.dart:472)
#2      _File.readAsBytesSync (dart:io/file_impl.dart:532)
#3      _File.readAsStringSync (dart:io/file_impl.dart:577)
#4      readTextFile (package:pub/src/io.dart:153)
#5      _getVersion (package:pub/src/sdk.dart:44)
#6      version (package:pub/src/sdk.dart:32)
#7      version (package:pub/src/sdk.dart:32)
#8      PubCommandRunner.runCommand (package:pub/src/command_runner.dart:159)
<asynchronous suspension>
#9      PubCommandRunner.run (package:pub/src/command_runner.dart:116)
<asynchronous suspension>
#10     main (file:///b/build/slave/Mac_Engine/build/src/third_party/dart/third_party/pkg/pub/bin/pub.dart:8)
#11     _startIsolate.<anonymous closure> (dart:isolate-patch/dart:isolate/isolate_patch.dart:277)
#12     _RawReceivePortImpl._handleMessage (dart:isolate-patch/dart:isolate/isolate_patch.dart:165)
Error: Unable to pub upgrade flutter tool. Retrying in five seconds...
Unhandled exception:
FileSystemException: Cannot open file, path = '.../flutter/bin/cache/dart-sdk/version' (OS Error: No such file or directory, errno = 2)
#0      _File.throwIfError (dart:io/file_impl.dart:628)
#1      _File.openSync (dart:io/file_impl.dart:472)
#2      _File.readAsBytesSync (dart:io/file_impl.dart:532)
#3      _File.readAsStringSync (dart:io/file_impl.dart:577)
#4      readTextFile (package:pub/src/io.dart:153)
#5      _getVersion (package:pub/src/sdk.dart:44)
#6      version (package:pub/src/sdk.dart:32)
#7      version (package:pub/src/sdk.dart:32)
#8      PubCommandRunner.runCommand (package:pub/src/command_runner.dart:159)
<asynchronous suspension>
#9      PubCommandRunner.run (package:pub/src/command_runner.dart:116)
<asynchronous suspension>
#10     main (file:///b/build/slave/Mac_Engine/build/src/third_party/dart/third_party/pkg/pub/bin/pub.dart:8)
#11     _startIsolate.<anonymous closure> (dart:isolate-patch/dart:isolate/isolate_patch.dart:277)
#12     _RawReceivePortImpl._handleMessage (dart:isolate-patch/dart:isolate/isolate_patch.dart:165)
Error: Unable to pub upgrade flutter tool. Retrying in five seconds...
```
permanently until I `rm -rf bin/cache`
Repository: flutter
Issue: "Google Calendar" AppBar animation
Labels: c: new feature,framework,a: animation,f: material design,c: proposal,P2,team-design,triaged-design

## What I'm trying to do:
I am trying to build an AppBar in my app that can expand with an animation programmatically - not using a SliverAppBar with CustomScrollView and nested scrolling. The most similar example that I can think of is when you tap the month in Google Calendar, the app bar expands to show a child "month" view.

## Basic Scenario:
My goal is that the AppBar has height "h1" as its default state, and when an action is tapped - it uses an animation to expand to height "h2".

## My High-Level Design:
I have tried a few things, but strictly subclassing AppBar doesn't seem like a good option because the PreferredSizeWidget is rigid in height. A more ideal scenario seems to be using SliverAppBar within a Scaffold that has flexible space and having a defined initial height and a calculated height to "grow" to. I'm not worried about the animation part, but more-so just the basic skeleton design. Using an AppBar is preferred to show title, actions, and other provided flutter AppBar behavior.

If anyone has any ideas or can point me to similar examples, it would help me out quite a bit!
Repository: godot
Issue: [Bullet] 3D StaticBody constant linear/angular velocity doesn't work when using Bullet
Labels: bug,confirmed,topic:physics

**Godot version:** 3.0.2


**Issue description:**

While building my first game to test Godot out, I was [reading about StaticBody](https://godot.readthedocs.io/en/latest/classes/class_staticbody.html#class-staticbody)s in the documentation and stumbled upon constant velocity:

>   [...] a constant linear or angular velocity can be set for the static body, so even if it doesn’t move, it affects other bodies as if it was moving [...]

It turns out, these properties do not have any effect at all with Bullet (the default 3D physics engine in Godot 3). With the engine set to `GodotPhysics`, these properties work as expected.

I need to investigate a bit further, but it seems the same thing is true for the thing the documentation calls "simulated motion mode".


**Steps to reproduce:**

Create a new scene with a StaticBody (e.g. a floor) and a RigidBody (e.g. a ball) and let the RigidBody drop on the StaticBody. Set `constant_linear_velocity` or `constant_angular_velocity` to any amount.
The RigidBody will be launched when `3d/physics_engine="GodotPhysics"`, but won't do anything for any other setting.


**Minimal reproduction project:**

Standalone test scenes are in this repository:
https://github.com/eiszfuchs/godot-test-scenes/blob/master/Scenes/ConstantLinearVelocity.tscn
https://github.com/eiszfuchs/godot-test-scenes/blob/master/Scenes/ConstantAngularVelocity.tscn
Repository: opencv
Issue: camera led stays on after release
Labels: category: videoio(camera),incomplete

When I release my logitech c920, the led goes off but in one second it goes on again. it happens 1 from 4 times probably, when i try the most simple example, the led stays on (probability is about 20%)

##### System information (version)

- OpenCV => 3.4
- Operating System / Platform => Windows 7 64 Bit
- Compiler => Visual Studio 2017
[version_string.txt](https://github.com/opencv/opencv/files/1815514/version_string.txt)

I tried vfw and dshow backends, the same behaviour for both
The led stays on even when the app exited.
Even the most simple example does this

.pro file
-------------------
QT -= gui

CONFIG += c++11 console
CONFIG -= app_bundle
DEFINES += QT_DEPRECATED_WARNINGS
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

SOURCES += main.cpp
CONFIG(debug, release|debug) {
    OPENCV_CORE = opencv_core340d
    OPENCV_HIGHGUI = opencv_highgui340d
    OPENCV_IMGPROC = opencv_imgproc340d
    OPENCV_VIDEO = opencv_video340d
    OPENCV_VIDEOIO = opencv_videoio340d
} else {
    OPENCV_CORE = opencv_core340
    OPENCV_HIGHGUI = opencv_highgui340
    OPENCV_IMGPROC = opencv_imgproc340
    OPENCV_VIDEO = opencv_video340
    OPENCV_VIDEOIO = opencv_videoio340
}
INCLUDEPATH += "c:/OneDrive/eyeblink_libraries_msvc2017/opencv-3.4/build_release_enabledebug/install/include"
LIBS += -L"c:/OneDrive/eyeblink_libraries_msvc2017/opencv-3.4/build_release_enabledebug/install/x64/vc15/lib"
LIBS += -L"c:/OneDrive/eyeblink_libraries_msvc2017/opencv-3.4/build_release_enabledebug/install/x64/vc15/bin" -l$$OPENCV_CORE  -l$$OPENCV_HIGHGUI -l$$OPENCV_IMGPROC -l$$OPENCV_VIDEO -l$$OPENCV_VIDEOIO

---------------
#include <QCoreApplication>
#include "opencv2/opencv.hpp"
#include <iostream>
int main(int argc, char *argv[])
{
cv::VideoCapture cam;
cam.open(0);
cv::Mat image;
for(int i=0;i<100;i++)
{
    cam>> image;
    std::cout<<i<<" ";
}
cam.release();
return 0;
}
Repository: angular
Issue: Add ability to provide reason to navigation cancellation.
Labels: feature,freq2: medium,area: router,feature: under consideration

## I'm submitting a...
<pre><code>
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ x ] Feature request
[ ] Documentation issue or request
[ ] Support request
</code></pre>

## Current behavior
When blocking route resolution via a route guard, the public API permits returning a boolean. In the router, this is then mapped to a `NavigationCancel` event with an empty message. As there are many different reasons why a route may be cancelled ("Insufficient access rights", "You're not logged in", "You're logged in", for instance...), it would be nice if that reason can be provided when cancelling a route.

The hooks for this already exist. If an error is thrown, that matches the `isNavigationCancellingError` evaluation, then a message is attached to the subsequent `NavigationCancel` event. However,  the `navigationCancellingError` method that builds these errors is not exposed via the module bundle.

## Expected behavior
I should be able to provide a reason for cancelling navigation, via a route guard. This can either be via a NavigationCancellingError, or by providing an additional type of result that may be returned from methods like `canActivate`.

## What is the motivation / use case for changing the behavior?
Strong permission control at the route level.

## Environment

<pre><code>
Angular version: 5.2.6
</pre></code>
Browser:
- [ latest ] Chrome (desktop)
 
For Tooling issues:
- Node version: 8.9.1
- Platform:  Mac

Others:
<!-- Anything else relevant?  Operating system version, IDE, package manager, HTTP server, ... -->
</code></pre>
Repository: flutter
Issue: Please clarify the usage of InheritedWidget
Labels: framework,d: api docs,c: proposal,P2,team-framework,triaged-framework

Hi,

after long discussions in Gitter today I hope you can shed some light on that topic.

What is the correct way to use an InheritedWidget? So far I understood that it gives you the chance to propagate data down the Widget tree. In extreme if you put is as RootWidget it will be accessible from all Widgets in the tree on all Routes, which is fine because somehow I have to make my ViewModel/Model accessible for my Widgets without having to resort to globals or Singletons.

BUT InheritedWidget is immutable, so how can I update it? And more important how are my Stateful Widgets triggered to rebuild their subtrees?

Unfortunately the documentation is here very unclear and after discussion with a lot of people including @brianegan nobody seems really to know what the correct way of using it.

Thanks a lot for your great work! I really like Flutter coming from Xamarin!
Thomas