Add Airplay 2 support - Upgrade shairport version

Add AirPlay 2 support
Description
Following https://github.com/balena-labs-projects/balena-sound/issues/607
This is an attempt to bring airplay 2 support to balena sound.
What's working ?
Current setup

a Raspberry pi 4 + hifiberry DAC, that is my current multiroom master
a raspberry pi zero w + hifiberry miniamp, that is a multiroom client

Features tested

[x] Streaming to a single client
[x] Streaming to multiple clients at once
[x] Select volume on each client

I tested all this with SOUND_MODE=standalone and SOUND_MODE=MULTI_ROOM or SOUND_MODE=MULTI_ROOM_CLIENT
Issues
I noticed even before this upgrade that my raspberry pi zero had high CPU usage, and the sound was stuttering while streaming as a multiroom client.
I was not able to properly test the sound output for this device, the stuttering persisted after the shairport's version upgrade. I am pretty sure this is a different issue, but I would be glad if other users tested on their properly working Rpi zero to ensure this is not an issue caused by these changes.
How to test it locally

Install Balena Cloud CLI
Clone my repo git clone -b feature/bring-airplay-2-support https://github.com/fabienheureux/balena-sound.git
Go to the repo directory cd balena-sound
Publish it to your fleet using the cli balena push YOUR_FLEET_NAME
Check on the dashboard that airplay is downloaded and properly restarted
Enjoy 🎉

Note to self : first try, got errors below
 airplay  warning: could not acquire a Shairport Sync native D-Bus interface "org.gnome.ShairportSync.i8" on the system bus.
 airplay  warning: could not acquire an MPRIS interface named "org.mpris.MediaPlayer2.ShairportSync.i8" on the system bus.
airplay  fatal error: Can't access NQPTP! Is it installed and running?

The current version works on my devices, I would be glad to have a review at that point 😇

Just tested this on a RasPi3 with HiFiBerry AMP2 and RasPi3 with USB DAC. Works great!

~Note to self : first try, got warnings & errors below~
airplay  warning: could not acquire a Shairport Sync native D-Bus interface "org.gnome.ShairportSync.i8" on the system bus.
airplay  warning: could not acquire an MPRIS interface named "org.mpris.MediaPlayer2.ShairportSync.i8" on the system bus.
airplay  fatal error: Can't access NQPTP! Is it installed and running?

Edit : This was fixed by starting NQPTP before shairport-sync

Wow, thanks for looking in to this!
I had a read through, it seems that the NQPTP service is already scheduled to start in the container (https://github.com/mikebrady/shairport-sync/blob/master/docker/etc/s6-overlay/s6-rc.d/03-nqptp/run), but we override this in our script ENTRYPOINT []. That still makes sense, but now we have two processes running in one container. I can see that it would function, but it would be harder to debug because the logs of the first service (NQPTP) may not make it back up without running as PID1, and when it comes to shutdown it will probably end up getting killed. Hard to predict exactly what would happen in these circumstances, but it's never ideal.
I think the easiest way, without deviating too far from how it already is built by the maintainer, would be to use supervisor (apk add supervisor). We could use s6 like they do, but I would really like to try and keep it as simple and user friendly as possible, and that's probably using Superisor. It adds a bit of weight to the image sizes, but negligible.
Here is a good guide on implementation: https://towardsdatascience.com/run-multiple-services-in-single-docker-container-using-supervisor-b2ed53e3d1c0. Do you think this is something you would be able to add in to this PR?

I also noticed it is running with #!/bin/ash. I know this isn't your addition, but as you are refactoring could you switch that to sh for us?
#!/usr/bin/env sh
/bin/sh ...

I was not clear about what was started by the container actually, without the manual start of NQPTP.
I will look into this, I am not very familiar with this kind of development (being more a web developper usually), so no problem with doing these changes 👍

I made some changes @maggie0002 but we might have an issue here.
It appears that shairport-sync can't be demonized with the default build.
See the logs below (sorry for the typo in shairpot 😅)
24.01.23 12:08:16 (+0100)  airplay  2023-01-24 11:08:16,860 INFO supervisord started with pid 7
24.01.23 12:08:17 (+0100)  airplay  2023-01-24 11:08:17,866 INFO spawned: 'nqptp' with pid 9
24.01.23 12:08:17 (+0100)  airplay  2023-01-24 11:08:17,878 INFO spawned: 'shairpot-sync' with pid 10
24.01.23 12:08:18 (+0100)  airplay  shairport-sync was built without libdaemon, so does not support daemonisation using the -d, --daemon, -j or --justDaemoniseNoPIDFile options
24.01.23 12:08:18 (+0100)  airplay  2023-01-24 11:08:18,025 INFO exited: shairpot-sync (exit status 1; not expected)
24.01.23 12:08:19 (+0100)  airplay  2023-01-24 11:08:19,030 INFO success: nqptp entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
24.01.23 12:08:19 (+0100)  airplay  2023-01-24 11:08:19,040 INFO spawned: 'shairpot-sync' with pid 11
24.01.23 12:08:19 (+0100)  airplay  shairport-sync was built without libdaemon, so does not support daemonisation using the -d, --daemon, -j or --justDaemoniseNoPIDFile options
24.01.23 12:08:19 (+0100)  airplay  2023-01-24 11:08:19,104 INFO exited: shairpot-sync (exit status 1; not expected)
24.01.23 12:08:21 (+0100)  airplay  2023-01-24 11:08:21,118 INFO spawned: 'shairpot-sync' with pid 12
24.01.23 12:08:21 (+0100)  airplay  shairport-sync was built without libdaemon, so does not support daemonisation using the -d, --daemon, -j or --justDaemoniseNoPIDFile options
24.01.23 12:08:21 (+0100)  airplay  2023-01-24 11:08:21,181 INFO exited: shairpot-sync (exit status 1; not expected)
24.01.23 12:08:24 (+0100)  airplay  2023-01-24 11:08:24,196 INFO spawned: 'shairpot-sync' with pid 13
24.01.23 12:08:24 (+0100)  airplay  shairport-sync was built without libdaemon, so does not support daemonisation using the -d, --daemon, -j or --justDaemoniseNoPIDFile options
24.01.23 12:08:24 (+0100)  airplay  2023-01-24 11:08:24,257 INFO exited: shairpot-sync (exit status 1; not expected)
24.01.23 12:08:25 (+0100)  airplay  2023-01-24 11:08:25,260 INFO gave up: shairpot-sync entered FATAL state, too many start retries too quickly

I am not clear on the best approach here.
I checked supervisor docs and it does not seem possible to run an application in the foreground, as supervisor will already be.

We could build a custom docker image based on the official one, but it would mean deviate even farer from how it is currently built by the maintainer...

Have you tried with the --with-libdaemon flag?
https://github.com/mikebrady/shairport-sync/issues/909

Or --with-dbus-interface?
https://github.com/mikebrady/shairport-sync/issues/1137

Hang on, I'm a bit confused. Looking again, I think you are going from the script to SupervisorD. But SupervisorD should be PID 1. So we could either add that in as the CMD in the Dockerfile directly and then use it to call the service. Or alternatively, have SupervisorD call the .sh script. Probably the latter is the closest to the original configuration. So it would be SupervisorD is the first thing called by the Dockerfile, not the .sh script. Then SupervisorD will call the .sh script.

Yes they are build time flags, hence the suggestion to use a custom dockerfile, but this is not an ideal setup in my opinion.
I will try to use supervisor instead of the .sh script 👍

I have try your suggestion and it works !
I rebased and am ready for a new review

To follow!

Looking solid to me, great work!
@laytonhayes, are you able to test this one for us?

@maggie0002, tested out the update with both RasPi3s, works great! I'm getting something at startup about a CRIT Supervisor, not sure where that's coming from. Here's the startup log:
airplay  2023-01-24 21:53:58,319 CRIT Supervisor is running as root.  Privileges were not dropped because no user is specified in the config file.  If you intend to run as root, you can set user=root in the config file to avoid this message.
airplay  2023-01-24 21:53:58,354 INFO supervisord started with pid 1
airplay  2023-01-24 21:53:59,365 INFO spawned: 'nqptp' with pid 8
airplay  2023-01-24 21:53:59,379 INFO spawned: 'shairport-sync' with pid 9
airplay  Starting AirPlay plugin...
airplay  Device name: HiFi
airplay  Starting Shairport Sync
airplay  Shairport-sync started. Device is discoverable as HiFi
airplay  Warning: the option -u is no longer needed and is deprecated. Debug and statistics output to STDERR is now the default. Use "--log-to-syslog" to revert.
airplay  warning: could not acquire a Shairport Sync native D-Bus interface "org.gnome.ShairportSync.i10" on the system bus.
airplay  warning: could not acquire an MPRIS interface named "org.mpris.MediaPlayer2.ShairportSync.i10" on the system bus.
airplay  2023-01-24 21:54:00,514 INFO success: nqptp entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
airplay  2023-01-24 21:54:00,515 INFO success: shairport-sync entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

This is because we added a program (supervisor) that allows to control several processes.
@maggie0002 would you be happy with me adding the user=root in supervisor config ?
Do you know if docker in balenaOS is ran in rootless mode ? I am not clear of the implication (and risks) of running supervisor as root here.

@maggie0002 would you be happy with me adding the user=root in supervisor config ?

Yep, good idea. It is running as root already, and should be, so we can add user=root to silence the message.

I have made the changes, as well in this change I removed the --use-stderr  flag as it is now the default in shairport-sync https://github.com/mikebrady/shairport-sync/blob/6240fd83707b77fe2fb2250f8136e530e36010d2/shairport.c#LL327C21-L327C21

This looks tons better, and adds a new feature! @fabienheureux, @laytonhayes, there is no way we would have been able to do this without your help, huge thanks!
@fabienheureux, this looks good to me, if you are happy with the tests and ready for me to pull the trigger and merge then say the word. 👍

Always happy to contribute !
Let's merge then 🤘


Remove hack hijacking investigation subclasses model name

now elasitcseaerch indices are manually provided which remove the need for this
hack.
This is inconveniant because this modifies routes/form generation.
I need this to be merge for the reformat overview page and make each tabs a
seperate action.

Description

Checklist:

[ ] Automated checks are passing locally.
[ ] CHANGELOG updated if change is worth telling users about.

General testing

[ ] Test without javascript
[ ] Test on small screen

Accessibility testing

[ ] Works keyboard only
[ ] Tested with one screen reader
[ ] Zoom page to 400% - content still visible
[ ] Disable css - does content make sense and appear in a logical order?
[ ] Passes automated checker (automated in build or manual)

I'm closing this - it turns out to not be totally as straight forward as it should have been. Ill create a ticket to sort this out as tech debt


flakiness in deploy action

digging deeper into the error it looks like its a simple connection timeout. We should lengthen the wait time to the maximum (maybe 30 seconds?)

Tasks: TOP => deploy:assets:rsync
(See full trace by running task with --trace)
The deploy has failed with an error: Exception while executing as ubuntu@***: rsync -av --delete  ./public/assets/ ubuntu@***:/var/www/violet/releases/20220413222925/public/assets/ exit status: 65280
rsync -av --delete  ./public/assets/ ubuntu@***:/var/www/violet/releases/20220413222925/public/assets/ stdout: Nothing written
rsync -av --delete  ./public/assets/ ubuntu@***:/var/www/violet/releases/20220413222925/public/assets/ stderr: ssh: connect to host *** port 22: Connection timed out
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(235) [sender=3.1.2]

end

possible solutions:

https://stackoverflow.com/questions/11570209/capistrano-deploy-timeout

new problem since 'fixing' (not yet confirmed) the rsync issue:
looks like we need to set an SSH timeout on the target servers (client connection keep alive or something similar)

when set in deploy/environment.rb it worked!
2022-06-29T23:11:57.8727935Z     ✔ 02 runner@localhost 163.395s
2022-06-29T23:11:57.8728960Z 02:59 deploy:assets:rsync
2022-06-29T23:11:57.8730519Z       01 rsync -av --delete --timeout 300  ./public/assets/ ubuntu@***:/var/www/violet/releases/20220629230859/public/assets/
2022-06-29T23:11:59.4574684Z       01 sending incremental file list
2022-06-29T23:11:59.4745014Z       01 ./

its getting set to 300 didnt make the deployments more consistent -- reopening


feat(example): custom colors

WIP depends on #14  (examples introduction)
Custom color examples for the 0.1.5 version
Display the following on the same page

default colors
custom font color
custom default fill and stroke colors
specific stroke and fill colors depending on the BPMN element types

Add an index.html page to navigate to all examples on the live environment.

Example rendering

Implementation notes
As for #14, I was forced to use the 0.1.5 version because the 0.1.6 is fully offuscated/shrinked/minimized which prevents to use the API with real names


NetworkPolicy egress strange behaviour.

I've got a local cluster running 1.24
clientVersion:
  buildDate: "2022-09-21T13:19:24Z"
  compiler: gc
  gitCommit: b39bf148cd654599a52e867485c02c4f9d28b312
  gitTreeState: clean
  gitVersion: v1.24.6
  goVersion: go1.18.6
  major: "1"
  minor: "24"
  platform: linux/amd64
kustomizeVersion: v4.5.4
serverVersion:
  buildDate: "2022-09-21T13:12:04Z"
  compiler: gc
  gitCommit: b39bf148cd654599a52e867485c02c4f9d28b312
  gitTreeState: clean
  gitVersion: v1.24.6
  goVersion: go1.18.6
  major: "1"
  minor: "24"
  platform: linux/amd64

I've installed Cilium 1.11.2 with the following steps:
helm repo add cilium https://helm.cilium.io/
helm repo update

helm template cilium cilium/cilium \
    --version 1.11.2 \
    --namespace kube-system \
    --set kubeProxyReplacement=strict > cilium.yaml

Adjusted CIDR on cilium.yaml
changed --cni-exclusive to false on cilium.yaml

kubectl apply -f cilium.yaml

After that I've also installed Multus to use Kubevirt with some network bridges.
Whenever I use matchLabels on my egress (can be podSelector or namespaceSelector), the rule doesn't work.
Here is an example that doesn't work:
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: allow-dns-access
  namespace: internal-services
spec:
  podSelector:
    matchLabels: {}
  policyTypes:
  - Egress
  egress:
  - to:
    - podSelector:
        matchLabels:
          k8s-app: kube-dns
    ports:
    - protocol: UDP
      port: 53

And this example works (<IP_ADDRESS> is ip of kube-dns service):
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: allow-dns-access
  namespace: internal-services
spec:
  podSelector:
    matchLabels: {}
  policyTypes:
  - Egress
  egress:
  - to:
    - ipBlock:
        cidr: <IP_ADDRESS>/32
    ports:
    - protocol: UDP
      port: 53

Any clues or tips on how to troubleshoot it?
Thanks!

Have you followed https://docs.cilium.io/en/v1.12/operations/troubleshooting/#policy-troubleshooting?

If I use the namespaceselector and podselector together, this is what I'm getting: (Note: the namespace selector confuses me here, not sure the label is ok)
          "l4": {
            "egress": [
              {
                "derived-from-rules": [
                  [
                    "k8s:io.cilium.k8s.policy.derived-from=NetworkPolicy",
                    "k8s:io.cilium.k8s.policy.name=allow-dns-access",
                    "k8s:io.cilium.k8s.policy.namespace=internal-services",
                    "k8s:io.cilium.k8s.policy.uid=1618c957-7ead-488b-bf13-28945782379b"
                  ]
                ],
                "rule": {
		  "l7-rules": [
		    {
		      "\u0026LabelSelector{MatchLabels:map[string]string{k8s.io.cilium.k8s.namespace.labels.kubernetes.io/metadata.name: kube-system,k8s.k8s-app: kube-dns,},MatchExpressions:[]LabelSelectorRequirement{},}": null
		    }
		  ],
		  "port": 53,
		  "protocol": "UDP"
		}
              }
            ],
            "ingress": []
          },
          "policy-enabled": "egress",
          "policy-revision": 5

If I use only podSelector it assumes the current namespace, as far as I can tell:
          "l4": {
            "egress": [
              {
                "derived-from-rules": [
                  [
                    "k8s:io.cilium.k8s.policy.derived-from=NetworkPolicy",
                    "k8s:io.cilium.k8s.policy.name=allow-dns-access",
                    "k8s:io.cilium.k8s.policy.namespace=internal-services",
                    "k8s:io.cilium.k8s.policy.uid=92130e06-3eec-4b93-be31-08dc3fcdc2a7"
                  ]
                ],
                "rule": {
		  "l7-rules": [
		    {
		      "\u0026LabelSelector{MatchLabels:map[string]string{k8s.io.kubernetes.pod.namespace: internal-services,k8s.k8s-app: kube-dns,},MatchExpressions:[]LabelSelectorRequirement{},}": null
		    }
		  ],
		  "port": 53,
		  "protocol": "UDP"
		}
              }
            ],
            "ingress": []
          },
          "policy-enabled": "egress",
          "policy-revision": 7

@feitnomore can you provide a sysdump of the cluster with the working policy and another sysdump with the non-working policy.

I was doing something dumb, the DNS one I think I could solve it.
Thanks @aanm


generate release and version

Signed-off-by: Lou<EMAIL_ADDRESS>

@27149chen can we delete this branch?


APEXCORE-380 - Idle time sleep time should increase from 0 to a configurable max value

@tweise Please review

@vrozov how much does this change increase the throughput?

It depends on the reservoir queue size. For the benchmark application that is configured with 32K queue size, the change leads to 6 million events per second throughput. This is almost 2x improvement compared to 4 million events per second without the change.

Another benefit of the current approach is that it is less prone to incorrect sleep time setting. I tried setting sleep time to 100 milliseconds and with the new approach, the throughput is not much affected, with the old approach, the throughput drops significantly.


Use $storagedir as default RocksDB dir

This actually failed a lot of unit tests, will revert it for now.


Add support for session mechanism

Require a session mechanism for the following reasons:

Memory and status 'garbage' collection.
Different runtime envs in different session.
Cleanup task when a session completes.

Closing as codes are merged.


[Meta] Core Library Implementation

Following tasks are required for the core library's completion:

[x] Create a basic structure for C# project
[x] Add CI/CD (through commit: https://github.com/apimatic/core-lib-csharp/commit/475490ccce921fe21d5544f53d62e144718cc40b)
[x] Addition of Authentication core structure w/ unit tests
[x] #2
[x] #4
[x] Creation of ApiCall
[x] #7
[x] Creation of Request and RequestBuilder
[x] Creation of ResponseHandler
[x] Creation of ResponseError
[x] Creation of Context
[x] #3
[x] #10
[x] #13
[x] #12
[x] #14
[x] #11

Released Core Library: https://www.nuget.org/packages/APIMatic.Core/0.1.0
ReleaseNotes: https://github.com/apimatic/core-lib-csharp/releases/tag/0.1.0
cc: @usamabintariq


Add instructions for CentOS/RHEL build from source

NOTE: I only tested on a Vagrant CentOS 7 box but the instructions should be the same for RHEL 7 also.
This is marked as "DO NOT MERGE" because there are some errors on the CentOS 7 Vagrant box I tested on. Technically, the instructions are correct and this can be merged as is but I assume other folks would encounter the same errors as I'm seeing.
To replicate exactly as I did use the following Vagrantfile (and follow instructions in the README.md in this PR):
Vagrant::DEFAULT_SERVER_URL.replace('https://vagrantcloud.com')

Vagrant.configure("2") do |config|
  config.vm.box = "centos/7"

   config.vm.provider "virtualbox" do |vb|
     vb.cpus = "2"
     vb.memory = "4096"
   end
end

Summary of errors/info:

On master HEAD: make test fails with an invalid pointer to free() but make test config=debug does not fail.
On master HEAD: ./build/release/ponyc examples/helloworld fails with an invalid pointer to free().
On version 0.21.3: make test fails with an invalid pointer to free() but make test config=debug does not fail.
On version 0.21.3: ./build/release/ponyc examples/helloworld does not fail.

For the copr based LLVM 3.9.1 install make test fails with:
*** Error in `build/release/libponyc.tests': free(): invalid pointer: 0x0000000000aacf60 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x7c619)[0x7fe4600da619]
/opt/llvm-3.9.1/lib64/libLLVM-3.9.so(_ZNSt15basic_stringbufIcSt11char_traitsIcESaIcEE8overflowEi+0x14f)[0x7fe463323a1f]
/opt/llvm-3.9.1/lib64/libLLVM-3.9.so(_ZNSt15basic_streambufIcSt11char_traitsIcEE6xsputnEPKcl+0x36)[0x7fe463338dd6]
/opt/llvm-3.9.1/lib64/libLLVM-3.9.so(_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l+0x215)[0x7fe46333ca85]
/opt/llvm-3.9.1/lib64/libLLVM-3.9.so(_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc+0x27)[0x7fe46333cd87]
build/release/libponyc.tests[0x6c56a2]
build/release/libponyc.tests(_ZN7testing8internal16BoolFromGTestEnvEPKcb+0x1c)[0x6cb2ac]
build/release/libponyc.tests[0x58dbde]
build/release/libponyc.tests(__libc_csu_init+0x4d)[0x7a44bd]
/lib64/libc.so.6(__libc_start_main+0x85)[0x7fe46007fb95]
build/release/libponyc.tests[0x58e0e4]
======= Memory map: ========
00400000-008aa000 r-xp 00000000 fd:00 1568830                            /home/vagrant/ponyc/build/release/libponyc.tests
[snipped]
7fe463fb7000-7fe46426e000 r--p 024e7000 fd:00 67147359                   /opt/llvm-3.9.1/lib64/libLLVM-3.9.somake: *** [test] Aborted
[vagrant@localhost ponyc]$

Building examples/helloworld using build/release/ponyc fails with:
[vagrant@localhost ponyc]$ ./build/release/ponyc examples/helloworld/
Building builtin -> /home/vagrant/ponyc/packages/builtin
Building examples/helloworld/ -> /home/vagrant/ponyc/examples/helloworld
Generating
*** Error in `./build/release/ponyc': free(): invalid pointer: 0x00007f158b263ee0 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x7c619)[0x7f158707e619]
./build/release/ponyc(codegen_machine+0x253)[0x4c29d3]
./build/release/ponyc[0x499535]
./build/release/ponyc(codegen+0x6c)[0x49b41c]
./build/release/ponyc(main+0x105)[0x41fec5]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7f1587023c05]
./build/release/ponyc[0x420394]
======= Memory map: ========
00400000-00541000 r-xp 00000000 fd:00 1568823                            /home/vagrant/ponyc/build/release/ponyc
[snipped]
7f158b212000-7f158b215000 rw-p 0279e000 fd:00 67147359                   /opt/llvm-3.9.1/lib64/libLLVM-3.9.so
7f158b215000-7f158b264000 rw-p 00000000 00:00 0 Aborted

For the SCL based LLVM 4.0.1 install make test fails with:
*** Error in `build/release/libponyc.tests': free(): invalid pointer: 0x0000000000aacfa0 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x7c619)[0x7f504e0bf619]
/opt/rh/llvm-toolset-7/root/usr/lib64/libLLVM-4.0.so(_ZNSt15basic_stringbufIcSt11char_traitsIcESaIcEE8overflowEi+0x14f)[0x7f505151c0cf]
/opt/rh/llvm-toolset-7/root/usr/lib64/libLLVM-4.0.so(_ZNSt15basic_streambufIcSt11char_traitsIcEE6xsputnEPKcl+0x36)[0x7f5051531486]
/opt/rh/llvm-toolset-7/root/usr/lib64/libLLVM-4.0.so(_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l+0x215)[0x7f5051535135]
/opt/rh/llvm-toolset-7/root/usr/lib64/libLLVM-4.0.so(_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc+0x27)[0x7f5051535437]
build/release/libponyc.tests[0x6c5ce2]
build/release/libponyc.tests(_ZN7testing8internal16BoolFromGTestEnvEPKcb+0x1c)[0x6cb8ec]
build/release/libponyc.tests[0x58dffe]
build/release/libponyc.tests(__libc_csu_init+0x4d)[0x7a4ced]
/lib64/libc.so.6(__libc_start_main+0x85)[0x7f504e064b95]
build/release/libponyc.tests[0x58e55c]
======= Memory map: ========
00400000-008ab000 r-xp 00000000 fd:00 67861577                           /home/vagrant/ponyc/build/release/libponyc.tests
[snipped]
7f504f8b5000-7f505205c000 r-xp 00000000 fd:00 101673654                  /opt/rh/llvm-toolset-7/root/usr/lib64/libLLVM-4.0.somake: *** [test] Aborted

Building examples/helloworld using build/release/ponyc fails with:
[vagrant@localhost ponyc]$ ./build/release/ponyc examples/helloworld/
Building builtin -> /home/vagrant/ponyc/packages/builtin
Building examples/helloworld/ -> /home/vagrant/ponyc/examples/helloworld
Generating
*** Error in `./build/release/ponyc': free(): invalid pointer: 0x00007f83bcb2af80 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x7c619)[0x7f83b865d619]
./build/release/ponyc(codegen_machine+0x323)[0x4c2523]
./build/release/ponyc[0x499905]
./build/release/ponyc(codegen+0x6c)[0x49b7ec]
./build/release/ponyc(main+0x105)[0x420245]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7f83b8602c05]
./build/release/ponyc[0x42076c]
======= Memory map: ========
00400000-00541000 r-xp 00000000 fd:00 67861574                           /home/vagrant/ponyc/build/release/ponyc
[snipped]
7f83bcacd000-7f83bcad2000 rw-p 02a7a000 fd:00 101673654                  /opt/rh/llvm-toolset-7/root/usr/lib64/libLLVM-4.0.so
7f83bcad2000-7f83bcb2b000 rw-p 00000000 00:00 0 Aborted

For the copr based LLVM 5.0.1 install make test fails with:
*** Error in `build/release/libponyc.tests': free(): invalid pointer: 0x0000000000aafda0 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x7c619)[0x7f719413e619]
/opt/llvm-5.0.1/lib64/libLLVM-5.0.so(_ZNSt15basic_stringbufIcSt11char_traitsIcESaIcEE8overflowEi+0x14f)[0x7f719792313f]
/opt/llvm-5.0.1/lib64/libLLVM-5.0.so(_ZNSt15basic_streambufIcSt11char_traitsIcEE6xsputnEPKcl+0x36)[0x7f71979277f6]
/opt/llvm-5.0.1/lib64/libLLVM-5.0.so(_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l+0x215)[0x7f719791e2a5]
/opt/llvm-5.0.1/lib64/libLLVM-5.0.so(_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc+0x27)[0x7f719791e5a7]
build/release/libponyc.tests[0x6c7de2]
build/release/libponyc.tests(_ZN7testing8internal16BoolFromGTestEnvEPKcb+0x1c)[0x6cd9ec]
build/release/libponyc.tests[0x58fdfe]
build/release/libponyc.tests(__libc_csu_init+0x4d)[0x7a6ead]
/lib64/libc.so.6(__libc_start_main+0x85)[0x7f71940e3b95]
build/release/libponyc.tests[0x590330]
======= Memory map: ========
00400000-008ad000 r-xp 00000000 fd:00 34433604                           /home/vagrant/ponyc/build/release/libponyc.tests
[snipped]
7f7195932000-7f7195933000 r--p 00014000 fd:00 33566936                   /usr/lib64/libz.so.1.2.7make: *** [test] Aborted

Building examples/helloworld using build/release/ponyc fails with:
[vagrant@localhost ponyc]$ ./build/release/ponyc examples/helloworld/
Building builtin -> /home/vagrant/ponyc/packages/builtin
Building examples/helloworld/ -> /home/vagrant/ponyc/examples/helloworld
Generating
*** Error in `./build/release/ponyc': free(): invalid pointer: 0x00007f0552a1a3e0 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x7c619)[0x7f0551eb4619]
./build/release/ponyc(codegen_machine+0x338)[0x4c23f8]
./build/release/ponyc[0x499895]
./build/release/ponyc(codegen+0x6c)[0x49b72c]
./build/release/ponyc(main+0x105)[0x4201f5]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7f0551e59c05]
./build/release/ponyc[0x4206f0]
======= Memory map: ========
00400000-00541000 r-xp 00000000 fd:00 34433602                           /home/vagrant/ponyc/build/release/ponyc
[snipped]
7f0556888000-7f05568f7000 rw-p 02fde000 fd:00 101146337                  /opt/llvm-5.0.1/lib64/libLLVM-5.0.so
7f05568f7000-7f0556954000 rw-p 00000000 00:00 0 Aborted

I've done some digging into the errors. There are two distinct issues. TLDR: There seems to be some sort of symbol clash/linking issue related to libLLVM and libstdc++ when optimizations are enabled. Using -fsanitize=address for https://github.com/google/sanitizers/wiki/AddressSanitizer results in: AddressSanitizer: attempting free on address which was not malloc()-ed.
NOTE: For easier reproducibility, you can use Docker (--privileged is necessary to be able to use a debugger):
docker run -it --rm --privileged ponylang/ponyc-ci:centos7-llvm-3.9.1

Building ponyc in config=debug with -Og reproduces both of the issues and keeps debug symbols. The following command can be used:
CXXFLAGS="-Og" CFLAGS="-Og" make config=debug test

Running ./build/debug/ponyc examples/helloworld results in the following:
[root@312b42353ff7 ponyc]# ./build/debug/ponyc examples/helloworld
Building builtin -> /ponyc/packages/builtin
Building examples/helloworld -> /ponyc/examples/helloworld
Generating
*** Error in `./build/debug/ponyc': free(): invalid pointer: 0x00007fba6283cee0 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x7c619)[0x7fba5e657619]
./build/debug/ponyc(codegen_machine+0x58f)[0x48c820]
./build/debug/ponyc[0x43674c]
./build/debug/ponyc[0x43680c]
./build/debug/ponyc(codegen+0x7c)[0x438ac1]
./build/debug/ponyc(generate_passes+0xe)[0x42a605]
./build/debug/ponyc[0x421988]
./build/debug/ponyc(main+0x107)[0x421aad]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7fba5e5fcc05]
./build/debug/ponyc[0x421809]
======= Memory map: ========
00400000-00508000 r-xp 00000000 08:01 782433                             /ponyc/build/debug/ponyc
[... snipped]

The free() on the invalid pointer occurs in codegen_machine. Git bisect indicates this issue was introduced by https://github.com/ponylang/ponyc/pull/2592. From what I can tell, there is nothing wrong with the code.
After installing gdb and debug info using:
yum install gdb

debuginfo-install glibc-2.17-196.el7_4.2.x86_64 libatomic-4.8.5-16.el7_4.2.x86_64 libffi-3.0.13-18.el7.x86_64 libgcc-4.8.5-16.el7_4.2.x86_64 libstdc++-4.8.5-16.el7_4.2.x86_64 llvm-3.9.1-libs-3.9.1-7.el7.centos.alonid.x86_64 ncurses-libs-5.9-14.20130511.el7_4.x86_64 zlib-1.2.7-17.el7.x86_64

gdb shows the following in the backtrace :
[root@312b42353ff7 ponyc]# gdb ./build/debug/ponyc
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-100.el7_4.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /ponyc/build/debug/ponyc...done.
(gdb) run examples/helloworld
Starting program: /ponyc/./build/debug/ponyc examples/helloworld
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Building builtin -> /ponyc/packages/builtin
Building examples/helloworld -> /ponyc/examples/helloworld
Generating
*** Error in `/ponyc/./build/debug/ponyc': free(): invalid pointer: 0x00007ffff7ddaee0 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x7c619)[0x7ffff3bf5619]
/ponyc/./build/debug/ponyc(codegen_machine+0x58f)[0x48c820]
/ponyc/./build/debug/ponyc[0x43674c]
/ponyc/./build/debug/ponyc[0x43680c]
/ponyc/./build/debug/ponyc(codegen+0x7c)[0x438ac1]
/ponyc/./build/debug/ponyc(generate_passes+0xe)[0x42a605]
/ponyc/./build/debug/ponyc[0x421988]
/ponyc/./build/debug/ponyc(main+0x107)[0x421aad]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7ffff3b9ac05]
/ponyc/./build/debug/ponyc[0x421809]
======= Memory map: ========
00400000-00508000 r-xp 00000000 08:01 782433                             /ponyc/build/debug/ponyc
[... snipped]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]

Program received signal SIGABRT, Aborted.
0x00007ffff3bae1f7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56	  return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);
(gdb) bt
#0  0x00007ffff3bae1f7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007ffff3baf8e8 in __GI_abort () at abort.c:90
#2  0x00007ffff3bedf47 in __libc_message (do_abort=do_abort@entry=2, fmt=fmt@entry=0x7ffff3cfa608 "*** Error in `%s': %s: 0x%s ***\n")
    at ../sysdeps/unix/sysv/linux/libc_fatal.c:196
#3  0x00007ffff3bf5619 in malloc_printerr (ar_ptr=0x7ffff3f35760 <main_arena>, ptr=<optimized out>,
    str=0x7ffff3cf7cd4 "free(): invalid pointer", action=3) at malloc.c:5023
#4  _int_free (av=0x7ffff3f35760 <main_arena>, p=<optimized out>, have_lock=0) at malloc.c:3845
#5  0x000000000048c820 in _M_dispose (__a=..., this=<optimized out>) at /usr/include/c++/4.8.2/bits/basic_string.h:249
#6  ~basic_string (this=0x7fffffffdff8, __in_chrg=<optimized out>) at /usr/include/c++/4.8.2/bits/basic_string.h:539
#7  ~MCTargetOptions (this=0x7fffffffdff0, __in_chrg=<optimized out>) at /opt/llvm-3.9.1/include/llvm/MC/MCTargetOptions.h:19
#8  ~TargetOptions (this=0x7fffffffdf90, __in_chrg=<optimized out>) at /opt/llvm-3.9.1/include/llvm/Target/TargetOptions.h:92
#9  codegen_machine (target=0x7ffff7db3a40 <llvm::TheX86_64Target>, opt=opt@entry=0x7fffffffe5b0, jit=jit@entry=false)
    at src/libponyc/codegen/host.cc:45
#10 0x000000000043674c in make_machine (opt=opt@entry=0x7fffffffe5b0, jit=jit@entry=false) at src/libponyc/codegen/codegen.c:91
#11 0x000000000043680c in init_module (c=c@entry=0x7fffffffe100, program=program@entry=0x7ffff3728cc0, opt=opt@entry=0x7fffffffe5b0,
    jit=jit@entry=false) at src/libponyc/codegen/codegen.c:655
#12 0x0000000000438ac1 in codegen (program=program@entry=0x7ffff3728cc0, opt=opt@entry=0x7fffffffe5b0) at src/libponyc/codegen/codegen.c:858
#13 0x000000000042a605 in generate_passes (program=program@entry=0x7ffff3728cc0, options=options@entry=0x7fffffffe5b0)
    at src/libponyc/pass/pass.c:360
#14 0x0000000000421988 in compile_package (path=<optimized out>, opt=opt@entry=0x7fffffffe5b0, print_program_ast=<optimized out>,
    print_package_ast=<optimized out>) at src/ponyc/main.c:67
#15 0x0000000000421aad in main (argc=2, argv=0x7fffffffe768) at src/ponyc/main.c:111
(gdb)

From what I can tell, the issue has to do with the destructor for ~MCTargetOptions that is internal to LLVM and nothing do with the code in codegen_machine in ponyc. https://github.com/JuliaLang/julia/issues/19606 shows a similar issue and folks have indicated it has something to do with multiple llvm versions being used at the same time. I'm not sure how that applies to ponyc since we only use a single llvm version.

Running ./build/debug/libponyc.tests results in the following:
*** Error in `build/debug/libponyc.tests': free(): invalid pointer: 0x0000000000aacf60 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x7c619)[0x7f4ffbbd3619]
/opt/llvm-3.9.1/lib64/libLLVM-3.9.so(_ZNSt15basic_stringbufIcSt11char_traitsIcESaIcEE8overflowEi+0x14f)[0x7f4ffee1ca1f]
/opt/llvm-3.9.1/lib64/libLLVM-3.9.so(_ZNSt15basic_streambufIcSt11char_traitsIcEE6xsputnEPKcl+0x36)[0x7f4ffee31dd6]
/opt/llvm-3.9.1/lib64/libLLVM-3.9.so(_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l+0x215)[0x7f4ffee35a85]
/opt/llvm-3.9.1/lib64/libLLVM-3.9.so(_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc+0x27)[0x7f4ffee35d87]
build/debug/libponyc.tests[0x6eb194]
build/debug/libponyc.tests(_ZN7testing8internal16BoolFromGTestEnvEPKcb+0x12)[0x6eb2bd]
build/debug/libponyc.tests[0x6eb60f]
build/debug/libponyc.tests[0x6fb031]
build/debug/libponyc.tests(__libc_csu_init+0x4d)[0x794e4d]
/lib64/libc.so.6(__libc_start_main+0x85)[0x7f4ffbb78b95]
build/debug/libponyc.tests[0x564ec9]
======= Memory map: ========
00400000-008ab000 r-xp 00000000 08:01 782530                             /ponyc/build/debug/libponyc.tests
[... snipped]

gdb shows the following backtrace:
[root@312b42353ff7 ponyc]# gdb ./build/debug/libponyc.tests
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-100.el7_4.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /ponyc/build/debug/libponyc.tests...done.
(gdb) run
Starting program: /ponyc/./build/debug/libponyc.tests
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
*** Error in `/ponyc/./build/debug/libponyc.tests': free(): invalid pointer: 0x0000000000aacf60 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x7c619)[0x7ffff3bf5619]
/opt/llvm-3.9.1/lib64/libLLVM-3.9.so(_ZNSt15basic_stringbufIcSt11char_traitsIcESaIcEE8overflowEi+0x14f)[0x7ffff6e3ea1f]
/opt/llvm-3.9.1/lib64/libLLVM-3.9.so(_ZNSt15basic_streambufIcSt11char_traitsIcEE6xsputnEPKcl+0x36)[0x7ffff6e53dd6]
/opt/llvm-3.9.1/lib64/libLLVM-3.9.so(_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l+0x215)[0x7ffff6e57a85]
/opt/llvm-3.9.1/lib64/libLLVM-3.9.so(_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc+0x27)[0x7ffff6e57d87]
/ponyc/./build/debug/libponyc.tests[0x6eb194]
/ponyc/./build/debug/libponyc.tests(_ZN7testing8internal16BoolFromGTestEnvEPKcb+0x12)[0x6eb2bd]
/ponyc/./build/debug/libponyc.tests[0x6eb60f]
/ponyc/./build/debug/libponyc.tests[0x6fb031]
/ponyc/./build/debug/libponyc.tests(__libc_csu_init+0x4d)[0x794e4d]
/lib64/libc.so.6(__libc_start_main+0x85)[0x7ffff3b9ab95]
/ponyc/./build/debug/libponyc.tests[0x564ec9]
======= Memory map: ========
00400000-008ab000 r-xp 00000000 08:01 782530                             /ponyc/build/debug/libponyc.tests
[... snipped]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]

Program received signal SIGABRT, Aborted.
0x00007ffff3bae1f7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56	  return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);
(gdb) bt
#0  0x00007ffff3bae1f7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007ffff3baf8e8 in __GI_abort () at abort.c:90
#2  0x00007ffff3bedf47 in __libc_message (do_abort=do_abort@entry=2, fmt=fmt@entry=0x7ffff3cfa608 "*** Error in `%s': %s: 0x%s ***\n")
    at ../sysdeps/unix/sysv/linux/libc_fatal.c:196
#3  0x00007ffff3bf5619 in malloc_printerr (ar_ptr=0x7ffff3f35760 <main_arena>, ptr=<optimized out>,
    str=0x7ffff3cf7cd4 "free(): invalid pointer", action=3) at malloc.c:5023
#4  _int_free (av=0x7ffff3f35760 <main_arena>, p=<optimized out>, have_lock=0) at malloc.c:3845
#5  0x00007ffff6e3ea1f in std::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::overflow(int) ()
   from /opt/llvm-3.9.1/lib64/libLLVM-3.9.so
#6  0x00007ffff6e53dd6 in std::basic_streambuf<char, std::char_traits<char> >::xsputn(char const*, long) ()
   from /opt/llvm-3.9.1/lib64/libLLVM-3.9.so
#7  0x00007ffff6e57a85 in std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long) () from /opt/llvm-3.9.1/lib64/libLLVM-3.9.so
#8  0x00007ffff6e57d87 in std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*) () from /opt/llvm-3.9.1/lib64/libLLVM-3.9.so
#9  0x00000000006eb194 in operator<< <char [7]> (val=..., this=0x7fffffffe5d0) at lib/gtest/gtest/gtest-message.h:131
#10 testing::internal::FlagToEnvVar (flag=flag@entry=0x7f110d "also_run_disabled_tests") at lib/gtest/src/gtest-port.cc:1118
#11 0x00000000006eb2bd in testing::internal::BoolFromGTestEnv (flag=flag@entry=0x7f110d "also_run_disabled_tests",
    default_value=default_value@entry=false) at lib/gtest/src/gtest-port.cc:1177
#12 0x00000000006eb60f in __static_initialization_and_destruction_0 (__initialize_p=__initialize_p@entry=1,
    __priority=__priority@entry=65535) at lib/gtest/src/gtest.cc:202
#13 0x00000000006fb031 in _GLOBAL__sub_I__ZN7testing8internal17kStackTraceMarkerE () at lib/gtest/src/gtest-typed-test.cc:118
#14 0x0000000000794e4d in __libc_csu_init ()
#15 0x00007ffff3b9ab95 in __libc_start_main (main=0x5bafee <main(int, char**)>, argc=1, ubp_av=0x7fffffffe768,
    init=0x794e00 <__libc_csu_init>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe758) at ../csu/libc-start.c:233
#16 0x0000000000564ec9 in _start ()
(gdb)

From what I understood, it seems that the ./build/debug/libponyc.tests is calling std::basic_ostream in libLLVM instead of libstdc++. Nothing in the backtrace seems to be related to ponyc tests in anyway.
Based on the above gdb backtrace and the potential linking issue, re-linking ./build/debug/libponyc.tests with the following command (taken via verbose=1 with -lstdc++ added before -lgtest) was attempted:

[root@312b42353ff7 ponyc]# g++ -o build/debug/libponyc.tests build/debug/obj/tests/libponyc/parse_expr.o build/debug/obj/tests/libponyc/codegen_optimisation.o build/debug/obj/tests/libponyc/codegen.o build/debug/obj/tests/libponyc/parse_entity.o build/debug/obj/tests/libponyc/dontcare.o build/debug/obj/tests/libponyc/iftype.o build/debug/obj/tests/libponyc/literal_limits.o build/debug/obj/tests/libponyc/codegen_identity.o build/debug/obj/tests/libponyc/option_parser.o build/debug/obj/tests/libponyc/matchtype.o build/debug/obj/tests/libponyc/verify.o build/debug/obj/tests/libponyc/symtab.o build/debug/obj/tests/libponyc/use.o build/debug/obj/tests/libponyc/signature.o build/debug/obj/tests/libponyc/util.o build/debug/obj/tests/libponyc/type_check_bind.o build/debug/obj/tests/libponyc/codegen_trace.o build/debug/obj/tests/libponyc/program.o build/debug/obj/tests/libponyc/codegen_final.o build/debug/obj/tests/libponyc/type_check_subtype.o build/debug/obj/tests/libponyc/compiler_serialisation.o build/debug/obj/tests/libponyc/recover.o build/debug/obj/tests/libponyc/codegen_ffi.o build/debug/obj/tests/libponyc/array.o build/debug/obj/tests/libponyc/token.o build/debug/obj/tests/libponyc/scope.o build/debug/obj/tests/libponyc/lambda.o build/debug/obj/tests/libponyc/local_inference.o build/debug/obj/tests/libponyc/sugar.o build/debug/obj/tests/libponyc/bare.o build/debug/obj/tests/libponyc/lexint.o build/debug/obj/tests/libponyc/ffi.o build/debug/obj/tests/libponyc/sugar_traits.o build/debug/obj/tests/libponyc/lexer.o build/debug/obj/tests/libponyc/annotations.o build/debug/obj/tests/libponyc/sugar_expr.o build/debug/obj/tests/libponyc/id.o build/debug/obj/tests/libponyc/flatten.o build/debug/obj/tests/libponyc/buildflagset.o build/debug/obj/tests/libponyc/suggest_alt_name.o build/debug/obj/tests/libponyc/finalisers.o build/debug/obj/tests/libponyc/chain.o build/debug/obj/tests/libponyc/paint.o build/debug/obj/tests/libponyc/reach.o build/debug/obj/tests/libponyc/literal_inference.o build/debug/obj/tests/libponyc/badpony.o build/debug/obj/tests/libponyc/traits.o -march=native -mtune=generic -mcx16 -L build/debug -L /usr/local/lib  -L/opt/llvm-3.9.1/lib64  -Wl,--whole-archive  -lponyrt -Wl,--no-whole-archive -lstdc++ -lgtest -lponyc -lLLVM-3.9 -lz -lncurses -lblake2 -lpthread -ldl -latomic -rdynamic

Running the newly linked ./build/debug/libponyc.tests gets an error on the same function (codegen_machine) as ./build/debug/ponyc examples/helloworld and not the same error as previously:
[root@312b42353ff7 ponyc]# ./build/debug/libponyc.tests
[==========] Running 1056 tests from 45 test cases.
[----------] Global test environment set-up.
[----------] 7 tests from ParseExprTest
[ RUN      ] ParseExprTest.CompileErrorAllowedAsIfdefClause
[       OK ] ParseExprTest.CompileErrorAllowedAsIfdefClause (3 ms)
[ RUN      ] ParseExprTest.CompileErrorNeedsReason
[       OK ] ParseExprTest.CompileErrorNeedsReason (2 ms)
[ RUN      ] ParseExprTest.CompileErrorReasonMustBeAString
[       OK ] ParseExprTest.CompileErrorReasonMustBeAString (2 ms)
[ RUN      ] ParseExprTest.ExpressionNotAllowedBeforeCompileError
[       OK ] ParseExprTest.ExpressionNotAllowedBeforeCompileError (2 ms)
[ RUN      ] ParseExprTest.ExpressionNotAllowedAfterCompileError
[       OK ] ParseExprTest.ExpressionNotAllowedAfterCompileError (2 ms)
[ RUN      ] ParseExprTest.CompileErrorAllowedAsIfdefElseClause
[       OK ] ParseExprTest.CompileErrorAllowedAsIfdefElseClause (2 ms)
[ RUN      ] ParseExprTest.CompileErrorNotAllowedOutsideIfdef
[       OK ] ParseExprTest.CompileErrorNotAllowedOutsideIfdef (2 ms)
[----------] 7 tests from ParseExprTest (15 ms total)

[----------] 2 tests from CodegenOptimisationTest
[ RUN      ] CodegenOptimisationTest.MergeSendMessageReordering
*** Error in `./build/debug/libponyc.tests': free(): invalid pointer: 0x00007fe8c05deee0 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x7c619)[0x7fe8bc701619]
./build/debug/libponyc.tests(codegen_machine+0x58f)[0x76e250]
[... snipped]

gdb backtrace of the manually linked ./build/debug/libponyc.tests is:
[root@312b42353ff7 ponyc]# gdb ./build/debug/libponyc.tests
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-100.el7_4.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /ponyc/build/debug/libponyc.tests...done.
(gdb) run
Starting program: /ponyc/./build/debug/libponyc.tests
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[==========] Running 1056 tests from 45 test cases.
[----------] Global test environment set-up.
[----------] 7 tests from ParseExprTest
[ RUN      ] ParseExprTest.CompileErrorAllowedAsIfdefClause
[       OK ] ParseExprTest.CompileErrorAllowedAsIfdefClause (2 ms)
[ RUN      ] ParseExprTest.CompileErrorNeedsReason
[       OK ] ParseExprTest.CompileErrorNeedsReason (2 ms)
[ RUN      ] ParseExprTest.CompileErrorReasonMustBeAString
[       OK ] ParseExprTest.CompileErrorReasonMustBeAString (2 ms)
[ RUN      ] ParseExprTest.ExpressionNotAllowedBeforeCompileError
[       OK ] ParseExprTest.ExpressionNotAllowedBeforeCompileError (2 ms)
[ RUN      ] ParseExprTest.ExpressionNotAllowedAfterCompileError
[       OK ] ParseExprTest.ExpressionNotAllowedAfterCompileError (2 ms)
[ RUN      ] ParseExprTest.CompileErrorAllowedAsIfdefElseClause
[       OK ] ParseExprTest.CompileErrorAllowedAsIfdefElseClause (3 ms)
[ RUN      ] ParseExprTest.CompileErrorNotAllowedOutsideIfdef
[       OK ] ParseExprTest.CompileErrorNotAllowedOutsideIfdef (3 ms)
[----------] 7 tests from ParseExprTest (17 ms total)

[----------] 2 tests from CodegenOptimisationTest
[ RUN      ] CodegenOptimisationTest.MergeSendMessageReordering
*** Error in `/ponyc/./build/debug/libponyc.tests': free(): invalid pointer: 0x00007ffff7ad2ee0 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x7c619)[0x7ffff3bf5619]
/ponyc/./build/debug/libponyc.tests(codegen_machine+0x58f)[0x76e250]
/ponyc/./build/debug/libponyc.tests[0x72a8fc]
/ponyc/./build/debug/libponyc.tests[0x72a9bc]
/ponyc/./build/debug/libponyc.tests(codegen_gen_test+0xbe)[0x72ca28]
/ponyc/./build/debug/libponyc.tests(_ZN8PassTest13build_packageEPKcS1_S1_bPS1_b+0x6a8)[0x5bbd86]
/ponyc/./build/debug/libponyc.tests(_ZN8PassTest12test_compileEPKcS1_+0x55)[0x5bc91d]
/ponyc/./build/debug/libponyc.tests(_ZN55CodegenOptimisationTest_MergeSendMessageReordering_Test8TestBodyEv+0x3d)[0x5664ff]
/ponyc/./build/debug/libponyc.tests(_ZN7testing8internal38HandleSehExceptionsInMethodIfSupportedINS_4TestEvEET0_PT_MS4_FS3_vEPKc+0x18)[0x7002c7]
/ponyc/./build/debug/libponyc.tests(_ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS_4TestEvEET0_PT_MS4_FS3_vEPKc+0x39)[0x702639]
/ponyc/./build/debug/libponyc.tests(_ZN7testing4Test3RunEv+0x78)[0x6f6a2e]
/ponyc/./build/debug/libponyc.tests(_ZN7testing8TestInfo3RunEv+0xaa)[0x6f6b08]
/ponyc/./build/debug/libponyc.tests(_ZN7testing8TestCase3RunEv+0x93)[0x6f6bf3]
/ponyc/./build/debug/libponyc.tests(_ZN7testing8internal12UnitTestImpl11RunAllTestsEv+0x24c)[0x6f6ea4]
/ponyc/./build/debug/libponyc.tests(_ZN7testing8internal38HandleSehExceptionsInMethodIfSupportedINS0_12UnitTestImplEbEET0_PT_MS4_FS3_vEPKc+0x18)[0x7006dd]
/ponyc/./build/debug/libponyc.tests(_ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS0_12UnitTestImplEbEET0_PT_MS4_FS3_vEPKc+0x39)[0x702a89]
/ponyc/./build/debug/libponyc.tests(_ZN7testing8UnitTest3RunEv+0x8e)[0x6f7102]
/ponyc/./build/debug/libponyc.tests(main+0x44)[0x5bb0c2]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7ffff3b9ac05]
/ponyc/./build/debug/libponyc.tests[0x564f59]
======= Memory map: ========
00400000-008ab000 r-xp 00000000 08:01 782530                             /ponyc/build/debug/libponyc.tests
[... snipped]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]

Program received signal SIGABRT, Aborted.
0x00007ffff3bae1f7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56	  return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);
(gdb) bt
#0  0x00007ffff3bae1f7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007ffff3baf8e8 in __GI_abort () at abort.c:90
#2  0x00007ffff3bedf47 in __libc_message (do_abort=do_abort@entry=2, fmt=fmt@entry=0x7ffff3cfa608 "*** Error in `%s': %s: 0x%s ***\n")
    at ../sysdeps/unix/sysv/linux/libc_fatal.c:196
#3  0x00007ffff3bf5619 in malloc_printerr (ar_ptr=0x7ffff3f35760 <main_arena>, ptr=<optimized out>,
    str=0x7ffff3cf7cd4 "free(): invalid pointer", action=3) at malloc.c:5023
#4  _int_free (av=0x7ffff3f35760 <main_arena>, p=<optimized out>, have_lock=0) at malloc.c:3845
#5  0x000000000076e250 in _M_dispose (__a=..., this=<optimized out>) at /usr/include/c++/4.8.2/bits/basic_string.h:249
#6  ~basic_string (this=0x7fffffffd068, __in_chrg=<optimized out>) at /usr/include/c++/4.8.2/bits/basic_string.h:539
#7  ~MCTargetOptions (this=0x7fffffffd060, __in_chrg=<optimized out>) at /opt/llvm-3.9.1/include/llvm/MC/MCTargetOptions.h:19
#8  ~TargetOptions (this=0x7fffffffd000, __in_chrg=<optimized out>) at /opt/llvm-3.9.1/include/llvm/Target/TargetOptions.h:92
#9  codegen_machine (target=0x7ffff7aaba40 <llvm::TheX86_64Target>, opt=opt@entry=0xb449d0, jit=jit@entry=true)
    at src/libponyc/codegen/host.cc:45
#10 0x000000000072a8fc in make_machine (opt=opt@entry=0xb449d0, jit=jit@entry=true) at src/libponyc/codegen/codegen.c:91
#11 0x000000000072a9bc in init_module (c=c@entry=0x7ffff349ac00, program=program@entry=0x7ffff3717880, opt=opt@entry=0xb449d0,
    jit=jit@entry=true) at src/libponyc/codegen/codegen.c:655
#12 0x000000000072ca28 in codegen_gen_test (c=0x7ffff349ac00, program=0x7ffff3717880, opt=0xb449d0, last_pass=PASS_PARSE)
    at src/libponyc/codegen/codegen.c:885
#13 0x00000000005bbd86 in PassTest::build_package (this=this@entry=0xb449c0, pass=pass@entry=0x795ab1 "ir",
    src=src@entry=0x795838 "actor Main\n  var state: U8 = 0\n  new create(env: Env) =>\n    msg1(env)\n    msg2(env)\n    msg3(env)\n  be msg1(env: Env) =>\n    if state == 0 then state = 1 end\n  be msg2(env: Env) =>\n    if state == 1 "..., package_name=0x7ac0b0 "prog",
    check_good=check_good@entry=true, expected_errors=expected_errors@entry=0x0, resume=resume@entry=false) at test/libponyc/util.cc:535
#14 0x00000000005bc91d in PassTest::test_compile (this=this@entry=0xb449c0,
    src=src@entry=0x795838 "actor Main\n  var state: U8 = 0\n  new create(env: Env) =>\n    msg1(env)\n    msg2(env)\n    msg3(env)\n  be msg1(env: Env) =>\n    if state == 0 then state = 1 end\n  be msg2(env: Env) =>\n    if state == 1 "..., pass=pass@entry=0x795ab1 "ir")
    at test/libponyc/util.cc:334
#15 0x00000000005664ff in CodegenOptimisationTest_MergeSendMessageReordering_Test::TestBody (this=0xb449c0)
    at test/libponyc/codegen_optimisation.cc:36
#16 0x00000000007002c7 in testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void> (object=object@entry=0xb449c0,
    method=<optimized out>, location=location@entry=0x7f15bd "the test body") at lib/gtest/src/gtest.cc:2401
#17 0x0000000000702639 in testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void> (object=object@entry=0xb449c0,
    method=&virtual testing::Test::TestBody(), location=location@entry=0x7f15bd "the test body") at lib/gtest/src/gtest.cc:2437
#18 0x00000000006f6a2e in testing::Test::Run (this=this@entry=0xb449c0) at lib/gtest/src/gtest.cc:2474
#19 0x00000000006f6b08 in testing::TestInfo::Run (this=0xac40d0) at lib/gtest/src/gtest.cc:2655
#20 0x00000000006f6bf3 in testing::TestCase::Run (this=0xac41e0) at lib/gtest/src/gtest.cc:2773
#21 0x00000000006f6ea4 in testing::internal::UnitTestImpl::RunAllTests (this=0xac3100) at lib/gtest/src/gtest.cc:4673
#22 0x00000000007006dd in testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> (
    object=object@entry=0xac3100, method=<optimized out>,
    location=location@entry=0x7f3f28 "auxiliary test code (environments or event listeners)") at lib/gtest/src/gtest.cc:2401
#23 0x0000000000702a89 in testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> (object=0xac3100,
    method=(bool (testing::internal::UnitTestImpl::*)(testing::internal::UnitTestImpl * const)) 0x6f6c58 <testing::internal::UnitTestImpl::RunAllTests()>, location=location@entry=0x7f3f28 "auxiliary test code (environments or event listeners)") at lib/gtest/src/gtest.cc:2437
---Type <return> to continue, or q <return> to quit---
#24 0x00000000006f7102 in testing::UnitTest::Run (this=0xaafc80 <testing::UnitTest::GetInstance()::instance>) at lib/gtest/src/gtest.cc:4284
#25 0x00000000005bb0c2 in RUN_ALL_TESTS () at lib/gtest/gtest/gtest.h:2237
#26 main (argc=1, argv=<optimized out>) at test/libponyc/util.cc:688
(gdb)

This shows the same issue that has to do with the destructor for ~MCTargetOptions that is internal to LLVM and nothing do with the code in codegen_machine in ponyc.

Compiling with -fsanitize=address using Clang to identify the memory issue root cause (https://github.com/google/sanitizers/wiki/AddressSanitizer).
Install clang:
yum install clang-3.9.1

apply the following diff:
diff --git a/Makefile b/Makefile
index 2aa1ede..aa30b19 100644
--- a/Makefile
+++ b/Makefile
@@ -92,7 +92,7 @@ destdir ?= $(prefix)/lib/pony/$(tag)
 LIB_EXT ?= a
 BUILD_FLAGS = -march=$(arch) -mtune=$(tune) -Werror -Wconversion \
   -Wno-sign-conversion -Wextra -Wall
-LINKER_FLAGS = -march=$(arch) -mtune=$(tune)
+LINKER_FLAGS += -march=$(arch) -mtune=$(tune)
 AR_FLAGS ?= rcs
 ALL_CFLAGS = -std=gnu11 -fexceptions \
   -DPONY_VERSION=\"$(tag)\" -DLLVM_VERSION=\"$(llvm_version)\" \

Compile with:
CC=/opt/llvm-3.9.1/bin/clang CXX=/opt/llvm-3.9.1/bin/clang++ CXXFLAGS="-fsanitize=address" CFLAGS="-fsanitize=address" make clean test

running ./build/release/libponyc.tests results in:
[root@312b42353ff7 ponyc]# ./build/release/libponyc.tests
=================================================================
==4926==ERROR: AddressSanitizer: attempting free on address which was not malloc()-ed: 0x0000011f5a60 in thread T0
    #0 0x6d20b0  (/ponyc/build/release/libponyc.tests+0x6d20b0)
    #1 0x7efd056f779a  (/opt/llvm-3.9.1/lib64/libLLVM-3.9.so+0x1a9979a)
    #2 0xab1c94  (/ponyc/build/release/libponyc.tests+0xab1c94)
    #3 0xb183b5  (/ponyc/build/release/libponyc.tests+0xb183b5)
    #4 0x6158b4  (/ponyc/build/release/libponyc.tests+0x6158b4)
    #5 0xc950dc  (/ponyc/build/release/libponyc.tests+0xc950dc)
    #6 0x7efd02205b94  (/lib64/libc.so.6+0x21b94)
    #7 0x616c16  (/ponyc/build/release/libponyc.tests+0x616c16)

AddressSanitizer can not describe address in more detail (wild memory access suspected).
SUMMARY: AddressSanitizer: bad-free (/ponyc/build/release/libponyc.tests+0x6d20b0)
==4926==ABORTING
[root@312b42353ff7 ponyc]#

running ./build/release/ponyc examples/helloworld results in:
[root@312b42353ff7 ponyc]# ./build/release/ponyc examples/helloworld
Building builtin -> /ponyc/packages/builtin
Building examples/helloworld -> /ponyc/examples/helloworld
Generating
=================================================================
==4927==ERROR: AddressSanitizer: attempting free on address which was not malloc()-ed: 0x7fa2aeadaee0 in thread T0
    #0 0x4f4a40  (/ponyc/build/release/ponyc+0x4f4a40)
    #1 0x64d0fb  (/ponyc/build/release/ponyc+0x64d0fb)
    #2 0x5685be  (/ponyc/build/release/ponyc+0x5685be)
    #3 0x5681e4  (/ponyc/build/release/ponyc+0x5681e4)
    #4 0x54de2d  (/ponyc/build/release/ponyc+0x54de2d)
    #5 0x52c696  (/ponyc/build/release/ponyc+0x52c696)
    #6 0x7fa2aa692c04  (/lib64/libc.so.6+0x21c04)
    #7 0x4395a6  (/ponyc/build/release/ponyc+0x4395a6)

AddressSanitizer can not describe address in more detail (wild memory access suspected).
SUMMARY: AddressSanitizer: bad-free (/ponyc/build/release/ponyc+0x4f4a40)
==4927==ABORTING
[root@312b42353ff7 ponyc]#

I'm so sorry you're looking at this, @dipinhora. I think we have a situation where the LLVM .so on CentOS is statically linking to some libc++ or libstdc++ implementation, and we are getting a situation where one path is allocating and a different path is freeing.
I think building LLVM rather than using the prebuilt binary might solve this.

@sylvanc Thanks for the pointer. That was exactly the problem. The solution I stumbled upon is to link to llvm statically (thanks @winksaville for knowing back in december that I'd need to be able to do that).


derive: Remove proc_macro crate feature

This is potentially unstable because it uses quote crate's internal API

bors r+

bors r-

bors r+


[FLOC-1943] Validate openstack credentials

Design for: https://clusterhq.atlassian.net/browse/FLOC-1943
We plan to support a third dataset backend option, 'openstack' (after 'zfs' and 'loopback').
This requires:

Documentation about what is supported,
Documentation about how to create a valid agent.yml,
Validation of the currently supported options.

Openstack backends require an auth plugin. For each auth plugin, there are various plugin-specific options.
We currently support two plugins: "rackspace" and "password".
The "password" plugin is used (at least) for PistonCloud.
Supported configs would be something like the following (but yaml):
config_rackspace = {
    'control-service': {
        'hostname': '<IP_ADDRESS>',
        'port': 4524,
    },
    'dataset': {
        'backend': 'openstack',
        'tenant_id': 'my_id', # required if openstack
        'auth_url': 'https://example.com/rackspace/', # required if openstack, must be a uri
        'auth_plugin': 'rackspace': # required if openstack
        'username': 'adam', # required if rackspace plugin
        'region': 'my_region', # required if rackspace plugin
        'api_key': 'my_username', # required if rackspace
    },
    'version': 1
}

config_piston = {
    'control-service': {
        'hostname': '<IP_ADDRESS>',
        'port': 4524,
    },
    'dataset': {
        'backend': 'openstack',
        'tenant_id': 'my_id', # required if openstack
        'auth_url': 'https://example.com/piston/', # required if openstack, must be a uri
        'auth_plugin': 'password', # required if openstack
        'username': 'my_username', # required if 'password' plugin
        'password': 'my_password', # required if 'password' plugin
    },
    'version': 1
}

Turns out we don't support PistonCloud.  We support "a Red Hat thing".

This design is problematic. We're going to have dynamically pluggable storage backends, which means we can't have one monolithic validation function for them. I suggest just loading config and passing it to backend, and it's backend responsibility to validate. Or we could have a validation hook as part of the plugin interface. but we really can't have one giant schema, even if it's split up across files. This schema needs to just have wildcard for the backend stuff.

I suggest just loading config and passing it to backend, and it's backend responsibility to validate.

Just as easy (or easier, since we have four backends) is to ask the backend for a config_schema attribute and do the validation for it.
The suggestion about the wildcard in the overall schema sounds good to me.

Ok, ignoring the proposed implementation, what do you think of the proposed supported configs?

^^ @exarkun or @itamarst


Doesn't work in newest versions of unity. Bounding boxes are broken.

I downloaded the source and opened it in Unity 2018.3.6. I downloaded the TFSharp 0.3 plugin and imported it in. I tried it on both iOS and Android. The bounding boxes are very out of place.
On iOS, the bounding box is just shown as a small dot in the middle of the screen. (iPhone XS Max)
On Android, The bounding box is larger than the screen size (so much so that the label is completely off screen) most of the time. It never shows a correct bounding box.
I'm not sure if this is helpful, but the camera views only take up a fraction of the screen.
The same happens on Editor Mode. (For editor mode, I comment out the check in the code for back-facing camera so that I can use my webcam) The detection just shows a dot in the middle of the camera view.
On Android, I get a lot of errors about duplicate files loaded into ML-Agents/Plugins/Android. I have to deleted those duplicates to get it to run. I don't think this is the problem though.
Have any of the dependencies changed? I cloned it multiple times and tried various versions of TFSharp and different models. I also triple checked the instructions in the documentation on settings, like ENABLE_TENSORFLOW flag in Player Settings.
iOS:

Android:

Hi @derekmtran,
Thanks for reporting, I'll check newest Unity version as soon as I can.

Thank you! Let me know if there is anything I can provide on my end to help investigate. I’m hoping to do a mini proof of concept project with object detection with Tensorflow in unity and this is the closest thing I’ve found to getting me started. Appreciate you putting up the code and helping everyone out!

I have had a similar problem. Fixed the bounding box issue by setting backgroundSize = new Vector2(Screen.width, Screen.height);
I'm still not 100% on how to fix the screen being tiny in the middle, but am currently multiplying the scale for background by ratio.
Hope this helps

Where did you add that line? Which platform did you test on?

In the script PhoneCamera.cs in the start method where it sets backroundSize, I changed the the original value for that. I recall it was because it was using the camera height and width originally, and that limits it to the screen size. platform was android Samsung S8.

Interesting. I'm using Samsung S8 on Android. Now I'm just getting bounding boxes that are approximately the same size as the phone screen (pretty much a fullscreen box) and it just says "Person" on just about everything. Did you have to change anything else about the project? I tried both 0.3 and 0.4 plugins. Any chance you can put up your unity project somewhere for me to try and run locally?

I'm awfully new on here so not sure how to. I can copy and paste the PhoneCamera.cs its the only thing i have changed. I have moved a little bit of stuff out of update as I was only interested in portrait and tried to resize the little view box, by multilplying the scale by the ratio set for aspect ratio(that is imperfect, but better than it was) . I tried a few other things as well there, but none got it to quite the right size, and you're the first person I have found having the same issue as me. I have also had pretty poor performance, but it does seem to find things like laptops, tvs and of course people. It also seems to think mobile phones are remotes. I saw some people suggesting quantizers(?) to improve performance, but I'm pretty new to ML.

Here is my Start Method, its the only thing I have changed (pretty much) Other than commenting out the update method entirely.
private void Start()
{
    LoadWorker();

    defaultBackground = background.texture;
    WebCamDevice[] devices = WebCamTexture.devices;

    if(devices.Length == 0)
    {
        this.uiText.text = "No camera detected";
        camAvailable = false;

        return;
    }

    for(int i = 0; i < devices.Length; i++)
    {
        if(!devices[i].isFrontFacing)
        {
            this.backCamera = new WebCamTexture(devices[i].name, Screen.width, Screen.height);
        }
    }

    if(backCamera == null)
    {
        this.uiText.text = "Unable to find back camera";

        return;
    }

    this.backCamera.Play();
    this.background.texture = this.backCamera;

    //this.backgroundSize = new Vector2(this.backCamera.width, this.backCamera.height);
    backgroundSize = new Vector2(Screen.width, Screen.height);
    camAvailable = true;

    float ratio = (float) backCamera.width / (float) backCamera.height;
    fitter.aspectRatio = ratio;

    float scaleY = backCamera.videoVerticallyMirrored ? -ratio : ratio;
    background.rectTransform.localScale = new Vector3(ratio, scaleY, 1f);

    int orient = -backCamera.videoRotationAngle;
    background.rectTransform.localEulerAngles = new Vector3(0, 0, orient);

    Debug.Log($"PressedNow ratio: {ratio}");
    string func = mode == Mode.Classify ? nameof(TFClassify) : nameof(TFDetect);
    InvokeRepeating(func, 1f, 1.0f);
}

The best way is probably to upload it to your own GitHub repo, but it sounds like you didn't change much. If you are still willing to upload the entire project somewhere, though, I can take a look at your build settings and what not and see if I have anything majorly off. It sounds like your tracking is much better than what mine is doing out of the box. Hm... which plugin are you using? 0.3 or 0.4? Did you also have to change anything when you initially launched the project in Unity? After I imported and tried to run, I got the following errors (duplicate errors), so deleted the files highlighted on the right to get it to build. Did you have to do this as well?

As far as I can see I have all of those still in there. I am pretty certain i built 0.4 as I wanted to look at making my  own model. I feel like I may have had a problem at first importing things as I hadn't changed the player settings for .Net  4, and I think I reimported again after doing that to make sure I had everything

What version of Unity? And what OS?

2018.2.12f1 on windows

I wonder if running on Windows has anything to do with it... I'm going to keep digging around and see what I can find. Thanks, so far!

Hi @derekmtran,
I checked the new Unity version on Windows and had this error as well. Deleting duplicated assembles seems to be the way to go and it isn't the problem.
The problem is that background texture doesn't stretch to the whole screen anymore. Something must have been changed in the new Unity and I'm not quite sure how to fix this. If you're in a hurry you might have better luck asking how to stream camera feed correctly on the Unity forum or stackoverflow.
I'm gonna try to fix this myself next week, but given that I'm no Unity expert it will most likely take me a while. If you find a solution quicker, be kind to share it here.
Drawing bounding boxes is just a matter of right scaling. If you manage to fix camera issue and bounding boxes are still wrong, you can simply compare what coordinates does the model produce and how should they be scaled on the screen to create a correct rectangle.

Further to all of this, I have found using ARCore and getting the texture2d through there gives much better results. I've not used python so I can't compare it to that version of tensorflow, but would be really interested in comparison.


auto-strip typescript

Should we simply auto-strip typescript by default? This would mitigate the need for typescript'd code to be prebuilt built.
cc @rwjblue  / @chriskrycho

Huh, interesting thought. So then the work of ember-cli-typescript and similar would just be providing the hooks to let people generate their type definitions (as desired) and injecting build failures if they so desired. 🤔 cc. @dfreeman @dwickern @mike-north

What do you mean RE: auto-stripping? Remove from the build without compiling from .ts -> .js? How would that actually work?

No, just doing the "compile" step for TS as Babel understands it – just stripping the types.

@rwjblue Babel/swc support a non/type checking ts -> JavaScript transform, this transform being enabled is what I meant by auto-stripping

This is effectively what ember-cli-typescript@2 is already doing today (though granted you have to opt into it by adding e-c-ts as a dependency).
The prepublish build step we have there is for generating declaration files in a location discoverable by tsc, since the actual sources in addon/**/*.ts won't have the addon/ segment in their ultimate import path.

@dfreeman ya, I wonder though if we should consider pushing it down the stack to reduce maintenance/keep stuff in sync. That may allow e-c-ts to focus on the typechecking side of things

It's an interesting idea. Today adding the plugin is pretty trivial for us to do, but in the future (e.g. if we start getting things like swc in the mix) I can definitely see the appeal of not having to manage it ourselves.
On the other hand, there's a maintenance/sync problem on the TypeScript language side as well. @babel/plugin-transform-typescript isn't the only thing you necessarily need to include to get full TypeScript support. Today you also have to add the class properties plugin (and potentially decorators), but the set of needed plugins for full coverage will be a moving target if TS adopts proposals before they hit stage 4 and get handled automatically by present-env. Is that something we'd want to take on handling here?

FWIW, we have made a bit of progress here. Currently, ember-cli-babel will detect if ember-cli-typescript is present (and at the right minimum version) and add the babel plugins itself.
That was added in #314.


[BACKLOG-40099] - remove new Exception from method signature

Restores backwards compatibility for KettleVFS

:white_check_mark: Build finished in 19m 57s
Build command:
mvn clean verify -B -e -Daudit -Djs.no.sandbox -pl core

:ok_hand: All tests passed!
Tests run: 1267, Failures: 0, Skipped: 1    Test Results

:information_source:  This is an automatic message


Models.py is expected, having a models as a module causes issue

So far aerich is good and thanks for your work on this. But i found that inside aerich/migrate.py  we are checking for models.py file,  line no 42 i think. And having a structure like so ,
models/
     __init__.py
    tables_1.py
    tables_2.py

Like the above is not working, what is the possible issue here? Am i missing something ? will this work, or do we need to keep all tables in one models.py for this to work.

It should be worked as that, did you add both of those to tortoise_orm config? Just like:
tortoise_orm = {
    "connections": {"default": expand_db_url(db_url, True)},
    "apps": {
        "models": {"models": ["models.tables_1","models.tables_2", "aerich.models"], "default_connection": "default",},
    },
}

Now aerich init is working, but when using migrate / upgrade issue occurs in tortoise's _discover_models , the following is occuring ModuleNotFoundError: No module named 'migrations.models.tables_1'
I will try to recreate this with a small  example and post it here, when possible.

Did you install lastest version? Or you can reinstall from github: pip install -e git+https://github.com/long2ice/aerich.git@dev


Wrap consumer close into try/catch

Wrap consumer close/dispose into try/catch as they might result in unhandled exception
related to: https://github.com/MassTransit/MassTransit/issues/4699#issuecomment-1774042735

@NooNameR The error message is gone and the process dosen't crash, but the consumer does not reconnect.
Why are we cheking if it is local error ?
https://github.com/NooNameR/MassTransit/blob/78dd027b3094228e004a4104bc250468b2d45f1a/src/Transports/MassTransit.KafkaIntegration/KafkaIntegration/KafkaMessageConsumer.cs#L119-L121
The confluent error handler will try to automatically recover from errors that are not marked as fatal but we stop the consumer if it local transport errors

AFAIK, local is when client has an issue but not server, I'm not sure what do you mean by "consumer does not reconnect". I clearly can see that it was reconnecting proven by test you provided

AFAIK, local is when client has an issue but not server, I'm not sure what do you mean by "consumer does not reconnect". I clearly can see that it was reconnecting proven by test you provided

I don't know how to reproduce it localy at the moment, but there are network issues on the cloud environment that are marked as local errors,
for example:

[client_id] error (Local_Transport): : Connect to  failed: Connection refused (after 4ms in state CONNECT) on topic
Consumer [client_id] error (Local_Transport):  Disconnected (after 8108748ms in state UP) on topic
Consumer [client_id] error (Local_Transport): GroupCoordinator: hostname:9092 authentication error: SaslAuthenticateRequest failed: Local: Broker transport failure (after 0ms in state DOWN) on topic
Consumer [client_id] error (Local_TimedOut): hostname: 1 request(s) timed out: disconnect (after 19555141ms in state UP) on topic
Are considered local errors.

Maybe becuse In the test the broker is closed gracefully it causes the connection to be close gracefully as well,
I will try to create a test that reproduce it

let us know, when you be able to reproduce and I can do fixing for you

Why not look at IsError or IsFatal or something else to determine if the transport needs recycled? Whether it is local or broker initiated doesn't seem to be a good reason to decide if it should be recycled.

Why not look at IsError or IsFatal or something else to determine if the transport needs recycled? Whether it is local or broker initiated doesn't seem to be a good reason to decide if it should be recycled.

I can't recall where this IsLocal came from really, and why I used it

yeah, fatal seems reasonable: https://github.com/MassTransit/MassTransit/pull/4725

The confluent error handler will try to automatically recover from errors that are not marked as fatal but we stop the consumer if it local transport errors

Also, we do not want kafka consumer to reconnect it self, we have recycle MT endpoint (basically having more control over endpoint state)


Lazy-load images on index page

Closes #26
Added a custom component using hooks to add feedback when the image is loading. There is also a wrapper that forces a min-height of 400px, which will likely be the standard going forward. The same solution will be applied to the individual post page in the future, but it is not currently the priority.

Waiting on a fix with #31to fix checks before merging.


MariaDB 10.4

This issue is to add MariaDB 10.4.x binaries. The history:

Until yesterday we had 10.2.11.
In #235 for #230 we introduced MariaDB 10.3.13 binaries.
#292 attempts to bump from 10.3.13 to 10.3.17.

@srbala @jtmuhone or anyone else - interested in contributing this?
We should follow the 10.3.x (#235) model and only add scripts which download, not binaries directly anymore.
Something to look more closely into when anyone picks up this issue is if we can avoid having to copy/paste those prepare.xml Ant build scripts... they are a little bit different between Linux, Windows and Mac, but hopefully between 10.3.x and 10.4.x they can be moved up in the directory structure so that they can be shared?

Mac binaries may be a PITA again for 10.4?  Note #292.

@vorburger I'll work on PR soon

What's the status on this?
MariaDB has some fairly significant issues on those old versions that are affecting me.

What's the status on this?
MariaDB has some fairly annyoing issues on those old versions that are affecting me.
Yes, not only annoying, but blockers for me. MariaDB 10.2 has some limits which are lifted in MariaDB 10.3. MariaDB 10.3 already runs in the latest version in the master branch. You just have to pull and build for yourself.
I asked already for a release, see #336.

Any progress with this one? The 2.4.0 release relies on old version of openssl library through mariadb 10.2.11 that is now deprecated and removed from osx brew (Catalina). This means that the mariadb instance does not start up unless you some how hack the old version of the openssl  library (1.0.0) in to your system.

Any progress with this one? The 2.4.0 release relies on old version of openssl library through mariadb 10.2.11 that is now deprecated and removed from osx brew (Catalina). This means that the mariadb instance does not start up unless you some how hack the old version of the openssl library (1.0.0) in to your system.

That seems still unresolved, see: #288. I don't know if your problem is even fixed with MariaDB 10.3.16?
In fact #288 seems to be one of the reasons a new release is delayed for over a year now. Which I think is wrong, MariaDB 10.3 is still an improvement and in no way worse.

I poked this just a little bit yesterday. This is might not be so easy to be done for OSX.

using binaries from homebrew is not that easy because they rely on homebrew dependencies like the<EMAIL_ADDRESS>Also the build scripts (mysql_install_db) relies to homebrew variables:

basedir="@@HOMEBREW_CELLAR@@/mariadb/10.4.12"
ldata="@@HOMEBREW_PREFIX@@/var/mysql"

As far as I understand those variables are based on some template library and would be needed to be replaced during mariadb4j compilation.

If we would compile the binaries our selves and would upload them to bintray. Unfortunately Apple has made compilations depending on OSX native libraries more difficult with the Mojave update. I also tried to compile the mariadb binary my self but it was not successful.  First the compilation was linkin the openssl to my homebrew libraries and after I got that fixed the compilation failed to:

[  4%] Building C object strings/CMakeFiles/strings.dir/decimal.c.o
ld: cannot link directly with dylib/framework, your binary is not an allowed client of /usr/lib/libcrypto.dylib for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [libmariadb/client_ed25519.so] Error 1
make[1]: *** [libmariadb/CMakeFiles/client_ed25519.dir/all] Error 2
[  4%] Building C object pcre/CMakeFiles/pcre.dir/pcre_version.c.o

My knowledge on source compilation is not enough to solve this. I was also thinking that could we compile the openssl by hand and some how include the  library with the mariadb binary but as I said my knowledge on source compilation is not enough that I could do that.

Because the binary support for osx is made difficult, can we some how address this in a different perspective? Could we for example use containers to spin up the mariadb instances instead of running them directly from binaries?

@niom thanks for your research! As you mentioned, It's hard to fix homebrew package with @@HOMEBREW_CELLAR@@ links hardcoded in it. I've created a PR with osx compiled version in repository - I know it's not optimal - but for now it should help osx users ;) I'm looking for testers ;)

For macOS compiled versions there is the fork from Crafter CMS.
It would be nice if we could remerge the fork with the original building MariaDB for macOS in a macOS Travis CI machine.

@luigiberrettini yeah, I'm using this fork now, but it fails on my ubuntu machine when this one works fine but fails on osx ;)

Let's dupe this to #344; if anyone wants to contribute, it probably makes more sense to add one single latest DB version, not several.


Request running linter before creating PRs in CONTRIBUTING.md

@elveskevtar: Can you split user_service.py file update to a seperate PR?


Wrong route id for preloaded routes after rebuild route tree

Which project does this relate to?
Router
Describe the bug
After a route (it needs to have a lazy route) /_protected/test got preloaded, then we call router.buildRouteTree() to rebuild the route tree again, that route will have a wrong id /_protected/_protected/test.
Your Example Website or App
https://stackblitz.com/edit/vitejs-vite-s8qswn?file=src%2FApp.tsx
Steps to Reproduce the Bug or Issue

Open my StackBlitz example.
It should automatically run the project. If not, just npm run start
Open browser devtool's console.
Click the first button to print router.routesById, in the console you can confirm all routes' ids are fine.
Click the second button, it preloads the /_protected/test route.
Click the third button to run router.buildRouteTree()
Click the fourth button to print router.routesById again, in the console you can see the preloaded route /test now has a wrong id: /_protected/_protected/test

Expected behavior
No matter how many times I rebuild the route tree, the result should be consistent.
I'm doing dynamic route injection, so I need to rebuild the route tree after there is a new route got injected.
Screenshots or Videos
https://github.com/user-attachments/assets/d7db270f-4d76-4f0d-a1bc-5bc433e8c53b
Platform

OS: [Windows]
Browser: [Chrome]
Version: [1.58.3]

Additional context
How the issue happened

This is currently how we generate id for a route instance in its init() method:

    const customId = options?.id || path // Uses path as id's fallback

    // Strip the parentId prefix from the first level of children
    let id = isRoot
      ? rootRouteId
      : joinPaths([
          this.parentRoute.id === rootRouteId ? '' : this.parentRoute.id,
          customId,
        ])

Related code: https://github.com/TanStack/router/blob/main/packages/react-router/src/route.ts#L1032

During the first initialization of the router, everything is fine because it fall back to the path, and the path doesn't contain a prefix from parent.

When we preload the route, the lazy route's options will be assign to the primary route object, so that the primary route object now has an id in its options property. Related code: https://github.com/TanStack/router/blob/main/packages/react-router/src/router.ts#L2247

Now we call router.buildRouteTree() to manually rebuild it, now the customId will be /_protected/test, and we are joining it with parent's id again, so we get /_protected/_protected/test.

I believe we should trim the parant prefix when using options.id as customId

I finally got around having a closer look.
I have implemented a simpler fix in #2490 which solves the root cause by not copying over the id from lazy route.
Here is your example with the package built for this PR:
https://stackblitz.com/edit/vitejs-vite-uesisd
Please have a look and let me know if it works for you.

I finally got around having a closer look.
I have implemented a simpler fix in #2490 which solves the root cause by not copying over the id from lazy route.
Here is your example with the package built for this PR:
https://stackblitz.com/edit/vitejs-vite-uesisd
Please have a look and let me know if it works for you.

Thank you! Yah that's a much simpler solution. Do we still need those test cases for route id consistency/uniqueness in my PR? If we do need them I'll remove other changes otherwise we can just close it.

those test cases are still valuable
so please extract those

those test cases are still valuable so please extract those

No problem, I'll do it later today.


[Question]: How does one change the voiceover in the launcher?

I downloaded genshin with  the english voiceovers. is there any way to download and change the voiceover language through the launcher, not ingame?

Unfortunately, we don't have this feature, at least for now.
But we are planning to implement this in the future


Added jquery to peer dependencies

Changed the verion of the required jquery to a range of 1.9.0 to less than 3.0.0
Kept jquery in dev dependencies so that it can be install at the root level of canjs via npm install

jquery is now in both peerDependencies and devDependencies.
It was originally thought that only having it in peerDependencies would be enough, but for versions of npm (such as 1.4.28 -- what we test with in Travis CI) peerDependencies do not get installed when doing an "npm install" at the root level of the project.


[Feature] Support volume hot-unplug

Is your feature request related to a problem? Please describe.
With https://github.com/harvester/harvester/issues/283 we are currently supporting both hot-plug and hot-unplug volumes, however, the hot-unplug feature is missing for both UI and the guest CSI driver.
Describe the solution you'd like

from the UI we should allow users to hot-unplug those pluggable volumes without restart the VM
support volume hot-unplug of the guest CSI driver

Additional context
Related to https://github.com/harvester/harvester/issues/283

Will this survive a Live Migration too?

it should be supported, @TachunLin can u please help to double-check it, thanks.

@guangbochen
After live migration, we can hot-unplug volume without restarting VM
Result
Tested under following scenarios

Live migrate VM already have hot-plugged volume to new node, then detach (hot-unplug) it
Live migrate VM not have hot-plugged volume before, do hot-plugged the unplugged.

However, there are two abnormal behaviors need to pay attention with:

After migration, hot plug new volume will restart VM

After migration, if you hot plug original volume, you can't unplug (detach) it again.

Test Information

Test Environment: 3 nodes harvester on provo bare machines (RackD8 cluster 2)
Harvester version: master-d05a6cc7-head
ui-source setting: auto

Verify Steps

Create a virtual machine
Create several volumes (without image)
Add volume, hot-plug volume to virtual machine
Open virtual machine, find hot-plugged volume
Click Detach volume
Add volume again
Migrate VM from one node to another
Detach volume
Add unplugged volume again

Additional Context
Support Bundle
supportbundle_98ab72c2-fc50-48d4-8ded-4a8d432ddda6_2021-11-01T12-57-13Z.zip


tasks: compare uncompressed package sizes

What does this PR do?
This PR switches from checking the package compressed size to checking the installed (or uncompressed) size.

Motivation
We will soon use a different compression level for deploy and "regular" pipelines, which makes comparing the compressed size risky. The uncompressed size is however safe to use regardless of the type of pipeline we're running

Additional Notes

Possible Drawbacks / Trade-offs

Describe how to test/QA your changes

Reviewer's Checklist

[ ] If known, an appropriate milestone has been selected; otherwise the Triage milestone is set.
[ ] Use the major_change label if your change either has a major impact on the code base, is impacting multiple teams or is changing important well-established internals of the Agent. This label will be use during QA to make sure each team pay extra attention to the changed behavior. For any customer facing change use a releasenote.
[ ] A release note has been added or the changelog/no-changelog label has been applied.
[ ] Changed code has automated tests for its functionality.
[ ] Adequate QA/testing plan information is provided. Except if the qa/skip-qa label, with required either qa/done or qa/no-code-change labels, are applied.
[ ] At least one team/.. label has been applied, indicating the team(s) that should QA this change.
[ ] If applicable, docs team has been notified or an issue has been opened on the documentation repo.
[ ] If applicable, the need-change/operator and need-change/helm labels have been applied.
[ ] If applicable, the k8s/<min-version> label, indicating the lowest Kubernetes version compatible with this feature.
[ ] If applicable, the config template has been updated.

/merge

/merge

/merge

/merge


upsample

does anybody know that how does tensorrt server support tensorrt upsample layer?

If the upsample layer is included with the TensorRT runtime/compiler then TRTIS should support it. It is is a TensorRT plugin then you should still be able to use it with the TRTIS plugin support: https://docs.nvidia.com/deeplearning/sdk/tensorrt-inference-server-master-branch-guide/docs/custom_operation.html#tensorrt


Replace Modifier with something that has map-like semantics

Inspired from Compose UI, we started with a LayoutModifier that was eventually renamed Modifier which provided the ability to communicate values to parent layouts. This is done through the same function chaining mechanism as Compose UI uses.
For example,
Row {
  Text(
    modifier = Modifier
      .horizontalAlignment(End),
    text = "Hey",
  )
}

Unlike Compose UI, however, our modifiers are not used as interceptors for our actual nodes. Instead, they are used as key/value stores. This means that the last occurrence in the chain of a particular modifier will win.
Given,
Row {
  Text(
    modifier = Modifier
      .horizontalAlignment(End)
      .horizontalAlignment(Start),
    text = "Hey",
  )
}

The text will align to the start. This is because when consuming child modifiers the parent iterates over the list in order and writes to a state variable. Thus, last one wins.
Contrast this to Compose UI where chaining is an important mechanism that has real effect.
Text(
  modifier = Modifier
    .background(red)
    .padding(10.dp)
    .background(yellow)
    .padding(10.dp)
    .background(green)
    .padding(10.dp),
  text = "Hey",
)

This code will draw three concentric rectangles of red, yellow, and green each with 10dp of padding between them (summing to 30dp of total padding). The same code in Redwood would produce only a green rectangle with only 10dp of total padding.
So as to not mislead those familiar with Compose UI I am proposing we change our type's name and also change how it gets built. For now I am going to call this new type Traits simply to have something to reference.
This new type will have map semantics from the start, and a more map-focused API. So in our example above it would probably look like
Text(
  traits = buildTraits {
    background(green)
    padding(10.dp)
  },
  text = "Hey",
)

On the widget-side you can iterate the traits as we were doing with modifiers above, but I suspect a typed map API to be the one that gets used by parent widgets.
So instead of
modifier.forEach { element ->
  when (element) {
    is GrowModifier -> {
      flexGrow = element.value.toFloat()
    }
    is ShrinkModifier -> {
      flexShrink = element.value.toFloat()
    }

you get
traits[GrowTrait]?.let { element ->
  flexGrow = element.value.toFloat()
}
traits[ShrinkTrait]?.let { element ->
  flexShrink = element.value.toFloat()
}

Another place where map-like semantics are useful is with decorator modifiers (#1084). Setting a stable ID, background color, or accessibility description is something that should really only be done once.
I believe we can make this change in a backwards-compatible way with respect to the protocol because we send modifiers as an array of ID-keyed objects.

We have this problem where we want to scope an otherwise "global" trait to only work on a subset of nodes. But the fact that traits are an argument to the node limits our ability to scope things.
One thing we may be able to do is generate a scoping interface per widget function. And then the trait builder could inherit that generic from the parameter type.
Something like
object TextScope

fun Text(
  traits: Traits<TextScope> = Traits.empty(),
  text: String,
)

The trait builder would then also be parameterized like
fun <T : Any> buildTraits(body: T.() -> Unit): Traits<T> = ...

This would then allow a trait to be scope to specific widgets, even if it is from a dependency.
fun TextScope.fancyThing(...)

One problem with this is that we lose the normal receiver on the block which is used to interact with the backing trait builder, so we'll have to either wait for/force the use of context receivers or devise some other means.


No syntax highlghting for kotlin or R

I just got started with Hugo and struggle with syntax highlighting, but I'm unsure if I should report this to hugo repo or the theme. So let's try here first:
I've created a small example site using hugo-theme-learn as theme, but code chunks for R and kotlin have no syntax highlighing:

The corresponding hugo source file is https://github.com/holgerbrandl/hugo_example/blob/master/content/_index.md
What am I doing wrong? Or is highlighting supported restricted to some languages?

The template includes the default hightlight.js library. With this there are not all languages supported, but the "most common ones".
You can add support for other languages by just making you customer download at https://highlightjs.org/download/ and put the file highlight.pack.js into the static/js folder of your project, to it will overwrite the one from the theme itself.
After that it should work fine.


Adaptive Lights reported on when not reachable

I used to be using the hue plugin, now I've migrate to this new one. First of all thanks a lot!!!
I have a few lights that sometimes are completely unreachable (disconnected from a physical switch).
Some of those are detected/configured with the adaptive lightning. When that combination is on, those lights report as on when they are unreachable. In the logs I can see
[4/17/2023, 1:09:20 PM] [deCONZ] phoscon: request 66: PUT /lights/6/state {"ct":182}
[4/17/2023, 1:09:20 PM] [deCONZ] phoscon: warning: request 66: /lights/6/state: api error 202: resource, /lights/6/state, is not modifiable. Device is not reachable.

I have tried to add the value noResponse: true as what I could understand from the docs. But still the result is the same.
I don't know if a bug or a miss-configuration on my side.
I am using homebridge-deconz v0.1.13

Please attach the debug dump file, and indicate which lights this concerns.  Apart from the warning messages, do you actually experience any issue?

I have tried to add the value noResponse: true as what I could understand from the docs.

Where did you add it?  And what docs?

I have a few lights that sometimes are completely unreachable (disconnected from a physical switch).

That’s generally a bad idea and not recommended.  I know, your spouse is likely to disagree, and you might not have a choice.

I used to be using the hue plugin, now I've migrate to this new one.

Did you set wallSwitch in Homebridge Hue?  If so, you might want to set this in Homebridge deCONZ as well, only here it’s a dynamic setting per light, see the Wiki.

That’s generally a bad idea and not recommended. I know, your spouse is likely to disagree, and you might not have a choice.

🤣 do we all go through the same?
I know it is not ideal, but partner complains, and I have some devices to install behind the switch, but installation is old and I need to do lots of wiring. It was working okish (except that of course if someone switches off from the wall, automations stop working)

Did you set wallSwitch in Homebridge Hue? If so, you might want to set this in Homebridge deCONZ as well, only here it’s a dynamic setting per light, see the Wiki.

I didn't do anything special in the old install. Deconz reports the lights as off. It is in hombebridge that the state is changed.

Please attach the debug dump file, and indicate which lights this concerns. Apart from the warning messages, do you actually experience any issue?

I read the docs from the wiki https://github.com/ebaauw/homebridge-deconz/wiki/Configuration

and I have added it in my json
{
    …
 "platforms": [
        {
            "name": "Config",
            "port": 8581,
            "platform": "config"
        },
        {
            "name": "deCONZ",
            "noResponse": true,
            "platform": "deCONZ"
        }
    ]
}

But there was no effect after adding that.
I have enabled the debug logs in home bridge
[4/18/2023, 3:34:56 PM] [deCONZ] phoscon: request 6484: PUT /lights/7/state {"ct":192}
[4/18/2023, 3:34:56 PM] [deCONZ] phoscon: request 6484: 200 OK
[4/18/2023, 3:34:56 PM] [deCONZ] phoscon: request 6484: PUT /lights/7/state {"ct":192}
[4/18/2023, 3:34:56 PM] [deCONZ] phoscon: warning: request 6484: /lights/7/state: api error 202: resource, /lights/7/state, is not modifiable. Device is not reachable.

There is not much more info in the logs. I don't know if there is another way to add more info in the logs. I couldn't find how in the wiki.
All the lights are IKEA.
And after testing a little more, it happens not only with Adaptive Lights. It happens with all lights that get fully disconnected (by a physical switch). Only the adaptive lights are more visible in the logs as the color is being updated frequently

Deconz reports the lights as off. It is in hombebridge that the state is changed.

If the deCONZ API reports the light as off, Homebridge deCONZ forwards that state to HomeKit.  Is there a discrepancy between the state as reported by deCONZ vs the state in HomeKit?
If the light was on while cutting power, deCONZ continues to report it as on, and so will HomeKit.  deCONZ cannot tell the difference between radio interference vs the light's power being cut, and it assumes the light is still on.  The wallSwitch setting forces the light to be reported as off to HomeKit, when deCONZ reports it as unreachable.

it happens not only with Adaptive Lights. It happens with all lights that get fully disconnected

If you try and control a light that's unreachable, the warning with API error 202 is expected
Again: apart from the warning message, do you experience any issue?  If so, what is not working?

All the lights are IKEA.

Not helpful.  Which light types, and in particular: do they carry Execute If Off?  Hence my question for the dump file.  I changed the Adaptive Lighting logic in Homebridge deCONZ from Homebridge Hue to continue to update colour temperature while the light is off, for lights with Execute If Off.  But this new logic doesn't take into account whether the light is reachable.  Not sure if I can do so, without breaking other stuff.

I have tried to add the value noResponse: true as what I could understand from the docs. But still the result is the same.
I read the docs from the wiki https://github.com/ebaauw/homebridge-deconz/wiki/Configuration

Ah, I forgot about that page.  I wanted to copy that setting from Homebridge Hue, but it is not yet implemented.  Even if it were, it wouldn't change your situation.  Basically, it's a poor attempt at reporting unreachable Zigbee devices as No Response in HomeKit.  Unfortunately, that state cannot be set or cleared from the accessory (i.c. Homebridge); for that, you need to refresh the accessory state from Home, or another HomeKit app.


Add option to show Notification bar

Cloud you please add an option to show the notification bar like in Google Apps intros?

+1

+1

This is addressed in issue #69.


Handle broken "wo- rd" cases for pdf extraction

https://github.com/zequnyu/e2c/issues/31#issuecomment-658146589

Check the spelling of recovered word by querying whether it exists in startdict.csv.
There is no need for another database.

Closed by #46 and #50.