cmd/link: Darwin build fails with "unknown load command"

What version of Go are you using (go version)?
go version go1.10.3 darwin/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/vagrant/Library/Caches/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/vagrant/go"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.10.3/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.10.3/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/4d/rttdp_9d2s7f36zplgwnqrgr0000gn/T/go-build152874796=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?
Attempted to build https://github.com/sstephenson/launch_socket_server, a Go program with libc linkage.
What did you expect to see?
Build succeeds.
What did you see instead?
GOPATH=/private/tmp/launch_socket_server-20180614-6825-1xxvz8v/launch_socket_server-1.0.0 go build -o sbin/launch_socket_server src/launch_socket_server.go
# command-line-arguments
/usr/local/Cellar/go/1.10.2/libexec/pkg/tool/darwin_amd64/link: /usr/local/Cellar/go/1.10.2/libexec/pkg/tool/darwin_amd64/link: combining dwarf failed: Unknown load command 0x32 (50)

Notes
This is fixed by #25906.

@ianlancetaylor, okay for Go 1.11?

@gopherbot please consider this for backport to 1.10, it's a regression

@gopherbot please consider this for backport to 1.9, it's a regression

@mistydemeo, regression from when? When did it last work?

@bradfitz It's broken on upcoming Darwin releases, but works on current releases.

Ah, gotcha. Thanks. I'm cool with both backports in that case.

Thanks! 👍 Did I do something wrong wrt getting gopherbot to trigger the 1.9 backport?

/cc @andybons, @FiloSottile for gopherbot cherry-pick question.
@mistydemeo, feel free to file a manual cherry-pick bug like a caveperson in the meantime if you'd like.

It's not you :) the bot doesn't notice commands after the first, it's tracked at #25574. (You can ask for 1.10 and 1.9 in a single message though.)

Filed #25915 for cherry-pick to 1.9.

Thanks for opening that!
I'm running into an issue pushing the change. This one can't be cherry-picked via Gerrit, since the lines in question moved between 1.9 and 1.10. I have a local patch, and I've followed the instructions here through to the final step. However, it's failing with this message:
remote: Processing changes: refs: 1, done
To https://go.googlesource.com/go
 ! [remote rejected]       HEAD -> refs/for/master (change https://go-review.googlesource.com/#/c/go/+/119115 closed)

It's true that that review is closed, but that's the one that this is backporting. Did I do something wrong with my commit message? This is what I have:
From<PHONE_NUMBER>b99540f2abc00df91e87826eccd08d Mon Sep 17 00:00:00 2001
From: Misty De Meo<EMAIL_ADDRESS>Date: Fri, 15 Jun 2018 11:25:57 -0700
Subject: [PATCH] [release-branch.go1.9] ld/macho: add all missing load
 commands

The ld/macho code currently understands a subset of the mach-o load
commands. I've encountered one of these in the wild in a Go-produced
binary, which tripped up the Go linker because its switch statement
expects its list of load commands to be exhaustive; the rest I've
added for the sake of completion.

The ruby-macho library is a good non-Darwin header resource for these:
https://github.com/homebrew/ruby-macho

Fixes #25915

Change-Id: Ib54c065d27e87d8726a9870df05a2bae24828b98
GitHub-Last-Rev: 655e3f4
GitHub-Pull-Request: golang/go#25906
Reviewed-on: https://go-review.googlesource.com/119115
Reviewed-by: Ian Lance Taylor<EMAIL_ADDRESS>---
 .../link/internal/ld/macho_combine_dwarf.go   | 73 +++++++++++++------
 1 file changed, 52 insertions(+), 21 deletions(-)

diff --git a/src/cmd/link/internal/ld/macho_combine_dwarf.go b/src/cmd/link/internal/ld/macho_combine_dwarf.go
index 8c6c4a86ac..515f798a9c 100644
--- a/src/cmd/link/internal/ld/macho_combine_dwarf.go
+++ b/src/cmd/link/internal/ld/macho_combine_dwarf.go
@@ -21,26 +21,57 @@ var dwarfaddr, linkaddr int64
 var linkoffset uint32

 const (
-	LC_ID_DYLIB             = 0xd
-	LC_LOAD_DYLINKER        = 0xe
-	LC_PREBOUND_DYLIB       = 0x10
-	LC_LOAD_WEAK_DYLIB      = 0x18
-	LC_UUID                 = 0x1b
-	LC_RPATH                = 0x8000001c
-	LC_CODE_SIGNATURE       = 0x1d
-	LC_SEGMENT_SPLIT_INFO   = 0x1e
-	LC_REEXPORT_DYLIB       = 0x8000001f
-	LC_ENCRYPTION_INFO      = 0x21
-	LC_DYLD_INFO            = 0x22
-	LC_DYLD_INFO_ONLY       = 0x80000022
-	LC_VERSION_MIN_MACOSX   = 0x24
-	LC_VERSION_MIN_IPHONEOS = 0x25
-	LC_FUNCTION_STARTS      = 0x26
-	LC_MAIN                 = 0x80000028
-	LC_DATA_IN_CODE         = 0x29
-	LC_SOURCE_VERSION       = 0x2A
-	LC_DYLIB_CODE_SIGN_DRS  = 0x2B
-	LC_ENCRYPTION_INFO_64   = 0x2C
+	LC_SEGMENT                  = 0x1
+	LC_SYMTAB                   = 0x2
+	LC_SYMSEG                   = 0x3
+	LC_THREAD                   = 0x4
+	LC_UNIXTHREAD               = 0x5
+	LC_LOADFVMLIB               = 0x6
+	LC_IDFVMLIB                 = 0x7
+	LC_IDENT                    = 0x8
+	LC_FVMFILE                  = 0x9
+	LC_PREPAGE                  = 0xa
+	LC_DYSYMTAB                 = 0xb
+	LC_LOAD_DYLIB               = 0xc
+	LC_ID_DYLIB                 = 0xd
+	LC_LOAD_DYLINKER            = 0xe
+	LC_ID_DYLINKER              = 0xf
+	LC_PREBOUND_DYLIB           = 0x10
+	LC_ROUTINES                 = 0x11
+	LC_SUB_FRAMEWORK            = 0x12
+	LC_SUB_UMBRELLA             = 0x13
+	LC_SUB_CLIENT               = 0x14
+	LC_SUB_LIBRARY              = 0x15
+	LC_TWOLEVEL_HINTS           = 0x16
+	LC_PREBIND_CKSUM            = 0x17
+	LC_LOAD_WEAK_DYLIB          = 0x18
+	LC_SEGMENT_64               = 0x19
+	LC_ROUTINES_64              = 0x1a
+	LC_UUID                     = 0x1b
+	LC_RPATH                    = 0x8000001c
+	LC_CODE_SIGNATURE           = 0x1d
+	LC_SEGMENT_SPLIT_INFO       = 0x1e
+	LC_REEXPORT_DYLIB           = 0x8000001f
+	LC_LAZY_LOAD_DYLIB          = 0x20
+	LC_ENCRYPTION_INFO          = 0x21
+	LC_DYLD_INFO                = 0x22
+	LC_DYLD_INFO_ONLY           = 0x80000022
+	LC_LOAD_UPWARD_DYLIB        = 0x80000023
+	LC_VERSION_MIN_MACOSX       = 0x24
+	LC_VERSION_MIN_IPHONEOS     = 0x25
+	LC_FUNCTION_STARTS          = 0x26
+	LC_DYLD_ENVIRONMENT         = 0x27
+	LC_MAIN                     = 0x80000028
+	LC_DATA_IN_CODE             = 0x29
+	LC_SOURCE_VERSION           = 0x2A
+	LC_DYLIB_CODE_SIGN_DRS      = 0x2B
+	LC_ENCRYPTION_INFO_64       = 0x2C
+	LC_LINKER_OPTION            = 0x2D
+	LC_LINKER_OPTIMIZATION_HINT = 0x2E
+	LC_VERSION_MIN_TVOS         = 0x2F
+	LC_VERSION_MIN_WATCHOS      = 0x30
+	LC_VERSION_NOTE             = 0x31
+	LC_BUILD_VERSION            = 0x32

 	pageAlign = 12 // 4096 = 1 << 12
 )
@@ -242,7 +273,7 @@ func machoCombineDwarf(inexe, dsym, outexe string) error {
 			err = machoUpdateLoadCommand(reader, &linkEditDataCmd{}, "DataOff")
 		case LC_ENCRYPTION_INFO, LC_ENCRYPTION_INFO_64:
 			err = machoUpdateLoadCommand(reader, &encryptionInfoCmd{}, "CryptOff")
-		case macho.LoadCmdDylib, macho.LoadCmdThread, macho.LoadCmdUnixThread, LC_PREBOUND_DYLIB, LC_UUID, LC_VERSION_MIN_MACOSX, LC_VERSION_MIN_IPHONEOS, LC_SOURCE_VERSION, LC_MAIN, LC_LOAD_DYLINKER, LC_LOAD_WEAK_DYLIB, LC_REEXPORT_DYLIB, LC_RPATH, LC_ID_DYLIB:
+		case macho.LoadCmdDylib, macho.LoadCmdThread, macho.LoadCmdUnixThread, LC_PREBOUND_DYLIB, LC_UUID, LC_VERSION_MIN_MACOSX, LC_VERSION_MIN_IPHONEOS, LC_SOURCE_VERSION, LC_MAIN, LC_LOAD_DYLINKER, LC_LOAD_WEAK_DYLIB, LC_REEXPORT_DYLIB, LC_RPATH, LC_ID_DYLIB, LC_SYMSEG, LC_LOADFVMLIB, LC_IDFVMLIB, LC_IDENT, LC_FVMFILE, LC_PREPAGE, LC_ID_DYLINKER, LC_ROUTINES, LC_SUB_FRAMEWORK, LC_SUB_UMBRELLA, LC_SUB_CLIENT, LC_SUB_LIBRARY, LC_TWOLEVEL_HINTS, LC_PREBIND_CKSUM, LC_ROUTINES_64, LC_LAZY_LOAD_DYLIB, LC_LOAD_UPWARD_DYLIB, LC_DYLD_ENVIRONMENT, LC_LINKER_OPTION, LC_LINKER_OPTIMIZATION_HINT, LC_VERSION_MIN_TVOS, LC_VERSION_MIN_WATCHOS, LC_VERSION_NOTE, LC_BUILD_VERSION:
 			// Nothing to update
 		default:
 			err = fmt.Errorf("Unknown load command 0x%x (%s)\n", int(cmd.Cmd), cmd.Cmd)
--
2.17.1

@mistydemeo It's complaining because you are submitting the change to branch master. The critical step in the instructions is git checkout release-branch.go1.9 before git codereview change, so that the change branch is set to have release-branch.go1.9 as upstream.

Thank you! I could have sworn I'd done that, but it seems to have worked the second try.

What was the solution?
I still met this problem when trying to debug a tutorial level go project.
Here is the log
# _/Users/leon/Documents/Projects/GoLang/TutorialLearningGoForWebDevelopment
/usr/local/go/pkg/tool/darwin_amd64/link: /usr/local/go/pkg/tool/darwin_amd64/link: combining dwarf failed: Unknown load command 0x32 (50)
exit status 2
Process exiting with code: 1

@Unc7e The PRs mentioned earlier were the fixes. It's been fixed in the 1.11 and 1.10 branches, but hasn't yet made it into a stable release of Go.

@mistydemeo 1.10 is a stable release of Go.

@ianlancetaylor Sorry, I meant the next point release in the 1.10 series, if there will be one. This patch isn't in 1.10.3.

@mistydemeo Ah, got it.

it's gone when i upgrade to go1.11.4.


Platformio compilation

I was trying to migrate a project from arduino to platformio, but I am getting this issue and no matter what I do, looks like the wolfssl or wolfSSL definition cannot be found not in the libs or as a dependency lib, any suggestions where else to look for?
.pio/libdeps/odroid_esp32/ESPHap/aa.c:2:10: fatal error: wolfssl.h: No such file or directory

*****************************************************************
* Looking for wolfssl.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:wolfssl.h"
* Web  > https://platformio.org/lib/search?query=header:wolfssl.h
*
*****************************************************************

 #include <wolfssl.h>
          ^~~~~~~~~~~
compilation terminated.
*** [.pio/build/odroid_esp32/lib933/ESPHap/aa.c.o] Error 1
.pio/libdeps/odroid_esp32/ESPHap/crypto.c:6:10: fatal error: wolfssl.h: No such file or directory

Hi I did migration some of the project, please have a look example  https://github.com/Yurik72/IoTManager
You should have wolfssl under lib folder

Just as a complementary doc, I needed to include these flags to make it compilable:
-DESP32
	-DARDUINO
	-Wno-error=maybe-uninitialized
	-Wno-error=uninitialized
	-Wno-error=implicit-function-declaration
	-Wno-error=misleading-indentation
	-Wno-error=return-type
	-Wno-error=parentheses
	-Wno-error=stringop-overflow
	-Wno-error=comment

And modified the include:
#include <hapfilestorage/hapfilestorage.hpp>
Looks like it was using the backward slash in some of the examples


Run zap_convert_all on tip.

This should have happened as part of
https://github.com/project-chip/connectedhomeip/pull/29704 but didn't.

fast track: scripted change


Add shorting of stocks

When creating reminders, it is assumed that the user buys the stock. It would be nice if users could short the stock as well. E.g. "@stock_reminder short $BTC, remind me in 2 weeks".

Done!
https://twitter.com/stock_reminder/status/1347526645754814465?s=20

Done!
https://twitter.com/stock_reminder/status/1347526645754814465?s=20


net: Listener crashes on windows

What version of Go are you using (go version)?

$ go version
go version go1.15.12 windows/amd64

Does this issue reproduce with the latest release?
Yes, test done with:

1.15.12
1.16.3
1.16.4

What operating system and processor architecture are you using (go env)?
go env Output
$ go env
set GO111MODULE=on
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\pc\AppData\Local\go-build
set GOENV=C:\Users\pc\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\pc\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\pc\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Program Files\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\Program Files\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=C:\Users\pc\projects\XXXX\XXXX\go.mod
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\pc\AppData\Local\Temp\go-build555747750=/tmp/go-build -gno-record-gcc-switches

What did you do?
The following program fails when launched directly in the IDE (Goland) and with go run main.go:
package main

import (
	"fmt"
	"log"
	"net"
	"runtime"
)

func main() {
	//handler := rest.RegisterRoutes()
	log.Println("starting server...")
	//if err := http.ListenAndServe("<IP_ADDRESS>:8081", handler); err != nil {
	//	log.Fatalf("could not listen and serve: %v", err)
	//}
	fmt.Println(runtime.GOOS)
	lis, err := net.Listen("tcp", "<IP_ADDRESS>:9080") // also tried with "tcp", ":9080"
	if err != nil {
		log.Fatal(err)
	}
	defer lis.Close()
	lis.Accept()
}

The same program is ok when launched in debug directly in the IDE(Goland)
The problem occurs also with windows firewall disabled
What did you expect to see?
A working http server / net listener
What did you see instead?

Exception 0xc0000005 0x0 0x7fff1c6d2fff 0x1b854d00000
windows
PC=0x1b854d00000

syscall.Syscall6(0x7fff1bf056b0, 0x6, 0x2, 0x1, 0x0, 0x0, 0x0, 0x81, 0x0, 0x0, ...)
C:/Program Files/Go/src/runtime/syscall_windows.go:343 +0xf2
internal/syscall/windows.WSASocket(0x100000002, 0x0, 0x0, 0x8100000000, 0x0, 0x65b420, 0x7b0298)
C:/Program Files/Go/src/internal/syscall/windows/zsyscall_windows.go:321 +0xca
net.sysSocket(0x2, 0x1, 0x0, 0x10, 0x7f28e0, 0x10)
C:/Program Files/Go/src/net/sock_windows.go:20 +0x66
net.socket(0x71fb90, 0xc0000ac058, 0x6f60d7, 0x3, 0x2, 0x1, 0x0, 0x0, 0x71ff40, 0xc00001a060, ...)
C:/Program Files/Go/src/net/sock_posix.go:19 +0x65
net.internetSocket(0x71fb90, 0xc0000ac058, 0x6f60d7, 0x3, 0x71ff40, 0xc00001a060, 0x0, 0x0, 0x1, 0x0, ...)
C:/Program Files/Go/src/net/ipsock_posix.go:141 +0x170
net.(*sysListener).listenTCP(0xc0000d7e38, 0x71fb90, 0xc0000ac058, 0xc00001a060, 0x71f0d8, 0xc00001a060, 0x3)
C:/Program Files/Go/src/net/tcpsock_posix.go:168 +0xbe
net.(*ListenConfig).Listen(0xc0000d7ed0, 0x71fb90, 0xc0000ac058, 0x6f60d7, 0x3, 0x6f7ba9, 0xe, 0x6ade33, 0x6c6bc5, 0x62a256, ...)
C:/Program Files/Go/src/net/dial.go:636 +0x5f9
net.Listen(0x6f60d7, 0x3, 0x6f7ba9, 0xe, 0x1, 0x8, 0x0, 0x0)
C:/Program Files/Go/src/net/dial.go:706 +0x87
main.main()
XXX/main.go:17 +0x10b
rax     0x7fff19410b92
rbx     0x7fff19410b90
rcx     0x77
rdi     0xffffffffffbadd11
rsi     0x0
rbp     0x0
rsp     0x26db1fee30
r8      0x97c
r9      0x97c
r10     0x97c
r11     0x97c
r12     0xc000007a
r13     0x0
r14     0x7fff19410b92
r15     0x7fff1c4d0000
rip     0x1b854d00000
rflags  0x10202
cs      0x33
fs      0x53
gs      0x2b

This is a low-level crash in the runtime, not likely to be related to the program itself. I suggest disabling any antivirus software you have running.
cc @bradfitz @ianlancetaylor @bufflig

We tried the following steps:

uninstall the antivirus software
disable windows defender firewall
disable windows defender real-time protection

Same result.

On which version of Windows OS does this happen?
Could you try this
set GODEBUG=asyncpreemptoff=1
go run main.go

If that doesn't help, what happens if you close the Conn object returned by Accept?
cc @alexbrainman @mattn @zx2c4

I'm unable to reproduce this bug on Windows 10.

@almartino I also cannot reproduce this running on current Go tip on Windows 10
C:\>test
2021/05/19 18:23:24 starting server...
windows
^C
C:\>

Sorry, but I don't have time to debug this.
Alex

I do this when installing a network server on Windows, altho I don't think it's the cause of your error:
netsh advfirewall firewall add rule action=allow protocol=tcp enable=yes direction=in ^
      profile=domain,private,public name=appname program="pathname"

On which version of Windows OS does this happen?
Could you try this
set GODEBUG=asyncpreemptoff=1
go run main.go

If that doesn't help, what happens if you close the Conn object returned by Accept?
cc @alexbrainman @mattn @zx2c4

Windows 10 Home 2004 (build SO 19041.985)
With set GODEBUG=asyncpreemptoff=1 the error is the same and I can't close the Conn because the program crashes after go run

I don't know if this can help, but the same "crash" occurs when I build the executable.
netcrash.zip

@almartino what I would do is download original version of Go and try it instead of using IDE.
You can download latest version in a zip file, for example
https://golang.org/dl/go1.16.4.windows-amd64.zip
from
https://golang.org/dl/
Then unzip it somewhere on your system. And then open cmd.exe and try building your program from command line by using go build command, and then try running built program.
To be able to run correct Go version (the one that you unzipped to your disk), you would have to modify your PATH variable before you build your program. You can temporarily change PATH when you open cmd.exe program. Just do this command:
set PATH=c:\directory_where_you_unzipped_go\bin;%PATH%
Just run go version before building the program to make sure you use correct version.
Alex

Hi @alexbrainman ,  we followed your suggested steps, same results.

Hi @alexbrainman , we followed your suggested steps, same results.

Did you run go version command. Please show output of it.
Same for go build command. Show output of go build command.
Same for executing your program. Show output of your program.
Thank you.
Alex

Does this happen for a simple "hello world" program with only import "fmt" or is the net.Listen call required to trigger it?
Can you try a similar program in a different language (C#, C, Python, etc) on that machine?

Hi @alexbrainman , we followed your suggested steps, same results.

Did you run go version command. Please show output of it.
Same for go build command. Show output of go build command.
Same for executing your program. Show output of your program.
Thank you.
Alex

We unzipped the latest version into C:\Users\pc\Desktop\tmp\go
Go run
C:\Users\pc\projects\testProject>set PATH=C:\Users\pc\Desktop\tmp\go\bin
C:\Users\pc\projects\testProject>go version
go version go1.16.4 windows/amd64
C:\Users\pc\projects\testProject>go env GOROOT
C:\Users\pc\Desktop\tmp\go
C:\Users\pc\projects\testProject>go run main.go
Exception 0xc0000005 0x0 0x7ffe7eb52fff 0x18eeec80000
...

Go build
(same terminal instance after SET command)
C:\Users\pc\projects\testProject>go build
C:\Users\pc\projects\testProject>dir
 Directory of C:\Users\pc\projects\testProject
25/05/2021  09:49    <DIR>          .
25/05/2021  09:49    <DIR>          ..
25/05/2021  09:46    <DIR>          .idea
25/05/2021  09:49                21 go.mod
24/05/2021  11:13               190 main.go
25/05/2021  09:49         6.062.080 test.exe
               3 File      6.062.291 byte
               3 Directory  47.825.817.600 bytes
C:\Users\pc\projects\testProject>test.exe
Exception 0xc0000005 0x0 0x7ffe7eb52fff 0x15d69e50000
...

Does this happen for a simple "hello world" program with only import "fmt" or is the net.Listen call required to trigger it?
Can you try a similar program in a different language (C#, C, Python, etc) on that machine?

the net.Listen call triggers the issue.
We also tried a simple java http server copied from Stackoverflow
(using the same port of the go program)

And your Java program runs fine?
Did you try the command I suggested in https://github.com/golang/go/issues/46125#issuecomment-843890694?

And your Java program runs fine?
Did you try the command I suggested in #46125 (comment)? (Requires Admin privs.)

Yes, the java program runs fine, and the "test" handler works when invoked.
Yes, we also tried the command suggested in #46125 (comment), same result.
Additionally, I built the executable from my linux machine with
GOOS=windows GOARCH=amd64 go build -o test.exe ./main.go
And then we executed on the windows machine with no luck... The exception is the same.

C:\Users\pc\projects\testProject>go build
C:\Users\pc\projects\testProject>dir
Directory of C:\Users\pc\projects\testProject
25/05/2021  09:49              .
25/05/2021  09:49              ..
25/05/2021  09:46              .idea
25/05/2021  09:49                21 go.mod
24/05/2021  11:13               190 main.go
25/05/2021  09:49         6.062.080 test.exe
3 File      6.062.291 byte
3 Directory  47.825.817.600 bytes
C:\Users\pc\projects\testProject>test.exe
Exception 0xc0000005 0x0 0x7ffe7eb52fff 0x15d69e50000
...

We need to see complete stack trace output by test.exe program. Also
set GOTRACEBACK=crash
before you run test.exe so we can see as much detailed stacktrace as possible.
It appears that your go build command works fine on your computer. So it is running the program executable is the problem. Can you try and run your test.exe on another Windows computer?
Thank you.
Alex

C:\Users\pc\projects\testProject>go build
C:\Users\pc\projects\testProject>dir
Directory of C:\Users\pc\projects\testProject
25/05/2021  09:49              .
25/05/2021  09:49              ..
25/05/2021  09:46              .idea
25/05/2021  09:49                21 go.mod
24/05/2021  11:13               190 main.go
25/05/2021  09:49         6.062.080 test.exe
3 File      6.062.291 byte
3 Directory  47.825.817.600 bytes
C:\Users\pc\projects\testProject>test.exe
Exception 0xc0000005 0x0 0x7ffe7eb52fff 0x15d69e50000
...

We need to see complete stack trace output by test.exe program. Also
set GOTRACEBACK=crash
before you run test.exe so we can see as much detailed stacktrace as possible.
It appears that your go build command works fine on your computer. So it is running the program executable is the problem. Can you try and run your test.exe on another Windows computer?
Thank you.
Alex

Sorry I reported a bad info:
The executable built from my linux machine works fine on the windows machine without the exception (accept the connection, then closes the connection and terminates with exit code 0). I also tried the executable on another Windows VM

Stack trace with set GOTRACEBACK=crash. We used the "system" installed golang version, which is `1.15.12`. If you need I can send also the stacktrace with the latest version.
go run main.go
Exception 0xc0000005 0x0 0x7ffe7eb52fff 0x1f9b76d0000
PC=0x1f9b76d0000

runtime.cgocall(0xacbda0, 0xea67a0, 0x0)
        C:/Program Files/Go/src/runtime/cgocall.go:133 +0x55 fp=0xc0000759b0 sp=0xc000075978 pc=0xa64795
syscall.Syscall6(0x7ffe7d7856b0, 0x6, 0x2, 0x1, 0x6, 0x0, 0x0, 0x81, 0x0, 0x0, ...)
        C:/Program Files/Go/src/runtime/syscall_windows.go:201 +0xf2 fp=0xc0000759f0 sp=0xc0000759b0 pc=0xac73d2
internal/syscall/windows.WSASocket(0x100000002, 0xc000000006, 0x0, 0x8100000000, 0x10, 0x10, 0xca5a20)
        C:/Program Files/Go/src/internal/syscall/windows/zsyscall_windows.go:122 +0xcc fp=0xc000075a70 sp=0xc0000759f0 pc=0xb2cecc
net.sysSocket(0x2, 0x1, 0x6, 0xea64e0, 0x0, 0xcf1d65)
        C:/Program Files/Go/src/net/sock_windows.go:20 +0x66 fp=0xc000075ad0 sp=0xc000075a70 pc=0xbbaa66
net.(*ipStackCapabilities).probe(0xed82d0)
        C:/Program Files/Go/src/net/ipsock_posix.go:27 +0x55 fp=0xc000075bc0 sp=0xc000075ad0 pc=0xbb2c75
net.(*ipStackCapabilities).probe-fm()
        C:/Program Files/Go/src/net/ipsock_posix.go:26 +0x31 fp=0xc000075bd8 sp=0xc000075bc0 pc=0xbc2ef1
sync.(*Once).doSlow(0xed82d0, 0xc000075c38)
        C:/Program Files/Go/src/sync/once.go:66 +0xf7 fp=0xc000075c28 sp=0xc000075bd8 pc=0xad60f7
sync.(*Once).Do(...)
        C:/Program Files/Go/src/sync/once.go:57
net.supportsIPv4map(0xc000064ba0)
        C:/Program Files/Go/src/net/ipsock.go:47 +0x7d fp=0xc000075c58 sp=0xc000075c28 pc=0xbb0e7d
net.favoriteAddrFamily(0xcf1a84, 0x3, 0xd486a0, 0xc000064ba0, 0x0, 0x0, 0xcf211b, 0x6, 0xcf1d64, 0x5)
        C:/Program Files/Go/src/net/ipsock_posix.go:120 +0x137 fp=0xc000075c78 sp=0xc000075c58 pc=0xbb30d7
net.internetSocket(0xd47860, 0xc00000a048, 0xcf1a84, 0x3, 0xd486a0, 0xc000064ba0, 0x0, 0x0, 0x1, 0x0, ...)
        C:/Program Files/Go/src/net/ipsock_posix.go:140 +0xca fp=0xc000075d08 sp=0xc000075c78 pc=0xbb32aa
net.(*sysListener).listenTCP(0xc000075e48, 0xd47860, 0xc00000a048, 0xc000064ba0, 0xd45160, 0xc000064ba0, 0x3)
        C:/Program Files/Go/src/net/tcpsock_posix.go:168 +0xbe fp=0xc000075da0 sp=0xc000075d08 pc=0xbbcbbe
net.(*ListenConfig).Listen(0xc000075ee0, 0xd47860, 0xc00000a048, 0xcf1a84, 0x3, 0xcf1d64, 0x5, 0xd8, 0x1f992390108, 0xc000126000, ...)
        C:/Program Files/Go/src/net/dial.go:636 +0x5d9 fp=0xc000075e88 sp=0xc000075da0 pc=0xbaa9f9
net.Listen(0xcf1a84, 0x3, 0xcf1d64, 0x5, 0xe0, 0xce9a60, 0xea5f01, 0xc000126000)
        C:/Program Files/Go/src/net/dial.go:706 +0x87 fp=0xc000075f00 sp=0xc000075e88 pc=0xbaaaa7
net/http.(*Server).ListenAndServe(0xc000126000, 0xc000126000, 0x6)
        C:/Program Files/Go/src/net/http/server.go:2862 +0x79 fp=0xc000075f50 sp=0xc000075f00 pc=0xc74cd9
net/http.ListenAndServe(...)
        C:/Program Files/Go/src/net/http/server.go:3120
main.main()
        C:/Users/pc/projects/testProject/main.go:9 +0x9d fp=0xc000075f88 sp=0xc000075f50 pc=0xc854dd
runtime.main()
        C:/Program Files/Go/src/runtime/proc.go:204 +0x209 fp=0xc000075fe0 sp=0xc000075f88 pc=0xa9b409
runtime.goexit()
        C:/Program Files/Go/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc000075fe8 sp=0xc000075fe0 pc=0xaca621

goroutine 2 [force gc (idle)]:
runtime.gopark(0xd09a58, 0xea59a0, 0x1411, 0x1)
        C:/Program Files/Go/src/runtime/proc.go:306 +0xfa fp=0xc000027fb0 sp=0xc000027f90 pc=0xa9b7da
runtime.goparkunlock(...)
        C:/Program Files/Go/src/runtime/proc.go:312
runtime.forcegchelper()
        C:/Program Files/Go/src/runtime/proc.go:255 +0xcd fp=0xc000027fe0 sp=0xc000027fb0 pc=0xa9b66d
runtime.goexit()
        C:/Program Files/Go/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc000027fe8 sp=0xc000027fe0 pc=0xaca621
created by runtime.init.6
        C:/Program Files/Go/src/runtime/proc.go:243 +0x3c

goroutine 3 [GC sweep wait]:
runtime.gopark(0xd09a58, 0xea5aa0, 0x140c, 0x1)
        C:/Program Files/Go/src/runtime/proc.go:306 +0xfa fp=0xc000029fa8 sp=0xc000029f88 pc=0xa9b7da
runtime.goparkunlock(...)
        C:/Program Files/Go/src/runtime/proc.go:312
runtime.bgsweep(0xc000014070)
        C:/Program Files/Go/src/runtime/mgcsweep.go:163 +0xb2 fp=0xc000029fd8 sp=0xc000029fa8 pc=0xa85412
runtime.goexit()
        C:/Program Files/Go/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc000029fe0 sp=0xc000029fd8 pc=0xaca621
created by runtime.gcenable
        C:/Program Files/Go/src/runtime/mgc.go:217 +0x67

goroutine 4 [GC scavenge wait]:
runtime.gopark(0xd09a58, 0xea5d40, 0x140d, 0x1)
        C:/Program Files/Go/src/runtime/proc.go:306 +0xfa fp=0xc000035f78 sp=0xc000035f58 pc=0xa9b7da
runtime.goparkunlock(...)
        C:/Program Files/Go/src/runtime/proc.go:312
runtime.bgscavenge(0xc000014070)
        C:/Program Files/Go/src/runtime/mgcscavenge.go:265 +0xe5 fp=0xc000035fd8 sp=0xc000035f78 pc=0xa833e5
runtime.goexit()
        C:/Program Files/Go/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc000035fe0 sp=0xc000035fd8 pc=0xaca621
created by runtime.gcenable
        C:/Program Files/Go/src/runtime/mgc.go:218 +0x89

goroutine 5 [finalizer wait]:
runtime.gopark(0xd09a58, 0xed80b0, 0xca1410, 0x1)
        C:/Program Files/Go/src/runtime/proc.go:306 +0xfa fp=0xc00002bf58 sp=0xc00002bf38 pc=0xa9b7da
runtime.goparkunlock(...)
        C:/Program Files/Go/src/runtime/proc.go:312
runtime.runfinq()
        C:/Program Files/Go/src/runtime/mfinal.go:175 +0xb2 fp=0xc00002bfe0 sp=0xc00002bf58 pc=0xa7a112
runtime.goexit()
        C:/Program Files/Go/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc00002bfe8 sp=0xc00002bfe0 pc=0xaca621
created by runtime.createfing
        C:/Program Files/Go/src/runtime/mfinal.go:156 +0x68
rax     0x7ffe7b8d0b92
rbx     0x7ffe7b8d0b90
rcx     0x77
rdi     0xffffffffffbadd11
rsi     0x0
rbp     0x0
rsp     0xaa029fee40
r8      0x97d
r9      0x97d
r10     0x97d
r11     0x97d
r12     0xc000007a
r13     0x0
r14     0x7ffe7b8d0b92
r15     0x7ffe7e950000
rip     0x1f9b76d0000
rflags  0x10202
cs      0x33
fs      0x53
gs      0x2b
exit status 2

Since the executable built on Linux works, it might help to see a comparison of that with the executable built on Windows.
cc @ianlancetaylor for suggestions on comparing executable files...

The executable built from my linux machine works fine on the windows machine without the exception (accept the connection, then closes the connection and terminates with exit code 0).

Good.

I also tried the executable on another Windows VM and works without any problems.

Good.

net/http.ListenAndServe(...)
C:/Program Files/Go/src/net/http/server.go:3120
main.main()
C:/Users/pc/projects/testProject/main.go:9 +0x9d fp=0xc000075f88 sp=0xc000075f50 pc=0xc854dd
runtime.main()
C:/Program Files/Go/src/runtime/proc.go:204 +0x209 fp=0xc000075fe0 sp=0xc000075f88 pc=0xa9b409

The stack trace you posted says that your program is running net/http.ListenAndServe, but your original issue https://github.com/golang/go/issues/46125#issue-890178458 does not mention net/http.ListenAndServe.
I need complete source code to be able to reproduce your problem. So, please, provide your program source and version of go that use. And do not use go run - just run your program directly. Less things to go wrong. Just do these commands
type main.go
go version
go build -o test.exe
set GOTRACEBACK=crash
test

and provide complete output of these commands.
Thank you.
Alex

Sorry for the delay, I can't investigate more this problem because it is on my colleague's machine.
I'm closing the issue for the moment.
If we find time/situation to do some more testing I'll reopen this.
Thanks for your help.
Alberto


fix(typings): fieldNormWeight is optional

FYI you may be interested in built-in Partial type to automatically flag all properties to be optional.

Ups, duplicate of #648


[New feature testing] Magic link

Is your suggestion a test requirement/change or improvements of the test framework? Please describe.
Required to test new feature magic link
Describe the solution you would prefer

[ ] Create test plan
[ ] Add configurations
[ ] Execute test
[ ] Result analysing and issue reporting

Optional Fields
Additional context

Related Issues:

Test plan - https://docs.google.com/spreadsheets/d/1pqm0tB6OOBmHTlgj0ynvmLHgiewGzz5P8oJGMKERCIw/edit?usp=sharing

1st round of testing is completed and issue observed as below,
L1
Magic link option is not available on Console
L2
Improve the UI of magic link notifications
Different behaviours can be see for links that are invalid on Magic link
Incorrect behaviour when login with user who doesn't have email


value internal and internal value both show warnings

Could you elaborate? What is the expected? Which one is the wrong one? Which version of detekt are you using?

1.18.1. I think value internal is incorrect because that's what IntelliJ shows the warning for. Also internal value just sounds more correct.

If the warning (top screenshot) is from detekt IntelliJ plugin, it's because the plugin hasn't updated its dependencies in a while and is using 1.17.1 internally which doesn't recognise value in the ModifierOrder rule.
This should be fixed with the next IntelliJ plugin update.

This should be fixed with the next IntelliJ plugin update.

That is coming soon 👍 https://github.com/detekt/detekt-intellij-plugin/pull/133

This should be fixed by release 1.18.1 of detekt-intellij-plugin
Please reopen if that's not the case or if there's something else to this issue, thanks!


Some assigned shortcuts wont work sometimes

Microsoft PowerToys version
0.82.1
Installation method
Microsoft Store
Running as admin
Yes
Area(s) with issue?
Keyboard Manager
Steps to reproduce

These are my shortcuts. I use them on a Turkish q keyboard, for more easily typing python syntax. However, some shortcuts stopped working (to be exact, ctrl p u m n). I then restarted the app in administrator mode and one of these not working shortcuts worked (ctrl u) but only for a couple of minutes then broke again.  (as a side note: alt gr e and v are used as up and down but wont work continuosly like ctrl k and j. They only work for once then start typing e/v continuosly)
Here is the photo of a Turkish q keyboard if it'll help:

✔ Expected Behavior
Shortcuts are supposed to work
❌ Actual Behavior
Not working
Other Software
No response

Update: now discovered (atleast ctrl u) stops and starts working again randomly

New update: They all work if I do ctrl ı o h   in any order + ctrl j and k seem to not work if switch between them fastly

Didnt get help; closed powertoys keyboard manager. Switched to autohotkey dash instead.

Closing


Timetravel in redux devtools does not work

Version
react-router: 4.0.0
react-router-redux: 5.0.0-alpha.3
Test Case
http://jsbin.com/pibofis/edit?html,js,output
(Open output in new tab to see url changes)
Steps to reproduce

Open redux devtool extension in chrome devtools
Use navigation a few times
Jump back to any previous action in redux devtools

Expected Behavior
Browser url will be updated/reseted and router renders the corresponding component
Actual Behavior
Nothing happens

See #4717. It's not yet "fixed". 😉

ah, I just searched over the issues and can't find any matching…


May I get the data?

May I get the data and the csv file ? Thank you very much!

Up, im looking for data and csv too


adressable streams

Hi,
This is very cool! Would it be hard to make it so many streams can be hosted on the same port? I.e. that I can specify from the client which of many streams I want? In our case there are easily 100 streams to choose from, and to set up separate ports for each (which would need maintenance in proxies and/or firewalls) would be quite burdensome. Also not afraid to get my hands dirty and helpt

there is a PR implementing this (in a bit of a manual way) here
https://github.com/kyriesent/node-rtsp-stream/pull/75/


Move Timeline Keyframe Control Points Together

The user should be able to move the control points of keyframes together.
If the user is dragging the controlPointRight of a keyframe, the controlPointRight of all selected keyframes should move according to the same move vector. The same goes for controlPointLeft.
The opposite control points should follow reflectControlPoints. This is determined on an individual keyframe basis rather than "all the keyframes being moved" basis. If the user toggles the reflectControlPoints via option move, each individual keyframe should be toggled.

Closed by #17


Display available moves and last moves

Show last moves on the board
Show available moves for a piece when hovering over the square it is on.

thanks for your contribution!


Incorrect information on ImageMaximumGCAge feature gate

This is a Bug Report
Problem:

To configure the setting, enable the ImageMaximumGCAge feature gate for the kubelet, and also set a value for the imageMaximumGCAge field in the kubelet configuration file.

As this ImageMaximumGCAge fature gate moved to beta state from k8s release v1.20, user doesn't required to enable it. It is enable by default and set a value.
Proposed Solution:
Update document with correct information(enables by default).
Page to Update:
https://kubernetes.io/docs/concepts/architecture/garbage-collection/#image-maximum-age-gc

/assign

/triage accepted


Avoid WRITE_READY loop

Since we use one socket for all QUIC connections (all QUICNetVCs share the socket), we cannot notify WRITE_READY appropriately. Currently we have a hack for this issue which reschedule WRITE_READY at the end of event handler.
connect+bind (#4702) is suggested as a solution, but it's just one of suggestions we have.
We should link all information from here, and explore and discuss how we fix it on this issue.

Over 2 years ago we discussed this, and a solution was suggested but unfortunately I don't remember the detail. https://github.com/apache/trafficserver/issues/2558

From Slack:

Consensus at Beijing (@scw00 @masaori335 and @maskit )
Stick with the solution suggested by @scw00. Detail is in the screenshot above.


The string 'Deleted blobs will permanently deleted' displays in the delete dialog when soft deleting one ADLS Gen2 blob snapshot

Storage Explorer Version: 1.21.0
Build Number: 20210901.7
Branch: rel/1.21.0
Platform/OS: Windows 10/Linux Ubuntu 18.04/MacOS Big Sur 11.4
Architecture: ia32\x64
How Found: From running test cases
Regression From: Not a regression
Steps to Reproduce

Launch Storage Explorer -> Open 'Settings -> Services'.
Check both settings 'Enable ADLS Gen2 soft delete (Preview)' and 'Enable ADLS Gen2 snapshots (Preview)' are enabled. (If not, update the two settings then restart the Storage Explorer)
Expand one ADLS Gen2 storage account which is enrolled in the snapshots preview.
Right click the 'Blob Containers' node -> Enable the soft delete policy (set retention days to 7).
Create a blob container -> Upload one blob -> Create a snapshot for the blob.
Switch to the snapshot view -> Try to delete the snapshot.
Observe the content in the Delete dialog -> Check whether display 'Deleted blobs will be retained for 7 days'.

Expected Experience
Display 'Deleted blobs will be retained for 7 days'.
The screenshot of deleting the blob:

Actual Experience
Display 'Deleted blobs will permanently deleted'.

Additional Context

Display the below delete dialog when configuring soft delete policy to disabled:

This issue also reproduces when clicking the 'Enable Soft Delete' button to enable the soft delete.

Let's not show the "enable" button when deleting snapshots.

So far yes, it is still under development.


Add pop-up confirmation for deletion and modify robot tests accordingly

:warning: Please install the  to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.


feat(README): add info about SQRL compatibility target

Some changes to the SQRL protocol happened recently (sometime Jan-Feb?) that forces all clients to upgrade. And such changes might happen again.
It would be awesome if the README could somehow clarify its compatibility level.
Maybe the SQRL protocol has some kind of version numbers?

I implemented this in 2017 based on the completely out of date info on the GRC SQRL page, https://www.grc.com/sqrl/sqrl.htm and its sub-pages. That page still shows 2015 as its last update. Do you know where current, complete protocol documentation is, aside from trying to glean it from threads on a newsgroup server?

Partly, yes - PR submitted to remove outdated links. The sqrl main page now only links to 4 documents, and anything missing or not clear there has to be figured out through the users and implementers forum: https://sqrl.grc.com/


import lodash functions as modules instead of the whole package

@ozsay
Maybe also remove lodash from package.json and replace with something like this: https://www.npmjs.com/package/lodash.isstring ? it won't require to use tree shaking.

I think using lodash/:function doesn't require tree shaking.

Closed as this was done on the typescript migration.


refactor(localforage): unify the handling of the driver import code

It reduces the number of return's, resolve's and self._extend's in the code.
Uses a promise to abstract the driver import and unify how loaded driver object is handled.
Follows the same pattern used by localstorage and websql drivers to import the serializer.

It should also make it easier for us to introduce more module loaders.
Moreover, we will need less refactoring in case (at some point) we move to es6 modules with a programmatic import API (lets say system.import for example).

Oh, much nicer! :+1:


CSGO server won't start.

I want to host a csgo legacy server when I hit start it says " Application State: Unable to run"
When I check logs it says:
[17:47:51] [Core Activity]        : Authentication attempt for user admin from <IP_ADDRESS>
[17:47:51] [Core Activity]        : Authentication success
[17:47:55] [API:admin Activity]   : Starting the application.
[17:47:55] [RCON:admin Info]      : Source RCON disconnecting...
[17:47:55] [RCON:admin Error]     : Source RCON failed to disconnect:
Object reference not set to an instance of an object
[17:47:55] [Core:admin Error]     : NullReferenceException
[17:47:55] [Core:admin Error]     : [0] (NullReferenceException) : Object reference not set to an instance of an object
[17:47:55] [Core:admin Error]     :   at RCONPlugin.SourceRconClient.Disconnect ()
[17:47:55] [srcds:admin Warning]  : Server failed to start 8/5 times...
[17:47:55] [srcds:admin Warning]  : Server failed to start 5 times, not restarting.

Go to File Manager and delete 740/bin/libgcc_s.so.1 and it should work.


Code completion does not work with native edit

Hi,
I am using Intellij Idea Ultimate (2023.3.2) with Jbang plugin (0.24.4) and jbang (0.114.0). When I do this steps:
jbang init -t cli dkman.java
jbang edit --open=idea dkman.java

IDE opens the project, but code completion provides classes only from JDK, not from dependencies (picocli, etc).
It works if I use -b option in edit.

Does Right click in the source file editor give a synchronize jbang option?

@maxandersen yes, it gives me that option. When I run it I get:

But classes from //DEPS dependencies are not suggested for completion.

IntelliJ requires the file is in a directory marked as sources. You can right click it's parent and add as sources.
Let's see if it's that.

thanks @maxandersen, it works now.

Cool. Thanks to confirm.
Really should find a way to inform users or even better have it "just work"


Create jenkins-trigger

DO NOT MERGE

Can one of the admins verify this patch?

Could one of the committers please verify this patch?

ok to test

@ryjones Hello Ry. Trigger works well. Thank you


Unknown policy, "basicauth" After Following Instructions

I tried to follow the instructions at:
https://www.npmjs.com/package/sails-auth
But when I tried to sails lift after following all of those steps the command failed, with the following error:
error: Unknown policy, "basicauth", referenced in `config.policies`.
error: Are you sure that policy exists?
error: It would be located at: `C:\Users\Me\WebstormProjects\proj\testProj\api\policies/basicauth.js`

Any ideas what I might have done wrong?

@machineghost I just set up an example project to test it, and it worked fine.  I'm using osx, sails version 0.12.0-rc3.
What does your api/policies/ folder look like?

/**

sessionAuth

@module      :: Policy
@description :: Simple policy to allow any authenticated user

            Assumes that your login action in one of your controllers sets `req.session.authenticated = true;`

@docs        :: http://sailsjs.org/#!/documentation/concepts/Policies

*/
module.exports = function(req, res, next) {
// User is allowed, proceed to the next policy,
// or if this is the last policy, the controller
if (req.session.authenticated) {
return next();
}
// User is not allowed
// (default res.forbidden() behavior can be overridden in config/403.js)
return res.forbidden('You are not permitted to perform this action.');
};
module.exports = function(req, res, next) {
// User is allowed, proceed to the next policy,
// or if this is the last policy, the controller
if (req.session.authenticated) {
return next();
}
// User is not allowed
// (default res.forbidden() behavior can be overridden in config/403.js)
return res.forbidden('You are not permitted to perform this action.');
};

which version of sails-permissions do you have installed?  if it is in the 1.3 or 1.4 range i would expect more files than that there.  i would try re-installing sails permissions in that case.  what does your .sailsrc file look like?

Re-installing sails-permissions fixed things!  Thanks for the help.

Re-installing didn't help.
Tried:
Windows 8.1 x64
Sails 0.11.0 + Node 0.12.6 + Npm 2.11.2 + Sails Permissions 2.0.3 + Sails Auth 2.0.0-alpha2
Linux Mint 17.1 x64
Sails 0.11.0 +  Node 0.10.37 + Npm 1.4.28 + Sails Permissions 2.0.3 + Sails Auth 2.0.0-alpha2

Tested again on linux mint 17.1 with newest node  v0.12.7 and npm 2.11.3 and it still does not work.
Steps (all as root, I lost patience):

downloaded newest node and unpacked to /opt/node...
set symlinks for node and npm so i can call them from terminal
npm install -g sails
sails new testPerm
cd testPerm
npm install sails-permissions sails-auth --save
added "permissions-api": "sails-permissions/generator" to .sailsrc
sails generate permissions-api

No policies, no models etc are under the API folder
Does it really work for anybody?

Yes @ronky
There is a problem with version 2.x with sails-permissions
Follow the steps but change sails-permissions with below line
npm install<EMAIL_ADDRESS>sails-auth --save
There is a version problem, expected should work with 1.4.2 version.

+1
See also #139

/generator.js has probably missing parameters. Someone can fix that ?

/generator.js has probably missing parameters. Someone can fix that ?

I'm having this same problem with v2+ downgrading to 1.4.5 seems to be a current quick-fix.

Okay so the problem seems to be version 2+ specific.
This commit removed a lot files from the /generator.js top level file.
The thing is I'm not 100% sure the reasoning behind the changes. Perhaps there are new ways of generating files that is meant to work in version 0.12+ (I'm using 0.11) for NodeJS 4.2.1 support. While SailsJS is great in areas, I'm not sure on the roadmap and where things are heading (or what feature new versions are bringing to the table).
If anyone could point me in the right direction. I'd love to contribute a solution whether it's documentation on why things are being done the way they are, or a fix to ensure files are properly generated once more.

+1 node 4.1.1, sails 0.11.2, sals-permissions 2.1.7. No policy files are being generated. Is anyone working on this?

The following is what works for me.
"sails": "~0.11.0",
"sails-auth": "^1.3.1",
"sails-permissions": "^1.4.5"
It looks like marlinspike was not fully impmented in the commit mention above by @ifiokjr as a replacement for the current method.
You should be able to uncommit the lines from that commit for the generator.js. Or finish the implmention of marlinspike. I recommend finishing the implmention.

I guess it will not be necessary to generate all these files with the next version of sails. The version 2 is probably ahead and should work this sails master branch.

I also tried to complete some parts of it, but found ES6 script inside some modules. However, the problem with ES6 in nodejs still exists:
https://nodejs.org/en/docs/es6/

Thanks @AlexisNo
My sails configuration works well. The configuration is as follows:
"sails": "~0.12.0-rc3",
"sails-auth": "~2.1.1",
"sails-disk": "~0.10.7",
"sails-mongo": "^0.11.4",
"sails-permissions": "~2.1.8"

@ParanormalCoder I tried with that config on a new project, and it's not working for me.

@GeekLad , thanks for feedback.
Well, you should have the same version of sails installed globally. So let's do the following:
1- [type in console] sudo npm uninstall sails -g
2- [type in console] sudo npm install git://github.com/balderdashy/sails.git#master -g
3- Create your sails project, e.g. sail new mysails
4- add the following to your package.json file:
"sails-auth": "~2.1.1",
"sails-permissions": "~2.1.11",
5- follow the instruction on https://github.com/tjwebb/sails-permissions
6- if you miss installing any other modules (like lodash...), just install them

@ParanormalCoder, sorry to say you, but your solution does not work.
I have a clean installation from sails and the files are not created in the folder. If I change the versión of the sails-permissions, all is working perfectly. I have the last version of sails installed.
Regards

i have latest stable version sails 0.11.3, node 4.2.3 installed and its still not working. One thing i noticed is when we do:
npm install sails-permissions --save
it installs sails-auth 2.1.1, but if we do:
npm install sails-auth --save
it installs sails-auth 1.3.1
Don't know why this is happening.
This is very disappointing, i am trying to resolve it the whole day but no success

@yadavji83 : Well, I've explained how to solve everything, step by step, in my previous/above post. Please read it!

Yes i did that! I already had the latest version but still uninstalled it and followed you, but same error. Also i found some more issues, i posted this in chat window also:
i found that everywhere in your module you are assuming that sails-permissions is installed directly in the app directory, but this is not the case with my windows system. Its installed in npm-modules
npm-modules folder
so in sailsrc file it should be: "permissions-api": "node_modules/sails-permissions/generator"
in permissions.js file it should be: var _super = require('../node_modules/sails-permissions/config/permissions');
i dont know if there are more issues coz i am still unable to make it work for me

@yadavji83
Well, the sails-permissions does the loading automatically. Can you please share the "dependencies" section of your app's package.json?

"basicauth": "0.0.1",
"ejs": "~0.8.4",
"grunt": "0.4.2",
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-coffee": "~0.10.1",
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-copy": "~0.5.0",
"grunt-contrib-cssmin": "~0.9.0",
"grunt-contrib-jst": "~0.6.0",
"grunt-contrib-less": "0.11.1",
"grunt-contrib-uglify": "~0.4.0",
"grunt-contrib-watch": "~0.5.3",
"grunt-sails-linker": "~0.9.5",
"grunt-sync": "~0.0.4",
"include-all": "~0.1.3",
"rc": "~0.5.0",
"sails": "~0.11.3",
"sails-auth": "^1.3.1",
"sails-disk": "~0.10.0",
"sails-mysql": "^0.11.2",
"sails-permissions": "^2.1.11"

I am quite sure that this has something to do with path because when i coped the policy files from sails-permission/api/policies folder to my app/api/policies folder the policy error resolved, but then it gives: cannot find modules fnv-plus: so i installed it and this error went off.
sails is not finding the dependencies of sails-permissions in its folder rather its finding it in my app folder itself.

@yadavji83 : You haven't done the 7 listed steps in my above instruction correctly! (postdate: 14 days ago)
your sails-permissions is OK, but the sails-auth is not ver. 2.1.1.

So, these are the few issues I see!
So, try to read and follow that instruction carefully, step by step, again!

Awwwwww!!
A big thanks to @ParanormalCoder for your swift reply and patience. I know what you are thinking :)

Also forgot to mention it will work with sails0.11 but you MUST change the sails-auth to v2.1.1 as @ParanormalCoder  metioned.

No its not working with sails0.11, many bugs come after you start using it, you should stick to the latest 0.12.0-rc3


Addition of Data-id selection

Description
SPA's, when configured to have component based classes, can contain an ever changing DOM with uniquely qualified class names. The motivation for this PR is to allow users to define a data-id attribute on their pages and move forward with selecting based on those vs classes.
Closes #29

Type of change
Please delete options that are not relevant.

[x] New feature (non-breaking change which adds functionality)

How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
Checklist:

[x] My code follows the style guidelines of this project. npm run lint passes with no errors.
[x] I have made corresponding changes to the documentation
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes. npm run test passes with no errors.

@petrogad looked at the code. Three things

Tests are failing because for some reason chrome.storage.local is not undefined when using Puppeteer with Chromium. This is called in the content-script based in  your new code. Weird issue and I'll file a bug on the Puppeteer repo.
hasAttribute is not always available on every target element. Result is an error:

Uncaught TypeError: e.target.hasAttribute is not a function

Please check if the property is there before calling it.

Please don't bump the version yet. I'll package in more new stuff and bug fixes before bumping to 0.5.0

If we you can make changes 2 and 3, I'll go after 1 because it's a broader thing. I expect we want more code recorder settings later and we'll have to test that.

report https://github.com/GoogleChrome/puppeteer/issues/3415

Excellent, Thank you @tnolet. I'll make those changes right now.
Cheers!


this commit cause some interactive marker not working

this commit may be cause something wrong, https://github.com/ros-visualization/rviz/commit/73ad3e122283b2a8cbd116bda0b2ccf63c3b03e7,
after I update rviz ,some interactive markers not working, even official tutorial e.g https://github.com/ros-visualization/visualization_tutorials.

Indeed this breaks interactive markers of MoveIt! as well. Previously, rviz was sloppy about unnormalized unit quaternions. Now it rejects those markers. It would be nice to have a smooth transition phase, where a warning is generated, the quaternion is normalized and processed anyway.

Actually, the offending PR is #1167.

thanks for quick response :)

Closing this assuming the issue was actually fixed by now. Please comment if that's not the case.


Integrate axe into build process

At a minimum, for the front end, and probably for the backend too.

Svelte gave us some of this linting for free.


[AIRFLOW-3049] Add extra operations for Mongo hook

Make sure you have checked all steps below.
Jira

[X] My PR addresses the following Airflow Jira issues and references them in the PR title. For example, "[AIRFLOW-XXX] My Airflow PR"

https://issues.apache.org/jira/browse/AIRFLOW-3049

Description

[X] Here are some details about my PR, including screenshots of any UI changes:

This PR adds six extra operations to the Mongo hook: update, replace and delete as well as a *_many version for each of those.
Tests

[X] My PR adds the following unit tests OR does not need testing for this extremely good reason:

test_update_one
test_update_one_with_upsert
test_update_many
test_update_many_with_upsert
test_replace_one
test_replace_one_with_filter
test_replace_one_with_upsert
test_replace_many
test_replace_many_with_upsert
test_delete_one
test_delete_many

Commits

[X] My commits all reference Jira issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":

Subject is separated from body by a blank line
Subject is limited to 50 characters (not including Jira issue reference)
Subject does not end with a period
Subject uses the imperative mood ("add", not "adding")
Body wraps at 72 characters
Body explains "what" and "why", not "how"

Documentation

[X] In case of new functionality, my PR adds documentation that describes how to use it.

When adding new operators/hooks/sensors, the autoclass documentation generation needs to be added.

Code Quality

[X] Passes git diff upstream/master -u -- "*.py" | flake8 --diff

@Fokko thanks for the feedback. I've updated the parameter name and added tweaks to the documentation.

LGTM, one minor think. Recently we've moved to a Docker-compose based CI pipeline. Instead of mocking the requests, there is also a real mongo instance running. What are your opinions on mocking, or talking to a real mongo instance?

@Fokko Thanks!
Regarding mocking vs real instance, I'm not sure I'm in the best position to answer that since I basically just built this PR upon the pre-existing setup, so I cannot say why mongomock was originally chosen.
But it looks like a pretty good library for this kind of thing, and since Travis is already taking a very long time to run, I assume mocking speeds thing up a bit in this case. I don't know how much that matters, but at least from my perspective, it feels like mocking is an ok thing to do 🙂
Perhaps the original author @andscoop has a better opinion than mine?

@dlebech @Fokko When I was originally writing unit tests, I don't believe that we were using docker-compose, or if we were I was not aware of it. I'm not familiar with all the reasons for moving to docker-compose, but idk if I see a compelling reason to move away from mocking the responses in the hook as all responses are known before hand.

@Fokko is this ready to merge?

Thanks, @dlebech. Merging to master!


Add 'camera' for gene set testing?

what set of gene sets to use?  MSigDB?
link to Ensembl identifiers (MSigDB has Entrez ids)
how to integrate with existing BioC annotation packages

Add the camera code to the edgeR_dge.Rmd and add a parameter "run_camera" to the config.yaml that determines if the camera part should be run.

Merged https://github.com/csoneson/ARMOR/pull/53


django.db.utils.ProgrammingError: relation "accounts_account" does not exist LINE 1: DELETE FROM "accounts_account"

So I decided that since setting up a CV isn't going so well, I could try setting up a bank instead. I made a new DB in postgresql, as I had postgresql left over from the validator, and updated the engine and info and stuff in the settings of the file. After running, I get this:
root@voy4ge:/Bank# python3 manage.py initialize_test_bank -ip <IP_ADDRESS>
Installing fixture data...
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
psycopg2.errors.UndefinedTable: relation "accounts_account" does not exist
LINE 1: DELETE FROM "accounts_account"
                    ^

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "manage.py", line 23, in <module>
    main()
  File "manage.py", line 19, in main
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 395, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.7/site-packages/django/core/management/base.py", line 330, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.7/site-packages/django/core/management/base.py", line 371, in execute
    output = self.handle(*args, **options)
  File "/Bank/v1/self_configurations/management/commands/initialize_test_bank.py", line 55, in handle
    self.install_fixture_data()
  File "/Bank/v1/self_configurations/management/commands/initialize_test_bank.py", line 71, in install_fixture_data
    Account.objects.all().delete()
  File "/usr/local/lib/python3.7/site-packages/django/db/models/query.py", line 747, in delete
    deleted, _rows_count = collector.delete()
  File "/usr/local/lib/python3.7/site-packages/django/db/models/deletion.py", line 410, in delete
    count = qs._raw_delete(using=self.using)
  File "/usr/local/lib/python3.7/site-packages/django/db/models/query.py", line 763, in _raw_delete
    cursor = query.get_compiler(using).execute_sql(CURSOR)
  File "/usr/local/lib/python3.7/site-packages/django/db/models/sql/compiler.py", line 1156, in execute_sql
    cursor.execute(sql, params)
  File "/usr/local/lib/python3.7/site-packages/django/db/backends/utils.py", line 98, in execute
    return super().execute(sql, params)
  File "/usr/local/lib/python3.7/site-packages/django/db/backends/utils.py", line 66, in execute
    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
  File "/usr/local/lib/python3.7/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
    return executor(sql, params, many, context)
  File "/usr/local/lib/python3.7/site-packages/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
  File "/usr/local/lib/python3.7/site-packages/django/db/utils.py", line 90, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/usr/local/lib/python3.7/site-packages/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
django.db.utils.ProgrammingError: relation "accounts_account" does not exist
LINE 1: DELETE FROM "accounts_account"

Note: I did this because SQLite was having trouble as well so I wanted to just recycle PostgreSQL
I am sorry for the noob posts on both here and the validator github, I just want to contribute to the network and get involved and since there is no other good place for discussions about this (as far as I can tell) like a discord server, I have to come to the github pages to ask for help by posting an issue... Sorry.

Nvm I found the deployment guide, my bad.

what was the solution

?

?

ikr
hate when people dont post the solution


python311Packages.solax: 0.3.3 -> 3.0.5

Changelog: https://github.com/squishykid/solax/releases/tag/v3.0.5
Description of changes

Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Result of nixpkgs-review pr 294136 run on x86_64-linux 1

5 packages built:

home-assistant-component-tests.solax
python311Packages.solax
python311Packages.solax.dist
python312Packages.solax
python312Packages.solax.dist


Fix BSP regressions and improved resource file handling

Fix some BSP regression and some improvements

[x] Restore proper streams handling; currently mill --bsp is dumping all output on STDERR which is very noisy
[x] Better handling of the resource file

While testing this locally, I hit #2419

@lihaoyi I addressed your review comments and am currently in the process of rebasing/merging to latest main, which is a pita.


Python interpreter inside a docker container

VSCode Version: 1.7.2
OS Version: Windows 10

Steps to Reproduce:

How use python interpreter inside a docker container?

This depends on what the extensions you use provide. There is no out of the box support. If you use Don's extension, you can discuss with him here: https://github.com/DonJayamanne/pythonVSCode.


Reading metadata using Python?

It's currently unclear how to do this. No effort has been made to test it. It seems quite likely that any metadata encoded using JSON would work, but we should actually show that.  It is anyone's guess for the other encoding methods, as it's unclear that we can predict the layout.

To do this:

We need to add "set schema" functions.
Figure out how to do some kind of external test
that runs a binary and outputs a trees file
containing metadata
Add Python-based CI to the tests.
For sanity, we can do this for Linux only.

#294 had some progress on this.  But what's missing is a rusty way of managing the schema. We have to put more thought into this.

This crate seems helpful re: schema stuff.

jsonschema may also be helpful.

Working example of schema validation:
use serde_json::json;

#[derive(serde::Serialize, serde::Deserialize, Debug)]
struct Fwdpy11TopLevelMetadata {
    generation: u32,
    model_params: Option<String>,
    seed: Option<u32>,
    demes_graph: Option<String>,
    // Note: without this, we need to encode
    // null as one of the optional valid values.
    #[serde(skip_serializing_if = "Option::is_none")]
    data: Option<String>,
}

fn main() {
    // NOTE: the 'data' field doesn't specify null
    // and the field is one of many not "required".
    // Without extra work, we get error when None
    // serializes to NULL
    let fwdpy11_individual_metadata: serde_json::Value = json!(
        {
            "codec": "json",
            "title": "Top-level metadata for table collection/tree sequence.",
            "type": "object",
            "properties": {
                "generation": {
                    "type": "integer",
                    "description": "The value of pop.generation at the time data were exported to tskit",
                },
                "model_params": {
                    "type": ["string", "null"],
                    "description": "One or more fwdpy11.ModelParams instances.",
                },
                "seed": {
                    "type": ["integer", "null"],
                    "description": "Random number seed.",
                },
                "demes_graph": {
                    "type": ["string", "null"],
                    "description": "A demographic model specified using demes.",
                },
                "data": {
                    "type": ["string", "object"],
                    "description": "This field is reserved for the user to fill.",
                },
            },
            "required": ["generation"],
        }
    );
    let cfg = jsonschema_valid::Config::from_schema(
        &fwdpy11_individual_metadata,
        Some(jsonschema_valid::schemas::Draft::Draft7),
    )
    .unwrap();
    assert!(cfg.validate_schema().is_ok());

    let md = Fwdpy11TopLevelMetadata {
        generation: 0,
        model_params: Some("".to_string()),
        seed: Some(0),
        demes_graph: Some("".to_string()),
        data: Some("".to_string()),
    };
    let data = serde_json::to_string(&md).unwrap();
    let data: serde_json::Value = serde_json::from_str(&data).unwrap();
    println!("{data:?}");
    assert!(cfg.validate(&data).is_ok());

    let md = Fwdpy11TopLevelMetadata {
        generation: 101,
        model_params: None,
        seed: None,
        demes_graph: None,
        data: None,
    };
    let data = serde_json::to_string(&md).unwrap();
    let data: serde_json::Value = serde_json::from_str(&data).unwrap();
    println!("{data:?}");
    //assert!(cfg.validate(&data).is_ok());
    if let Err(errors) = cfg.validate(&data) {
        for error in errors {
            let f = format!("{}", error);
            println!("{f}");
        }
    };

    // Try with other crate
    let compiled = jsonschema::JSONSchema::options()
        .with_draft(jsonschema::Draft::Draft7)
        .compile(&fwdpy11_individual_metadata)
        .expect("A valid schema");
    let result = compiled.validate(&data);
    if let Err(errors) = result {
    for error in errors {
        println!("Validation error: {}", error);
        println!("Instance path: {}", error.instance_path);
    }

    let md: Fwdpy11TopLevelMetadata = serde_json::from_str(&serde_json::to_string(&md).unwrap()).unwrap();
    println!("{md:?}");
}
}


Add tools to SonarCloud => Sonars

Coverage Report 🎉

Totals

Statements:
100% ( 257 / 257 )

Methods:
100% ( 68 / 68 )

Lines:
100% ( 189 / 189 )

Codecov Report
Base: 100.00% // Head: 96.61% // Decreases project coverage by -3.38% :warning:

Coverage data is based on head (252e155) compared to base (a74f992).
Patch coverage: 92.30% of modified lines in pull request are covered.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop      #17      +/-   ##
=============================================
- Coverage     100.00%   96.61%   -3.39%
+ Complexity       100       98       -2
=============================================
  Files             10       11       +1
  Lines            245      266      +21
=============================================
+ Hits             245      257      +12
- Misses             0        9       +9

Impacted Files
Coverage Δ

.php-cs-fixer.php
0.00% <0.00%> (ø)

src/Nonce.php
100.00% <ø> (ø)

src/Password.php
100.00% <ø> (ø)

src/Security.php
100.00% <ø> (ø)

src/Username.php
100.00% <ø> (ø)

src/Created.php
100.00% <100.00%> (ø)

src/Element.php
100.00% <100.00%> (ø)

src/Expires.php
100.00% <100.00%> (ø)

src/Timestamp.php
100.00% <100.00%> (ø)

src/UsernameToken.php
100.00% <100.00%> (ø)

... and 9 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

Coverage Report 🎉

Totals

Statements:
100% ( 257 / 257 )

Methods:
100% ( 68 / 68 )

Lines:
100% ( 189 / 189 )

Coverage Report 🎉

Totals

Statements:
100% ( 257 / 257 )

Methods:
100% ( 68 / 68 )

Lines:
100% ( 189 / 189 )

Coverage Report 🎉

Totals

Statements:
100% ( 257 / 257 )

Methods:
100% ( 68 / 68 )

Lines:
100% ( 189 / 189 )


Updating all dependencies to latest versions as of 2023

This PR will be the next release of bastion updating it to the latest version of all dependencies.
what

Update to Alpine 3.17
Update to OpenSSH 9.3p1
Update to Duo 2.0.0
Update to google-authenticator-libpam 1.09
Update to sudosh 0.3.0

why

Libraries are way out of date
RootCA certificates have expired in the last released version breaking curl/wget from being able to connect to many https without ignoring SSL server validation.

references

Closes #67
Closes #65

@max-lobur I removed bsd-compatible-realpath.patch in this PR. We should confirm whether or not it is needed and close https://github.com/cloudposse/bastion/issues/69.


ERROR: unable to download video data: HTTP Error 403: Forbidden

WARNING: [youtube] Y6ftPN4i6Y8: Skipping DASH manifest: ExtractorError(u'Could not download DASH manifest: HTTP Error 403: Forbidden (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.',)
WARNING: Your copy of avconv is outdated and unable to properly mux separate video and audio files, youtube-dl will download single file media. Update avconv to version 10-0 or newer to fix this.
ERROR: unable to download video data: HTTP Error 403: Forbidden
ERROR: unable to download video data: HTTP Error 403: Forbidden

Duplicate of #6451. Remove cache with youtube-dl --rm-cache-dir.


signal.decimate() introduces nasty phase-shift

The decimate() function by default adds a strong phase shift to the data, apparently because it used a single pass (low pass filter and not scipy.signal.filtfilt()
The problem has been reported earlier[1][2], and the suggested workaround is to clone-and-adapt the code of the function.
I tried this on my sample data and got satisfactory results:

May I provide a PR to modify decimate() to accept a new boolean kw-arg filtfilt to do the above?
And possibly another one, filtfilt_kws ??
[1] http://mail.scipy.org/pipermail/scipy-user/2011-April/029063.html
[2] http://scipy-user.10969.n7.nabble.com/SciPy-User-Decimate-and-filtfilt-td20183.html

+1 from me
While decimate  is up for discussion, my two cents:
The current IIR filter chosen is a type-1 Chebyshev, but with only 0.05dB allowed passband ripple. At that point, I feel it may be more advantageous use a type-2 Cheby filter, which naturally has a flat passband, and has a notch in the stopband which can be aligned with the nyquist frequency.
Alternatively, if we want to make the filtering more user-controllable, this seems like a natural place to use something the  [filt]ord functions, (like cheb2ord, ellipord, etc.) to let the user specify how steep they want the cutoff / how flat they want the passband / what kind of filter they want to use (along with some sensible defaults).

Thanks for bringing this up, I was unaware decimate introduced this phase shift.
About the keyword. I don't think there are (or will be!) any other options than lfilter or filtfilt and therefore I think a better name would be  zero_phase=True for filtfilt.
filtfilt has some keywords, and you might want to pass those as well. One solution would indeed be filtfilt_kws.
Another would be using something like mode='lfilter' or mode=filtfilt or mode=some_func. Why? While I don't expect one would use any other function than lfilter or filtfilt this method would allow you so and this way you could also add keywords through the use of functools.partial.

I agree, the power of partial() is frequently under-appreciated.
But in this case i would prefer the 1st suggestion, the a zero_phase +filtfilt_kws, because it looks simpler; for more complex situations, decimate is a small and you can easily clone and adapt.
The problem is that a 2-pass filtering needs lower-order filter-coefficients.
In my case i have found the following defaults for the n parameter to work:

filter-type
# of passes
filter-order

fir
single-pass
30

iir
single-pass
8

fir
2-pass
26

iir
2-pass
6

But i would expect more trials on this.

@e-q the cheby1 with 0.05 dB passband seems to have been chosen to match Matlab: http://nl.mathworks.com/help/signal/ref/decimate.html
Making this more configurable without complicating the API with even more keywords looks difficult. Instead of more strings or a callable, the simplest might be to just accept one of the lti subclasses or a tuple (b, a).

@ankostis a PR adding filtfilt support sounds good. zero_phase makese sense. Not 100% sure about filtfilt_kws, that makes the API a bit complex.
The problem with this function is that it's basically a two-liner:
b, a = construct_filter(n, q, kwds)
res = lowpass_filter(b, a, x, other_kwds)

Adding lots of keywords to decimate to tweak the behavior of construct_filter or lowpass_filter quickly makes decimate less usable than a reimplementation by hand.

Something like decimate(x, q, filt, axis=-1, zero_phase=False) where filt is an instance of a subclass of lti?
This would be backwards incompatible though.
Unless, the zero_phase keyword would be added, and ftype could be an instance of a subclass of lti besides the current iir and fir options.

Breaking backwards compat isn't needed I think. Adding zero_phase=False at the end, and making ftype accept signal.TransferFunction is what I meant.

I added the zero_phase keyword as well as the ability for ftype to accept an instance of lti.
Please have a look at https://gist.github.com/ba60084570d05c91e9bd
You see two versions, the one where I use b, a and the other where I use an instance of system internally. While right now it doesn't matter at all which is used, I think for in the future it's best to already use the system representation. As soon as we then have a SecondOrderSections and more functions support sos it's rather straight forward to convert.

@FRidh, I've used the code you posted for a little bit, and it seems fine to me. Why not open a PR for it?

I've taken the liberty of creating a PR based on @FRidh gist, since I want to see this happen.

Thank you for this, I just stumbled on this problem today :+1:
I would like to remark that the behaviour is quite inconsistent when using a non-zero constant signal:
from scipy.signal import decimate
import numpy as np

A = np.array([1.]*200)
print decimate(A, 20)

Returns:
[  1.56761563e-11   1.81198225e-03   1.40286212e-01   8.08457647e-01
   1.17621428e+00   9.02814439e-01   1.02701779e+00   1.00592634e+00
   9.69387837e-01   1.02763790e+00]

While Octave returns a constant size-10 vector of value 0.98855. Matlab goes a bit further: it checks that the signal length is divisible by the downsampling factor. If it is, it simply returns a slice [:q:]. Else, same as Octave.

@haudren
filtfilt is known to cause edge-effects:
https://mail.scipy.org/pipermail/scipy-user/2011-April/029063.html
We might need to add an issue for that here in the tracker.

@FRidh
There may be an incomprehension here. In the code above, I used the actual implement of signal.decimate (that use lfilt). I tried using the code proposed in the PR, that uses filtfilt and obtained a very reasonable result:
[ 0.98855104,  0.98855227,  0.98855194,  0.98855081,  0.9885514 ,
        0.98855173,  0.98855112,  0.98855203,  0.98855287,  0.98855334]

+1 for providing an option to use filtfilt in decimate.
@FRIdh wrote:

filtfilt is known to cause edge-effects:
https://mail.scipy.org/pipermail/scipy-user/2011-April/029063.html

The issue mentioned there was fixed in 2011, not long after that email.  Bug or not, it is an unavoidable fact that all filters introduce edge effects.  There are several heuristic tricks and techniques that attempt to minimize the edge effects, but these are all mathematically questionable.  For example, padding extends the signal with fictitious data.  It might make a plot look better, but a rigorous justification is, at best, handwavy.
@haudren  wrote:

Matlab goes a bit further: it checks that the signal length is divisible by the downsampling factor. If it is, it simply returns a slice [:q:].

Depending on what you are going to do with the result, that could be a bad idea.  If the input signal has frequency content above the downsampled Nyquist frequency, simply slicing the signal will result in aliasing.  It is essential to use a low-pass filter before slicing to avoid aliasing.

This issue affects FIR decimation as well, unsurprisingly. As a comparison, MATLAB uses filtfilt for IIR decimation, but a different strategy for FIR. From the MATLAB docs:

When using the FIR filter, decimate filters the input sequence in only one direction. This conserves memory and is useful for working with long sequences. In the IIR case, decimate applies the filter in forward and reverse directions using filtfilt to remove phase distortion. This in effect doubles the filter order. In both cases, the function minimizes transient effects at both ends of the signal by matching endpoint conditions.

It then cites a reference for the algorithms used:

[1] Digital Signal Processing Committee of the IEEE Acoustics, Speech, and Signal Processing Society, eds. Programs for Digital Signal Processing. New York: IEEE Press, 1979, chap. 8.

I think the memory argument is fair point; I'll see if I can track down this reference and whip something up. This could possibly be included as an extension to #5392
Just as a point of reference, here how scipy v0.16.1's  decimate does at reproducing the FIR example from the MATLAB page

This was created with
r = 13
n = np.arange(16, 366)
x = np.sin(2*np.pi*n/153.0) + np.cos(2*np.pi*n/127.0)
y = sig.decimate(x, r, 82, 'fir')

plt.plot(np.arange(len(n)), x, 'bo')
plt.stem(np.arange(len(n))[::r], y, linefmt='r-', markerfmt='ro', basefmt='k-')
plt.legend(['Original', 'Decimated'])
plt.xlabel('Sample Number')
plt.ylabel('Signal')
plt.show()


Performance improvements

Performance improvement

Improve performance,
Improved efficiency.
Added comments
deleted useless and redundant code
overall fixes

dev plz accept

oh my god he actually did it, pyson has okay code quality now. this is wild.

@OmegaGodzilla66  ACCEPT THIS


0.3.1 drops support for Zorin OS

Expected behavior
The package should function normally as it did before version 0.3.1
Actual behavior
The package refuses to function due to unsupported distro.
Steps to reproduce
Running any of deb-get's commands would function as intended but after updating to 0.3.1-1 from 0.3.0-1, it returns [!] ERROR! Zorin OS Focal is not supported because it is not derived from a supported Debian or Ubuntu release.
System information
/etc/os-release
NAME="Zorin OS"
VERSION="16.1"
ID=zorin
ID_LIKE=ubuntu
PRETTY_NAME="Zorin OS 16.1"
VERSION_ID="16"
HOME_URL="https://zorin.com/os/"
SUPPORT_URL="https://help.zorin.com/"
BUG_REPORT_URL="https://zorin.com/os/feedback/"
PRIVACY_POLICY_URL="https://zorin.com/legal/privacy/"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

/etc/lsb-release
DISTRIB_ID=Zorin
DISTRIB_RELEASE=16
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Zorin OS 16.1"

deb-get version
  [!] ERROR! Zorin OS Focal is not supported because it is not derived from a supported Debian or Ubuntu release.

deb-get update
  [!] ERROR! Zorin OS Focal is not supported because it is not derived from a supported Debian or Ubuntu release.

Linux Mint 20.3 is also affected, works with 0.3.0


Filter by kwargs

This PR changes the behaviour of the filter() to take keyword arguments instead of a dictionary, which is usually easier to type and process. A warning is shown if a dictionary is passed to the refactored filter() function as the first arg to indicate that this use is deprecated.
All tests and notebooks are refactored.

Implemented the API change with deprecation warning as suggested.
Also changed the kwargs of validate() and require_variable() to exclude_on_fail instead of exclude to prevent overlap with exclude column in the meta df when filtering.
@gidden, should be good to go!

Thanks @danielhuppmann !


Very slow performance of onChangeRegion event in GoogleMaps

Bug report
Summary
Very slow performance of onChangeRegion event in GoogleMaps. In iOS version (Apple Maps), the performance is perfect and there is no noticeable lagging or delay in event calls.
Environment info

react-native info output:
System:
    OS: macOS 10.15.7
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
    Memory: 114.21 MB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 14.9.0 - /usr/local/bin/node
    Yarn: 1.22.5 - /usr/local/bin/yarn
    npm: 6.14.7 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.0 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.3, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
    Android SDK:
      API Levels: 28, 29
      Build Tools: 28.0.3, 29.0.1, 29.0.2
      System Images: android-26 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom, android-29 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 3.4 AI-183.6<IP_ADDRESS>92245
    Xcode: 12.3/12C33 - /usr/bin/xcodebuild
  Languages:
    Java: <IP_ADDRESS> - /usr/bin/javac
    Python: 3.8.5 -<EMAIL_ADDRESS>  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1
    react-native: 0.63.4 => 0.63.4
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps to reproduce

Log the result of the call to onReegionChange every time the region changes in Android and IOS
Compare speed performance

https://user-images.githubusercontent.com/13370132/112564242-ac0e0c00-8db9-11eb-9fec-b6055ed0aa61.mov
Describe what you expected to happen:
The performance in GMaps shouldn't be so poor!
Describe what you actually happens:
Is there a way to get some sort of performancee boost for that event in GMaps? Configuring the map using other attributes?
Bare in mind that there is no marker being drawn in the map view, just a helper component to show the current location / region when dragging around the map. The setSate event is called every time onChangeRegion is called to update the current location value shown at the top
Reproducible sample code
See attached file

Looks like it's trying to run some form of animation. Please include some code...


Fix missing "async" during class transform.

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@850af5c). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master       #1   +/-   ##
=========================================
  Coverage          ?   99.65%
=========================================
  Files             ?       83
  Lines             ?     1153
  Branches          ?        0
=========================================
  Hits              ?     1149
  Misses            ?        4
  Partials          ?        0

Impacted Files
Coverage Δ

src/transform/class/PotentialMethod.js
100% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 850af5c...2da164e. Read the comment docs.


Make widget tests support for ApprovalTests

Is your feature request related to a problem? Please describe.
There is no support for generating files during widget testing and comparing them.
Describe the solution you'd like
Make support for comparing and generating files during Widget testing, expand the functionality of ApprovalTests.

Done, helped by Richard Coutts, coming in the next 1.1.0 release.
Read more: https://github.com/approvals/ApprovalTests.Dart/tree/main/packages/approval_tests_flutter


db5b0f441d4bc47bc95593c59a724be62a23851c causes issues on older nvim 0.7 builds

Hi there.
I had to update to the latest neovim nightly build to fix the error, even though I was already on nvim 0.7
This is the error emitted:
Error detected while processing /home/apoc/.config/nvim/init.lua:
E5113: Error while calling lua chunk: /home/apoc/.config/nvim/init.lua:10: Vim(lua):E5108: Error executing lua .../pack/
packer/start/onedark.nvim/lua/onedark/autocmds.lua:32: attempt to call field 'nvim_create_augroup' (a nil value)
stack traceback:
        .../pack/packer/start/onedark.nvim/lua/onedark/autocmds.lua:32: in function 'native_cmds'
        ...site/pack/packer/start/onedark.nvim/lua/onedark/util.lua:232: in function 'load'
        ...site/pack/packer/start/onedark.nvim/lua/onedark/init.lua:15: in function 'setup'
        [string ":lua"]:1: in main chunk
        [C]: in function 'nvim_exec'
        /home/apoc/.config/nvim/init.lua:10: in main chunk
stack traceback:
        [C]: in function 'nvim_exec'
        /home/apoc/.config/nvim/init.lua:10: in main chunk

This was my output of nvim --version before I updated:
NVIM v0.7.0-dev+1054-g851252f79
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/gcc-11 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -DNVIM_TS_HAS_SET_ALLOCATOR -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/runner/work/neovim/neovim/build/config -I/home/runner/work/neovim/neovim/src -I/home/runner/work/neovim/neovim/.deps/usr/include -I/usr/include -I/home/runner/work/neovim/neovim/build/src/nvim/auto -I/home/runner/work/neovim/neovim/build/include
Compiled by runner@fv-az242-530

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/share/nvim"

Run :checkhealth for more info

This is nvim --version after the update
NVIM v0.7.0-dev+1446-g18152cf6f
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/gcc-11 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -DNVIM_TS_HAS_SET_ALLOCATOR -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -Wimplicit-fallthrough -Wsuggest-attribute=pure -Wsuggest-attribute=const -Wsuggest-attribute=malloc -Wsuggest-attribute=cold -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/runner/work/neovim/neovim/build/config -I/home/runner/work/neovim/neovim/src -I/home/runner/work/neovim/neovim/.deps/usr/include -I/usr/include -I/home/runner/work/neovim/neovim/build/src/nvim/auto -I/home/runner/work/neovim/neovim/build/include
Compiled by runner@fv-az243-502

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/share/nvim"

Run :checkhealth for more info

I looked at the changes in db5b0f441d4bc47bc95593c59a724be62a23851c and this here has caught my eye:
  local autocmds = require('onedark.autocmds')
  if vim.fn.has('nvim-0.7') == 1 then
    autocmds.native_cmds(hi.config)
  else
    autocmds.viml_cmds(hi.config)
  end

(in lua/onedark/util.lua)
I suspect this check needs to be more thorough, as you can see in the version output above, not all neovim 0.7 builds seem to have the nvim_create_augroup function.
Cheers :)

I did a little digging and this might be a candidate for the api change that might have caused this, not sure though: https://github.com/neovim/neovim/commit/0f613482b389ad259dd53d893907b024a115352e

Thanks for fixing it so quickly :D


FSTSerializer : Deserialization error: java.lang.RuntimeException: read version tag -1 fieldInfo has 2

Hi,
I have added one extra field in already serialized class and this class is used as a json response but when this class is deserialized below exception is returned
FSTSerializer            : Deserialization error: java.lang.RuntimeException: read version tag -1 fieldInfo has 2
Deserialization error: java.lang.RuntimeException: read version tag 1 fieldInfo has 2
Note: 1. FST serialized version that i am using is 2.40.
2.  I tried @org.nustaq.serialization.annotations.Version(2) annotation, getting the above exception before using this annotation , getting below exception,
FSTSerializer            : Deserialization error: java.lang.RuntimeException: unable to find class for code 105
Please check above issue.

please provide a testcase + step by step instructions, also pls check with latest version, i cannot support for free like 50 releases backwards

closing - no response from submitter

Ok
On Fri, 15 Sep 2017 at 10:04 PM, moru0011<EMAIL_ADDRESS>wrote:

closing - no response from submitter
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/RuedigerMoeller/fast-serialization/issues/211#issuecomment-329833312,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMQ8nLmyapY2-SeFKI3vYtPoUHk6BLdfks5siqbOgaJpZM4O-KwL
.


FIX:  typo (retrieves -> retrieved)

@arjunmahishi : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@arjunmahishi Thanks for this typo fix.


proxy: KVM: receive shutdown command : No such file or directory

Hi
I am a new to hermitux, trying to understand it.
From https://github.com/ssrg-vt/hermitux, I ran all the command successfully except for the last one:
sudo HERMIT_ISLE=uhyve HERMIT_TUX=1 \ 	../../../hermitux-kernel/prefix/bin/proxy \ 	../../../hermitux-kernel/prefix/x86_64-hermit/extra/tests/hermitux \ 	../../../musl/prefix/lib/libc.so is-dyn
that generates
PIE detected, loading application at 0x400000
proxy: KVM: receive shutdown command
: No such file or directory
Any thing I should be worry about ?
I am running Ubuntu 18
Thanks
[ solved ]

it solved

@irenge Can you please provide the solution to this error?

I would say that KVM isn't enabled. Do you have the device /dev/kvmon your system?

No, I am yet to set it up.

@stlankes Actually, I have taken this as a project of college. So, I need to solve some issues. Can you help me start with some of them?

@stlankes Also, I wanted to know that can I introduce new issues and create a PR since there is been no change since the past 1 to 1.5 years. Let me know if I can contribute in some or the other way.

Yes, the followup project is hermitcore/rusty-hermit. Here exists currently a compiler issue hermitcore/rusty-hermit#73, we will solve it soon.

@stlankes  I am a bit confused. Is this a part of libhermit? Or this separate to it?

@stlankes I am thinking of adding some new features such as a scheduler algorithm, a virtual memory(paging). Can you open such an issue or can I open such issues.?
Or else we want to work on the issues which are on libhermit itself.

@yash982000 hermitcore/rusty-hermit and https://github.com/hermitcore/libhermit-rs are basically the continuation of hermitcore / libhermit, but the language used is now Rust instead of C. If you are open to working with Rust then I would suggest contributing to rusty-hermit, since it receives active development.
But since this is pretty off-topic from the original Issue, I suggest moving the conversation to slack.

@jschwe Sure, I have joined slack.

Do you want to add these feature in lib hermit-rs?

@stlankes We would love to try, not sure though as not so familiar with rust.


Please update to league/oauth2-client version 2

Version 2 is available now for https://github.com/thephpleague/oauth2-client/releases/tag/2.0.0

https://github.com/thephpleague/oauth2-linkedin/releases/tag/2.0.0


[UNIMORE] Added Intel Realsense support

Important: after merge fix manifest/astrial-5.15.71.xml with correct repo URL.
Changes

Updated manifest/astrial-5.15.71.xml with meta-intel-realsense sources
Added meta-intel-realsense layer to system-astrial-image.bb
Added custom PACKAGECONFIG "rsusb" for librealsense2 package

@cascimau
Ho appena pushato il fix del manifest. Ora punta al repo system.


Indexing bug for Pick with file format readers that set cell numbers

The code in avtLocateCellQuery has an incorrect assumption. It assumes that the value of "avtOriginalCellNumbers" for a given cell is the index of that cell in the original data set. So, if zone Z has "avtOriginalCellNumbers" value C, then it is assuming that zone Z was C'th entry in the vtkDataSet returned by the file format reader. This property is true when we auto-generate the avtOriginalCellNumbers array, which is what happens 99% of the time. The 1% comes because we allow file format readers to populate their own "avtOriginalCellNumbers". For example, a reader may decide that the user wants the cell number for the first entry in the vtkDataSet to be reported as "10", not "0". It doesn't happen often, but it could. This becomes a problem with the logic in avtLocateCellQuery. It overwrites the cell index with the avtOriginalCellNumber value: if (canUseCells && origCells) { int comp = origCells->GetNumberOfComponents() 1; foundElement = (int) origCells>GetComponent(foundCell, comp); } It later uses foundElement as an index into the vtkDataSet, because it sets pickAtts.SetElementNumber with foundElement and then later sets "pickedZone" as pickAtts.GetElementNumber. GetZoneCoords(ds, pickedZone); success = RetrieveNodes(ds, pickedZone); When we are retrieving values for secondary variable, this could lead to reading past the end of an array or reading the wrong data. Again, the issue is with file format readers that set up their own array, since their values may not correspond to the index of the cell in the original vtkDataSet.
-----------------------REDMINE MIGRATION-----------------------
This ticket was migrated from Redmine. As such, not all
information was able to be captured in the transition. Below is
a complete record of the original redmine ticket.
Ticket number: 1272
Status: Pending
Project: VisIt
Tracker: Bug
Priority: Normal
Subject: Indexing bug for Pick with file format readers that set cell numbers
Assigned to: -
Category: -
Target version: -
Author: Hank Childs
Start: 12/11/2012
Due date:
% Done: 0%
Estimated time:
Created: 12/11/2012 07:07 pm
Updated: 12/18/2012 07:03 pm
Likelihood: 2 - Rare
Severity: 4 - Crash / Wrong Results
Found in version: 2.6.0
Impact:
Expected Use:
OS: All
Support Group: Any
Description:
The code in avtLocateCellQuery has an incorrect assumption. It assumes that the value of "avtOriginalCellNumbers" for a given cell is the index of that cell in the original data set. So, if zone Z has "avtOriginalCellNumbers" value C, then it is assuming that zone Z was C'th entry in the vtkDataSet returned by the file format reader. This property is true when we auto-generate the avtOriginalCellNumbers array, which is what happens 99% of the time. The 1% comes because we allow file format readers to populate their own "avtOriginalCellNumbers". For example, a reader may decide that the user wants the cell number for the first entry in the vtkDataSet to be reported as "10", not "0". It doesn't happen often, but it could. This becomes a problem with the logic in avtLocateCellQuery. It overwrites the cell index with the avtOriginalCellNumber value: if (canUseCells && origCells) { int comp = origCells->GetNumberOfComponents() 1; foundElement = (int) origCells>GetComponent(foundCell, comp); } It later uses foundElement as an index into the vtkDataSet, because it sets pickAtts.SetElementNumber with foundElement and then later sets "pickedZone" as pickAtts.GetElementNumber. GetZoneCoords(ds, pickedZone); success = RetrieveNodes(ds, pickedZone); When we are retrieving values for secondary variable, this could lead to reading past the end of an array or reading the wrong data. Again, the issue is with file format readers that set up their own array, since their values may not correspond to the index of the cell in the original vtkDataSet.
Comments:
I don't think the problem lies in Pick's use of avtOriginalCellNumbers. The origination of this array was exactly so that Pick would know how to index into the vtkDataset served up by the reader. Especially after such things as Slice, where the cell numbers pick first looks at do not correspond to the original data.

@aowen87 this sounds like something that you've resolved?

I think this is still an issue, but there might be logic in there to handle this now. I do know that the pick query still does use the "cell start" provided by the database reader. Whether or not it's smart enough to revert that offset later on is not something I'm sure of...