macOS Catalina Issue

My javaFX app uses this library to capture video from a webcam on windows and mac. It has worked great on both platforms up until now. I am testing on macOS Catalina beta2 and now getWebCams() is returning nothing. My discoveryListener is not firing either. I have enabled debug logging as described in the wiki and I don't see any errors. I am using the default driver. Any idea what could be going on??

Hi @burniejm
seems there is a change in security permissions in macOS Cataline as:
https://developer.apple.com/videos/play/wwdc2019/701/

I am also looking for a solution.

@sarxos any suggestions for that issue?

I am actually only using webcam-capture to enumerate cameras and populate a dropdown of cameras. I am then using openCV to grab frames from the selected device index (gathered from webcam-capture). Even hardcoding the device index didn't work until I updated to the newest javaCV (1.5). My project already uses ffmpeg for various video tasks, so I implemented the ffmpeg driver for webcam-capture and used the "list-devices" command to populate my dropdown. Hope this helps.

hi @burniejm
may I ask how you are able to run ffmpeg driver on macOS? it expects to have /dev/videoX (X is a . number) device on computer.

hi @burniejm
may I ask how you are able to run ffmpeg driver on macOS? it expects to have /dev/videoX (X is a . number) device on computer.

Since I don't actually use the webcam library to capture all I really need is the index of the video devices and the name. I do rely on this library to scan for hardware changes (usb camera add/remove) using the WebcamDiscoveryListener functionality. Here is my pared down getUnixDevices method:
private List<WebcamDevice> getUnixDevices() {
        List<WebcamDevice> devices = new ArrayList<WebcamDevice>();

        String[] command = {
                getCommand(),
                "-f",
                "avfoundation",
                "-list_devices",
                "true",
                "-hide_banner",
                "-i",
                "\"\""
        };

        ProcessBuilder processBuilder = new ProcessBuilder(command);
        processBuilder.redirectErrorStream(true);

        try {
            Process process = processBuilder.start();

            InputStream inputStream = process.getInputStream();
            InputStreamReader inputStreamReader = new InputStreamReader(inputStream);
            BufferedReader bufferedReader = new BufferedReader(inputStreamReader);

            String videoSeperator = "video devices";
            String audioSeperator = "audio devices";
            String captureScreenDevice = "capture screen";
            String line;

            while ((line = bufferedReader.readLine()) != null) {

                if(line.toLowerCase().contains(videoSeperator)) {
                    continue;
                }

                if(line.toLowerCase().contains(captureScreenDevice)) {
                    break;
                }

                if(line.toLowerCase().contains(audioSeperator)) {
                    break;
                }

                String[] lineArray = line.split("] ");
                FFmpegCliDevice device = new FFmpegCliDevice(lineArray[2]);
                devices.add(device);
            }

            try {
                process.waitFor();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        } catch (IOException ex) {
            ex.printStackTrace();

        }

        return devices;
    }

I added an FFMpegCliDevice constructor that just takes a name as well.

Hi @burniejm
thanks for the sharing, definitely only solution we have now to get the camera list and names on Catalina.
regards

I am trying to run it on macos catalina beta, I have 2 questions:
1-) It cannot find dependency in pom.xml for webcam-capture-driver-ffmpeg-cli

com.github.sarxos
webcam-capture-driver-ffmpeg-cli
0.3.12

2-) I have tried other drivers listed on the page but, It could not detect any camera with other drivers? How you have resolved it?

@ademzumbul I just manually added the driver files to my project as I couldn't get it to work using gradle.

Hello,
I am using OpenIMAJGrabber on MAC for handling camera device. Now after update MAC OSX to 10.15, i can't get listed devices (empty).
Can anyone share any information about how to work OpenIMAJGrabber on MAC 10.15?
Regards,
Pai

https://github.com/openimaj/openimaj/issues/170
Here is the issue for the default driver used by this library.

I'm having the same issue on Catalina. Looks like work was started on a fix for openimaj/openimaj#170 but no activity since Oct 2019.

The author of openimaj has just pushed an update 1.3.10 that fixes the Catalina issue.  @sarxos could you incorporate this update?

I have PR (https://github.com/sarxos/webcam-capture/pull/765) that may address this issue.

Hi @kkieffer Can you please take a look at the comment in your PR?

Hi guys,
This should already be fixed by commit https://github.com/sarxos/webcam-capture/commit/ae28f268f081f2a1b13f06578a0f4fddb6ffc568 from @kkieffer. Can you please verify this issue with latest JAR, that is 0.3.13-SNAPSHOT, which is available here:
https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=com.github.sarxos&a=webcam-capture&v=0.3.13-SNAPSHOT

@sarxos
I got the following error message on my macOS Catalina 10.15.4.
14:19:13.532 [main] DEBUG com.github.sarxos.webcam.Webcam - Setting new capture driver OpenImajDriver
Exception in thread "main" com.github.sarxos.webcam.WebcamException: java.util.concurrent.ExecutionException: com.github.sarxos.webcam.WebcamException: Cannot execute task
	at com.github.sarxos.webcam.WebcamDiscoveryService.getWebcams(WebcamDiscoveryService.java:124)
	at com.github.sarxos.webcam.Webcam.getWebcams(Webcam.java:893)
	at com.github.sarxos.webcam.Webcam.getDefault(Webcam.java:956)
	at com.github.sarxos.webcam.Webcam.getDefault(Webcam.java:933)
	at com.github.sarxos.webcam.Webcam.getDefault(Webcam.java:911)
	at gist.WebcamPanelExample.main(WebcamPanelExample.java:18)
Caused by: java.util.concurrent.ExecutionException: com.github.sarxos.webcam.WebcamException: Cannot execute task
	at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
	at com.github.sarxos.webcam.WebcamDiscoveryService.getWebcams(WebcamDiscoveryService.java:116)
	... 5 more
Caused by: com.github.sarxos.webcam.WebcamException: Cannot execute task
	at com.github.sarxos.webcam.WebcamProcessor$AtomicProcessor.process(WebcamProcessor.java:72)
	at com.github.sarxos.webcam.WebcamProcessor.process(WebcamProcessor.java:140)
	at com.github.sarxos.webcam.WebcamTask.process(WebcamTask.java:46)
	at com.github.sarxos.webcam.ds.openimaj.OpenImajDriver$GetDevicesTask.getDevices(OpenImajDriver.java:47)
	at com.github.sarxos.webcam.ds.openimaj.OpenImajDriver.getDevices(OpenImajDriver.java:67)
	at com.github.sarxos.webcam.WebcamDiscoveryService$WebcamsDiscovery.call(WebcamDiscoveryService.java:36)
	at com.github.sarxos.webcam.WebcamDiscoveryService$WebcamsDiscovery.call(WebcamDiscoveryService.java:26)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:830)
Caused by: java.lang.UnsatisfiedLinkError: 'org.bridj.Pointer org.openimaj.video.capture.OpenIMAJGrabber.getVideoDevices()'
	at org.openimaj.video.capture.OpenIMAJGrabber.getVideoDevices(Native Method)
	at org.openimaj.video.capture.VideoCapture.getVideoDevices(VideoCapture.java:221)
	at com.github.sarxos.webcam.ds.openimaj.OpenImajDriver$GetDevicesTask.handle(OpenImajDriver.java:58)
	at com.github.sarxos.webcam.WebcamProcessor$AtomicProcessor.run(WebcamProcessor.java:81)
	... 3 more

Process finished with exit code 1

Here is the source code which can be used to reproduce the case.
import javax.swing.JFrame;

import com.github.sarxos.webcam.Webcam;
import com.github.sarxos.webcam.WebcamPanel;
import com.github.sarxos.webcam.WebcamResolution;
import com.github.sarxos.webcam.ds.openimaj.OpenImajDriver;

public class WebcamPanelExample {

    static {
       Webcam.setDriver(new OpenImajDriver());
    }

    public static void main(String[] args) throws InterruptedException {
        Webcam webcam = Webcam.getDefault();
        webcam.setViewSize(WebcamResolution.VGA.getSize());

        WebcamPanel panel = new WebcamPanel(webcam);
        panel.setFPSDisplayed(true);
        panel.setDisplayDebugInfo(true);
        panel.setImageSizeDisplayed(true);
        panel.setMirrored(true);

        JFrame window = new JFrame("Test webcam panel");
        window.add(panel);
        window.setResizable(true);
        window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        window.pack();
        window.setVisible(true);
    }
}

Here is the project depenencies in maven approach, and I also tried the Grade way, still NOT work:
<dependency>
    <groupId>com.github.sarxos</groupId>
    <artifactId>webcam-capture</artifactId>
    <version>0.3.13-SNAPSHOT</version>
</dependency>
<dependency>
    <groupId>com.github.sarxos</groupId>
    <artifactId>webcam-capture-driver-openimaj</artifactId>
    <version>0.3.13-SNAPSHOT</version>
</dependency>
<dependency>
    <groupId>org.openimaj</groupId>
    <artifactId>core-video-capture</artifactId>
    <version>1.4-SNAPSHOT</version>
</dependency>
<dependency>
    <groupId>org.openimaj</groupId>
    <artifactId>faces</artifactId>
    <version>1.4-SNAPSHOT</version>
</dependency>

IMO. I think this error is caused by the openIMAJ 3rd library, because I got the same error message Caused by: java.lang.UnsatisfiedLinkError: 'org.bridj.Pointer org.openimaj.video.capture.OpenIMAJGrabber.getVideoDevices()' when I test the code which only depended on the openIMAJ library without import the webcam-capture package.
So, in your opinion, is there any solution to this problem. Or this is caused by the macOS Catalina 10.15.4, which is just released a few days ago.

@jingmingcn try commenting out this line:
Webcam.setDriver(new OpenImajDriver());
The fix from my PR addressed the built in default driver (which is openImaj) in webcam capture.  I neglected to remember that you can also load the external OpenImaj driver (separate source).
@sarxos can you also patch the driver-openimaj under webcam-capture-drivers?

@kkieffer  I got the same error message after removing the driver setting command line.
An update about this issue is the case works very well on my macOS Mojave 10.14.6. So I think this issue is caused by the lastest macOS Catalina 10.15.4, which requires more security permission.
I hope the information above will help you to figure out the problem and find a solution. Thanks for your great work.

I have only destined on Catalina 10.15.1.  Can you open your Console.app in /Applications/Utilities and see if anything is logged when you run?
Although I can now see which webcam devices are available, there's a problem when trying to open the camera.  In console I see this:
Prompting policy for hardened runtime; service: kTCCServiceCamera requires entitlement com.apple.security.device.camera but it is missing for REQ:{ID: net.java.openjdk.cmd, PID[1631], auid: 501, euid: 501, binary path: '/Library/Frameworks/Java/jdk-14.jdk/Contents/Home/bin/java'}

@kkieffer  I got the following message bundling to the process syspolicyd from the console.
assessment denied for libOpenIMAJGrabber.dylib
com.apple.message.domain: com.apple.security.assessment.outcome2
com.apple.message.signature2: bundle:UNBUNDLED
com.apple.message.signature3: libOpenIMAJGrabber.dylib
com.apple.message.signature5: UNKNOWN
com.apple.message.signature4: 1
com.apple.message.signature: denied:no usable signature
SenderMachUUID: 821D8C33-5B0B-317C-B2CB-29137C319A18

I am not sure whether the updates above would help or not. I am kind of lacking the system driver's developing experience.

Ok - I have a solution, although it's not going to be pretty.  But it does work.  First, the process "java" does not have an entitlement to use the camera. The only way around this as far as I can figure is to re-sign the java executable.  So for this you're going to need a Apple Developer certificate.

Find the java binary in your sdk.  Mine is located at:
/Library/Java/JavaVirtualMachines/current/Contents/Home/bin>

Create a file called entitlements.plist in the bin directory.  It's the same as the existing java entitlements but I added the camera entitlement at the end.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>com.apple.security.cs.allow-jit</key>
    <true/>
    <key>com.apple.security.cs.allow-unsigned-executable-memory</key>
    <true/>
    <key>com.apple.security.cs.disable-library-validation</key>
    <true/>
    <key>com.apple.security.cs.allow-dyld-environment-variables</key>
    <true/>
    <key>com.apple.security.cs.debugger</key>
    <true/>
    <key>com.apple.security.device.camera</key>
    <true/>
</dict>
</plist>

Codesign the java binary. Force will re-sign over the existing signature. Note this assumes you have a 3rd party developer certificate in your keychain:
codesign -s "3rd" --force --options runtime --entitlements entitlements.plist java

Find the Info.plist file located two directories up and copy it into the bin directory:
cp ../../Info.plist .

Edit this file and add this key:

<key>NSCameraUsageDescription</key>
<string>Arggh Catalina and Java!</string>

Now, assuming you run your test code with this java binary, it should work. You will get a prompt asking for permission to use the camera.
Unfortunately, you're not going to be able to redistribute your jar to anyone with Catalina since they won't have the re-signed java binary.
The solution will be to package into a .app with the correct entitlements.  However the JDK14 jpackage tool is broken at the moment and I'm waiting on this fix:
https://bugs.openjdk.java.net/browse/JDK-8237490

@kkieffer Thanks for your solution which I believe will work.  But in my own case, the java command is located in the system level folder named  /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands, which protected by the macOS SIP. For now, I have two options, one is turning off the SIP which is too risky for my macOS Catalina 10.15.4 laptop carrying important work in progress; another one would be installing a duplicate Java or JDK application to do the compiling work. I will give you the update once I finish the test case.
Thanks for your great idea which really blows my mind.

@kkieffer  Here is the update about the solution you provided in the last thread been applied on the macOS Catalina 10.15.4.
First, I have to correct one mistake in the previous thread I posted, which said about the java command in the folder /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands. It turns out that the java located in that folder is not a real java function file, but a java verifying function file. After I unzip a JDK version 14 distribution into the folder /Library/Java/JavaVirtualMachines, the java -version command running in the terminal (or the iTerm2) can detect the last JDK version I just installed.
The conclusion is I have failed to make the solution you have given works on my case.  By codesign the java file with the entitlement file and vi the Info.list with the insertion of the camera access declaration, the same error message still comes all the time.
12:28:49.212 [main] INFO  com.github.sarxos.webcam.Webcam - WebcamDefaultDriver capture driver will be used
12:28:49.221 [webcam-discovery-service] DEBUG c.g.s.w.d.b.WebcamDefaultDriver - Searching devices
Exception in thread "main" com.github.sarxos.webcam.WebcamException: java.util.concurrent.ExecutionException: com.github.sarxos.webcam.WebcamException: Cannot execute task
	at com.github.sarxos.webcam.WebcamDiscoveryService.getWebcams(WebcamDiscoveryService.java:124)
	at com.github.sarxos.webcam.Webcam.getWebcams(Webcam.java:893)
	at com.github.sarxos.webcam.Webcam.getDefault(Webcam.java:956)
	at com.github.sarxos.webcam.Webcam.getDefault(Webcam.java:933)
	at com.github.sarxos.webcam.Webcam.getDefault(Webcam.java:911)
	at gist.WebcamPanelExample.main(WebcamPanelExample.java:18)
Caused by: java.util.concurrent.ExecutionException: com.github.sarxos.webcam.WebcamException: Cannot execute task
	at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
	at com.github.sarxos.webcam.WebcamDiscoveryService.getWebcams(WebcamDiscoveryService.java:116)
	... 5 more
Caused by: com.github.sarxos.webcam.WebcamException: Cannot execute task
	at com.github.sarxos.webcam.WebcamProcessor$AtomicProcessor.process(WebcamProcessor.java:72)
	at com.github.sarxos.webcam.WebcamProcessor.process(WebcamProcessor.java:140)
	at com.github.sarxos.webcam.WebcamTask.process(WebcamTask.java:46)
	at com.github.sarxos.webcam.ds.buildin.WebcamDefaultDriver$GetDevicesTask.getDevices(WebcamDefaultDriver.java:79)
	at com.github.sarxos.webcam.ds.buildin.WebcamDefaultDriver.getDevices(WebcamDefaultDriver.java:124)
	at com.github.sarxos.webcam.WebcamDiscoveryService$WebcamsDiscovery.call(WebcamDiscoveryService.java:36)
	at com.github.sarxos.webcam.WebcamDiscoveryService$WebcamsDiscovery.call(WebcamDiscoveryService.java:26)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
	at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: java.lang.UnsatisfiedLinkError: 'org.bridj.Pointer com.github.sarxos.webcam.ds.buildin.natives.OpenIMAJGrabber.getVideoDevices()'
	at com.github.sarxos.webcam.ds.buildin.natives.OpenIMAJGrabber.getVideoDevices(Native Method)
	at com.github.sarxos.webcam.ds.buildin.WebcamDefaultDriver$GetDevicesTask.handle(WebcamDefaultDriver.java:93)
	at com.github.sarxos.webcam.WebcamProcessor$AtomicProcessor.run(WebcamProcessor.java:81)
	... 3 more

Process finished with exit code 1

assessment denied for libOpenIMAJGrabber.dylib
com.apple.message.domain: com.apple.security.assessment.outcome2
com.apple.message.signature2: bundle:UNBUNDLED
com.apple.message.signature3: libOpenIMAJGrabber.dylib
com.apple.message.signature5: UNKNOWN
com.apple.message.signature4: 1
com.apple.message.signature: denied:no usable signature
SenderMachUUID: 821D8C33-5B0B-317C-B2CB-29137C319A18

Thanks for your help anyway. Maybe the cause of the problem is due to my individual special case on macOS Catalina 10.15.4. I think I should switch to the macOS Mojave laptop to continue the work until the fix released in the future. So may God bless the programmers working on the openIMAJ project.

@kkieffer Here is the update.
I found a solution to solve this issue, which is by explicitly declaring an environment variable name DYLD_LIBRARY_PATH to a folder contains the libOpenIMAJGrabber.dylib file.

 It's a real issue. Adding libOpenIMAJGrabber.dylib to DYLD_LIBRARY_PATH environment variable is only a workaround. Ideally I would like this dylib to be loaded automatically the same way as it's done on the other for dll on Windows and so on Linux.
I'm not really familiar with the MacOS permissions, especially on the newer systems, and with current COVID-19 situation, have no access to Mac machine where I can test. If you have any ideas on how we can permanently fix this issue I'm willing to work this out somehow. Can building and signing it properly help in this case?

Ah, it turns out I had a copy of libOpenIMAJGrabber.dylib in my /usr/local/lib directory, which is why it worked for me.  Removing this, I see:
Exception in thread "main" java.lang.UnsatisfiedLinkError: 'org.bridj.Pointer org.openimaj.video.capture.OpenIMAJGrabber.getVideoDevices()
I'm not familiar with bridj so I'll have to dig into it again.  Perhaps @jonhare could comment.

@kkieffer
I have two suspicions:
Option 1, a wrong BridJ version. Now when I look at the POM there is BridJ 0.7.0 used in Webcam Capture API and 0.7-20140918-2 in OpenIMAJ. To verify this case you can download version 0.7-20140918-2 from OpenIMAJ Maven repo:
http://maven.ecs.soton.ac.uk/content/groups/maven.openimaj.org/com/nativelibs4java/bridj/0.7-20140918-2/bridj-0.7-20140918-2.jar
Replace original BridJ with the one you downloaded and redo the test. If it fails, move to option 2.
Option 2, and I only guess, may be caused by the denied assessment mentioned in https://github.com/sarxos/webcam-capture/issues/723#issuecomment-606679227. If this is the case then maybe having your version of signed dylib would be a better option. At least this is something we could test against to verify if this is the root cause.

Option 1 - That works!  However I had to manually do this, trying to change it in the pom file, I get this error:
`The POM for com.nativelibs4java:bridj:jar:0.7-20140918-2 is missing, no dependency information available.   Failed to execute goal on project webcam-capture: Could not resolve dependencies for project com.github.sarxos:webcam-capture:bundle:0.3.13-SNAPSHOT: Failure to find com.nativelibs4java:bridj:jar:0.7-20140918-2 in https://repo.maven.apache.org/maven2
I guess the folks from bridj need put release their next version.

@kkieffer @sarxos I remember now - there was a problem with dyncall in the bridj 0.7 (and 0.7-20140918) builds that meant that it wouldn't pick up libraries loaded from unusual locations (bridj stores the libs in the jar, and then unpacks them and links them dynamically) when using Catalina. This was in addition to the deprecated video capture apis that I had to rewrite the code for. My modified bridj is in the openimaj maven repo (just add maven.openimaj.org as an additional repo in your pom file and it should work): http://maven.ecs.soton.ac.uk/content/groups/maven.openimaj.org/com/nativelibs4java/bridj/0.7-20140918-2/
All it does is update the dyncall version (from last October).
I suspect that going forwards we are going to hit problems with the dylibs not being signed though  that will need addressing. I can probably sign the libOpenIMAJGrabber.dylib and the bridj dylibs, but I'm not sure if that will be enough (the java executable would need signing and also need entitlements to load dylibs from arbitrary places; I'm guessing the bridj dylibs need similar entitlements and the OpenIMAJ one needs the camera entitlement). I literally know nothing about any of this though!!

@jonhare can you submit your fix to bridj to their mainline?
I have not had a problem using unsigned openimaj library at this point but I'm actually surprised that it works without signing. In addition to signing the dylibs must be notarized for Catalina.
I don't think the dylibs need any entitlements.  That's for the binary (java) to supply.

Oh, the reason it works without signing the dylib is the java binary has the entitlement
com.apple.security.cs.disable-library-validation
which allows unsigned libraries to be executed.

@kkieffer not sure if @ochafik is still actively maintaining bridj these days... Olivier - ping me if you're able to do a new release and we can figure out what I changed.
The fact that library verification is disabled certainly makes things a lot easier for us for now! How does that interact with other entitlements though - does it allow the library to do absolutely anything (like open the camera, albeit with asking permission the first time around)?

You still need a camera entitlement for the main exe - and the changes you made in the dylib prompt the user for permission to use the camera.  I had to modify the java binary entitlement to include camera, as well as Info.plist with a reason why java should be able to use the camera. See:
https://github.com/sarxos/webcam-capture/issues/723#issuecomment-606714970

@kkieffer sorry, I'm asking lots of questions: can a library have an entitlement? I'd have assumed in our case the idea thing would be for the java executable to be allowed to load libraries (but not do anything else) & each library to have entitlements for anything specific they wanted to do (like access the camera)?

Good question - I could try signing the dylib with the entitlement.  But I think the Info.plist would still be needed on whatever is calling into the library.

No good - it appears the entitlement is tied to the launched binary, not the library.  I get this:

@sarxos Would like to put this thread to conclusion. With your latest snapshot jar and substituting in the bridj library version 0.7-20140918-2 from @jonhare I was able to build my java application into an .app, sign it, and distribute it to Catalina machines.  Running the app on Catalina, it prompts to use the camera correctly and if the user accepts, I get streaming video just fine.
I would say the problem is resolved but to tidy up, could you add the new bridj library as a dependency and release a new version to maven?
If if @ochafik is not actively maintaining bridj then perhaps either use the artifact from openimaj or one of us could fork bridj and release a new artifact to maven central.

@jonhare is the source that created bridj-0.7-20140918-2.jar available somewhere? Unsure whether it is at https://github.com/jonhare/nativelibs4java
I ask because there is another issue when using modules in Java 9+ discussed in #586 which requires a one line fix. I've created a jar which copies the .class files with this fix into bridj-0.7-20140918-2.jar and it's working on Catalina with Java modules, but obviously not ideal.

@jonhare I would also be curious where I could find the sources for the bridj-0.7-20140918-2 build.

@ekamikke @craigraw sorry - I missed this the first time around. I believe (but I'm not 100% sure) that it is based off https://github.com/jonhare/nativelibs4java (which added armhf and armel support), but with a new dyncall dylib (straight build of the dyncall 1.0 source) just for OSX. As it was a quick fix, I just patched the bridj-0.7-20140918 jar with the updated library.
For a quick fix, I could patch the bridj-0.7-20140918-2 jar with the change required for java 9 if someone tells me what needs changing?
Going forwards we should perhaps try to work together to sort this mess out... Probably starting with @ochafik's latest sources, merging in the changes from my branch for arm support (which really need testing on a modern arm platform, not one from 2014!) and fixing the Java 9 issue.

Hi @jonhare - no problems and thanks for the original fix! It's been working well. Would love to have the security of having access to the source though.
Re the Java 9 change, as I recall it's just a one line addition in Platform.java - see the last diff at this link: https://github.com/nativelibs4java/BridJ/compare/master...ConsensusJ:consensusj-master#
It effectively just removes the leading / from the path allowing the classloader to find the resource in Java 9 and up.

@jonhare I do agree with @craigraw that having the sources for builds would obviously be preferable. However this at least gives all the info on how to rebuild it if needed. Thanks a lot for the quick response!
I am using the 0.7-20140918-2 build as such in OpenJdk 11. No issues found when running org.openimaj:core-video-capture:1.3.10 on it on OSX Catalina or Windows 10.

Totally agreed we need to have actual source. Looking more closely I'm pretty much satisfied that the original 0.7-20140918 version corresponds with the HEAD of the master branch of https://github.com/jonhare/nativelibs4java (not least because the dates tie up exactly!)
I'll add the Java 9 fix & back-port the dyncall fix into my fork of the code and then make a new release. We we can think about whether we need any of the other changes that @ochafik made after the 18th Sept 2014...

@ekamikke @craigraw are you willing to do some testing? http://maven.openimaj.org/com/nativelibs4java/bridj/0.7-20140918-3/ has jars with a fix for java 9 and also the dyncall fix on OSX. My java 9 fix for modules is slightly different to the one-liner because I wasn't convinced that it wouldn't break older Java versions or non-module based projects in Java 9+. Source code for the build is here: https://github.com/jonhare/nativelibs4java/tree/0.7-20140918-3

Thanks @jonhare! It's working here on

OSX 10.15.7
OSX 10.13.6
Ubuntu 20.04.1
Windows 10

Hopefully @ochafik can make this an official release.

This is awesome @jonhare. Verified it works on OSX Catalina and Windows 10 on Corretto JDK 11. Thanks a whole bunch!
I forked your repo because we prefer to not depend on custom builds from unofficial repositories directly. With the changes you made I am able to compile and package the BridJ project, but only if I ignore tests. Did all tests pass for you?

@ekamikke re tests - yes tests were fine for me (Catalina 10.15.4, JDK 1.8.0_121). I had to update the STLTest and JAWTTest to the versions in the official HEAD version in one of the commits I made though...

Using webcam-capture 0.3.13-SNAPSHOT with bridj 0.7-20140918-3 (from maven.openimaj.org) makes everything work on Mac again for me.

I got a JVM crash with webcam-capture 0.3.13-SNAPSHOT and bridj 0.7-20140918-3.

macOS catalina 10.15.7 (19H15)
open JDK 1.8.0_231 (tried jdk 14 as well)

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00000001032dbaa0, pid=65460, tid=0x000000000000a703
#
# JRE version: Java(TM) SE Runtime Environment (8.0_231-b11) (build 1.8.0_231-b11)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.231-b11 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# V  [libjvm.dylib+0xdbaa0]  acl_CopyRight+0x29
#

Sometime I got another error:
[main] INFO com.github.sarxos.webcam.Webcam - WebcamDefaultDriver capture driver will be used
[atomic-processor-1] INFO com.github.sarxos.webcam.ds.cgt.WebcamOpenTask - Opening webcam FaceTime HD Camera (Built-in) 0x8020000005ac8514
[atomic-processor-1] INFO com.github.sarxos.webcam.ds.cgt.WebcamCloseTask - Closing FaceTime HD Camera (Built-in) 0x8020000005ac8514
[atomic-processor-1] INFO com.github.sarxos.webcam.ds.cgt.WebcamOpenTask - Opening webcam FaceTime HD Camera (Built-in) 0x8020000005ac8514
[frames-refresher-[0x8020000005ac8514]] ERROR com.github.sarxos.webcam.ds.buildin.WebcamDefaultDevice - Timeout when requesting image!

I works after I changed bridj maven url to http://maven.ecs.soton.ac.uk/content/repositories/thirdparty
the one from http://maven.ecs.soton.ac.uk/content/groups/maven.openimaj.org will cause crash

@sarxos Do you have any plans to wrap this into an official release?

@sarxos Do you have any plans to wrap this into an official release?

Not sure if I am doing something wrong, but I am not able to list the Webcams on my MacOS Catalina 10.15.7:
Caused by: java.lang.UnsatisfiedLinkError: 'org.bridj.Pointer com.github.sarxos.webcam.ds.buildin.natives.OpenIMAJGrabber.getVideoDevices()'
Caused by: java.lang.UnsatisfiedLinkError: 'org.bridj.Pointer com.github.sarxos.webcam.ds.buildin.natives.OpenIMAJGrabber.getVideoDevices()'

	at com.github.sarxos.webcam.ds.buildin.natives.OpenIMAJGrabber.getVideoDevices(Native Method)
	at com.github.sarxos.webcam.ds.buildin.WebcamDefaultDriver$GetDevicesTask.handle(WebcamDefaultDriver.java:93)
	at com.github.sarxos.webcam.WebcamProcessor$AtomicProcessor.run(WebcamProcessor.java:81)
	... 3 more

Here my gradle configuration:
repositories {
    mavenCentral()
    mavenLocal()
    maven { url 'http://oss.sonatype.org/content/repositories/snapshots' }
    maven { url 'http://maven.openimaj.org' }
}

dependencies {
    compile 'com.nativelibs4java:bridj:0.7-20140918-3'
    compile 'com.github.sarxos:webcam-capture:0.3.13-SNAPSHOT'
}

What is wrong with my configuration?

Hi cansik,
your configuration is right, on MacOS, there are heavy issues there in bridj and openimag. Please try other driver temporarily. Since bridj and openimag are out of maintenance, There are plan to replace built in driver depends on bridj and openimag.
thanks,

@cansik @alexmao86 the raw openimaj grabber works fine for me on both 10.15.7 (I've tested both jdk 1.8.0_121 and jdk_1.8.0_281) as well as a clean install of Big Sur (using the latest 1.4-snapshot of the openimaj grabber and bridj:0.7-20140918-3) - note I'm not using webcam-capture, just openimaj directly.
The error @cansik reported comes from within webcam-capture and would suggest that perhaps the libOpenIMAJGrabber.dylib either wasn't correctly unpacked into the classpath or that it was perhaps an old version?

Hi all,
What is the status now with getting it to work with Catalina 10.15.7 as off 19th May 2021?
I am just running out of the box using the default driver.
When I tried:
<dependency>
    <groupId>com.github.sarxos</groupId>
   <artifactId>webcam-capture</artifactId>
   <version>0.3.12</version>
 </dependency>

I got:
 No Webcam

When I tried the snapshot version:
   <repositories>
        <repository>
            <id>Sonatype OSS Snapshot Repository</id>
            <url>http://oss.sonatype.org/content/repositories/snapshots</url>
        </repository>
    </repositories>

    <dependency>
        <groupId>com.github.sarxos</groupId>
        <artifactId>webcam-capture</artifactId>
        <version>0.3.13-SNAPSHOT</version>
    </dependency>

and I am getting the same error as mentioned above:
 Caused by: com.github.sarxos.webcam.WebcamException: Cannot execute task
at com.github.sarxos.webcam.WebcamProcessor$AtomicProcessor.process(WebcamProcessor.java:72)
at com.github.sarxos.webcam.WebcamProcessor.process(WebcamProcessor.java:140)
at com.github.sarxos.webcam.WebcamTask.process(WebcamTask.java:46)
at com.github.sarxos.webcam.ds.buildin.WebcamDefaultDriver$GetDevicesTask.getDevices(WebcamDefaultDriver.java:79)
at com.github.sarxos.webcam.ds.buildin.WebcamDefaultDriver.getDevices(WebcamDefaultDriver.java:124)
at com.github.sarxos.webcam.WebcamDiscoveryService$WebcamsDiscovery.call(WebcamDiscoveryService.java:36)
at com.github.sarxos.webcam.WebcamDiscoveryService$WebcamsDiscovery.call(WebcamDiscoveryService.java:26)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
at java.base/java.lang.Thread.run(Thread.java:832)

Caused by: java.lang.UnsatisfiedLinkError: 'org.bridj.Pointer com.github.sarxos.webcam.ds.buildin.natives.OpenIMAJGrabber.getVideoDevices()'
at com.github.sarxos.webcam.ds.buildin.natives.OpenIMAJGrabber.getVideoDevices(Native Method)
at com.github.sarxos.webcam.ds.buildin.WebcamDefaultDriver$GetDevicesTask.handle(WebcamDefaultDriver.java:93)
at com.github.sarxos.webcam.WebcamProcessor$AtomicProcessor.run(WebcamProcessor.java:81)
... 3 more
I am on Catalina and I do not know if there are even bigger problems with Big Sur?
Can any smart person help me out on this one?
The software needs to be a bit portable, I cannot expect users to do hacky things.
If it is being sorted out, then I am happy to do hacky stuff while I develop the software (knowing that by the time I finish the issue is resolved).
Thank you for your time.

Does anyone know a driver that will work with Mac Catalina? - I have tried all the ones that seem to support Mac and they all have issues - I think due to the permission problem of Catalina.  There is a lot of talk and fixes - I have tried everything to no avail - it seems stange to me that it is so hard.  Any help would be great. Prior to Catalina I had no issues with Webcam and Java.

Use the bridj-0.7-20140918-3 as referenced above: https://github.com/sarxos/webcam-capture/issues/723#issuecomment-711025597
    repositories {
        mavenCentral()
        maven { url 'https://maven.ecs.soton.ac.uk/content/groups/maven.openimaj.org/' }
    }

    implementation('com.nativelibs4java:bridj:0.7-20140918-3')
    implementation('com.github.sarxos:webcam-capture:0.3.13-SNAPSHOT') {
        exclude group: 'com.nativelibs4java', module: 'bridj'
    }

@craigraw thanks for your reply
I tried with repositories:
  <repositories>
        <repository>
            <id>Sonatype OSS Snapshot Repository</id>
            <url>http://oss.sonatype.org/content/repositories/snapshots</url>
        </repository>
        <repository>
            <id>mavenCentral()</id>
            <url>https://maven.ecs.soton.ac.uk/content/groups/maven.openimaj.org/</url>
        </repository>
    </repositories>

and dependencies:
    <dependency>
        <groupId>com.nativelibs4java</groupId>
        <artifactId>bridj</artifactId>
        <version>0.7-20140918-3</version>
    </dependency>

    <dependency>
        <groupId>com.github.sarxos</groupId>
        <artifactId>webcam-capture</artifactId>
        <version>0.3.13-SNAPSHOT</version>
        <exclusions>
            <exclusion>
                <groupId>com.nativelibs4java</groupId>
                <artifactId>bridj</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

     <dependency>
        <groupId>com.github.sarxos</groupId>
        <artifactId>webcam-capture-driver-openimaj</artifactId>
        <version>0.3.13-SNAPSHOT</version>
    </dependency>

    <dependency>
        <artifactId>image-processing</artifactId>
        <groupId>org.openimaj</groupId>
        <version>1.3.10</version>
        <scope>compile</scope>
    </dependency>

When I try in STS the jvm crashes
When I try on the command line, it does not crash but I get a null Webcam:
Caused by: java.lang.NullPointerException: Cannot invoke "com.github.sarxos.webcam.Webcam.setViewSize(java.awt.Dimension)" because "webcam" is null
at com.spotadev.lb.StartGui.started2(StartGui.java:95) ~[classes!/:1.0-RELEASE]

I have also tried:
setting env variable DYLD_LIBRARY_PATH to a folder that contains the libOpenIMAJGrabber.dylib file

My code included:
 static {

    Webcam.setDriver( new OpenImajDriver() );
 }

@PostConstruct( )
public void started2() throws IOException {
    try {
        Webcam webcam = Webcam.getDefault();
        webcam.setViewSize( WebcamResolution.VGA.getSize() );

        WebcamPanel panel = new WebcamPanel( webcam );
        panel.setFPSDisplayed( true );
        panel.setDisplayDebugInfo( true );
        panel.setImageSizeDisplayed( true );
        panel.setMirrored( true );

        JFrame window = new JFrame( "Test webcam panel" );
        window.add( panel );
        window.setResizable( true );
        window.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
        window.pack();
        window.setVisible( true );
    }
    catch ( Exception e ) {

        logger.error( peerName, e );
        throw e;
    }
}

I am super stuck and wish this would work.   Any pointers anyone can give will be super helpful.
@sarxos what do you think about all of this.
This webcam thing is super important for me.
Thank you all for your time.

I am running this in production, on Catalina and Big Sur no issues.  My libs are these (using Ant - yes, still using Ant)

One difference, I've only ever tried this on JDK14.  Perhaps back off JDK15 and see if it works?

@kkieffer Thank you for your comment.
I installed
% java --version
java 14.0.1 2020-04-14
Java(TM) SE Runtime Environment (build 14.0.1+7)
 Java HotSpot(TM) 64-Bit Server VM (build 14.0.1+7, mixed mode, sharing)

I printed my webcams and in the code selected my "FaceTime HD Camera (Built-in)"
I debugged in the code and was able to call methods like:
 selectedWebcam.setViewSize( WebcamResolution.VGA.getSize() );

However when I call:
 WebcamPanel panel = new WebcamPanel( selectedWebcam );

it is at that point that the VM crashes.  If I look at the log the last log statement it printed was:
2021-05-21 02:53:37.275  INFO 31772 --- [mic-processor-1] c.g.s.w.d.c.WebcamOpenTask               : Opening webcam FaceTime HD Camera (Built-in) 0x8020000005ac8514

Some questions:
(i) I have no popups or anything asking me for permission - do you get asked for permission to access the webcam when you run your code?
(ii) Do you have this env varable set?
   DYLD_LIBRARY_PATH to a folder that contains the libOpenIMAJGrabber.dylib file

I changed to the exact versions of bridj and webcam-capture as you.  So there must be something different you are doing to me.
Do you have anything that I can run that works for you, that way, I could run to see if it works for me.  Ideally that should be a jar that I just run like:
 java -jar someJar

Thank you for your time

Hi Guys,
I am still stuck. If we are trying to get the code working on Mac Catalina, are we supposed to have an automated build that produces a dmg file using something like jpackage that does signing of the native libraries and the whole artefact?
If that is true, are we supposed to do that every time we want to test the code - i.e. is there a dev mode for doing this stuff without signing jars etc?
Web browsers have a requirement that one uses SSL for the webcam, however if you are using a localhost domain this restriction does not apply.
Is there something equivalent with Catalina, Java and webcams?
Can anyone advise what to do or let me know if they are working on getting support for Catalina?
Else I will have to become a specialist in this field to get over this hurdle.  That may involve learning JNI and the security model of the Mac.  I was hoping the library could handle some of that complexity.
Thank you
Regards
JD

I tried to get webcam working with Mac OS Catalina and the vlc driver and when I call:
        logger.info( "Number webcams = " + Webcam.getWebcams().size() );

I get:
com.github.sarxos.webcam.WebcamException: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException:
No media discoverer for 'video' is available on this platform
at com.github.sarxos.webcam.WebcamDiscoveryService.getWebcams(WebcamDiscoveryService.java:124) ~[webcam-
   capture-0.3.13-SNAPSHOT.jar:?]
at com.github.sarxos.webcam.Webcam.getWebcams(Webcam.java:893) ~[webcam-capture-0.3.13-SNAPSHOT.jar:?]
at com.github.sarxos.webcam.Webcam.getWebcams(Webcam.java:866) ~[webcam-capture-0.3.13-SNAPSHOT.jar:?]
at com.github.sarxos.webcam.Webcam.getWebcams(Webcam.java:845) ~[webcam-capture-0.3.13-SNAPSHOT.jar:?]

My maven dependencies are:
   <dependency>
        <groupId>com.nativelibs4java</groupId>
        <artifactId>bridj</artifactId>
        <version>0.7-20140918-2</version>
    </dependency>

    <dependency>
        <groupId>com.github.sarxos</groupId>
        <artifactId>webcam-capture</artifactId>
        <!--<version>0.3.13-SNAPSHOT</version>-->
        <version>0.3.13-20200330.202351-7</version>
        <exclusions>
            <exclusion>
                <groupId>com.nativelibs4java</groupId>
                <artifactId>bridj</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

    <dependency>
        <groupId>com.github.sarxos</groupId>
        <artifactId>webcam-capture-driver-vlcj</artifactId>
        <version>0.3.13-SNAPSHOT</version>
    </dependency>

    <dependency>
        <groupId>uk.co.caprica</groupId>
        <artifactId>vlcj</artifactId>
        <version>3.12.1</version>
    </dependency>

Actually I cannot get MacOS Catalina working with any driver - this is becoming a nightmare.  Anyone know about this vlc error?  Is something missing from the caprica functionality or is this because something is missing from the sarxos webcam-capture library?
I just need a single way to get MacOS Catalina working with the webcam-capture library - it seems none of the options work.    If anyone knows how to get it working on MacOS Catalina please let me know and I will owe you a lorry load of beers - Thank you.

I tried to get webcam working with Mac OS Catalina and the opencv driver and when I call:
    logger.info( "Number webcams = " + Webcam.getWebcams().size() );

I get:
  com.github.sarxos.webcam.WebcamException: java.util.concurrent.ExecutionException:
  java.lang.NoClassDefFoundError: org/bytedeco/javacpp/opencv_videoio$VideoCapture
 at com.github.sarxos.webcam.WebcamDiscoveryService.getWebcams(WebcamDiscoveryService.java:124) ~[webcam-
  capture-0.3.13-SNAPSHOT.jar:?]
at com.github.sarxos.webcam.Webcam.getWebcams(Webcam.java:893) ~[webcam-capture-0.3.13-SNAPSHOT.jar:?]
at com.github.sarxos.webcam.Webcam.getWebcams(Webcam.java:866) ~[webcam-capture-0.3.13-SNAPSHOT.jar:?]
at com.github.sarxos.webcam.Webcam.getWebcams(Webcam.java:845) ~[webcam-capture-0.3.13-SNAPSHOT.jar:?]

My pom.xml had:
 <dependency>
        <groupId>com.nativelibs4java</groupId>
        <artifactId>bridj</artifactId>
        <version>0.7-20140918-2</version>
    </dependency>

    <dependency>
        <groupId>com.github.sarxos</groupId>
        <artifactId>webcam-capture</artifactId>
        <!--<version>0.3.13-SNAPSHOT</version>-->
        <version>0.3.13-20200330.202351-7</version>
        <exclusions>
            <exclusion>
                <groupId>com.nativelibs4java</groupId>
                <artifactId>bridj</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

    <!-- opencv =========================================================================-->
    <dependency>
        <groupId>com.github.sarxos</groupId>
        <artifactId>webcam-capture-driver-opencv</artifactId>
        <version>0.3.13-SNAPSHOT</version>
    </dependency>

    <dependency>
        <groupId>org.bytedeco</groupId>
        <artifactId>javacv-platform</artifactId>
        <version>1.5.3</version>
    </dependency>

Maybe the sarxos code needs an older version of opencv?
Every driver I try with MacOs Catalina I have issues - I think they are all different issues.

I am actually only using webcam-capture to enumerate cameras and populate a dropdown of cameras. I am then using openCV to grab frames from the selected device index (gathered from webcam-capture). Even hardcoding the device index didn't work until I updated to the newest javaCV (1.5). My project already uses ffmpeg for various video tasks, so I implemented the ffmpeg driver for webcam-capture and used the "list-devices" command to populate my dropdown. Hope this helps.

@burniejm I am using javacv because I wanted to record webcam and mic into a single video file.  My problem with javacv is that this code does not work:
  int webcams = videoInput.listDevices();

I think that is the same code that did not work for you?
Since then did you find out whether it is because a jar of native stuff is missing, or is it a dependency problem?
I wrote about my error for videoInput.listDevices() at:
 https://github.com/bytedeco/javacv/issues/1650

Thanks for your time

Hi, please try this driver, it should work with recent MacOS versions https://github.com/eduramiba/webcam-capture-driver-native


The nfs templates cannot be used when creating a cluster

Describe the Bug
The nfs templates cannot be used when creating a cluster
Versions Used
Kubernetes: v1.1.0
Kubeclipper: v1.1.0
Environment
How many nodes and their hardware configuration:
CentOS 7.7.1908
masters: 4cpu/8g
How To Reproduce
Steps to reproduce the behavior:

Go to 'Cluster Manager - Cluster'
Click on 'Create Cluster' and select offline image
Jump to 'Storage Config'
Can not select nfs templates

Screenshot

/assign @lysign

/milestone v1.1.0

fixed in https://github.com/kubeclipper-labs/console/pull/71
/close


Added Wrapper script for Forest

This is our BenchExec wrapper script

Are the -svcomp and -svcomp_only_output options always necessary or are they just the specific configuration you want to run in SV-Comp? The typical way to handle configuration options of tools within BenchExec is to allow the user to specify them in the benchmark configuration file, not have them hard-coded in the tool wrapper
(except if your tool absolutely requires these options).
This makes the wrapper script added to BenchExec useful for your tool in general, not only specifically for SV-Comp. Thus I would suggest to remove both optione and specify it in the system description together with your additional parameters (for machine model etc.).
Does your tool have a version number you can extract automatically? Then it would be great to overwrite version and do so (makes it nicer for users, but is not required). You can probably simply call self._version_from_tool.

El 05/11/2015 10:04, "Philipp Wendler"<EMAIL_ADDRESS>escribió:

Are the -svcomp and -svcomp_only_output options always necessary or are
they just the specific configuration you want to run in SV-Comp?

They are specific for sv-comp.

The typical way to handle configuration options of tools within BenchExec
is to allow the user to specify them in the benchmark configuration file,
not have them hard-coded in the tool wrapper
(except if your tool absolutely requires these options).

Who is "the user" in this case?. Do I have to modify the "benchmark
configuration file" ?. Sorry, but I don't know where this file is.

This makes the wrapper script added to BenchExec useful for your tool in
general, not only specifically for SV-Comp. Thus I would suggest to remove
both optione and specify it in the system description together with your
additional parameters (for machine model etc.).
Does your tool have a version number you can extract automatically?

No, but I can add it. For the moment there's only one person working in the
project, and we release only a version a year, for sv-comp.
Then it would be great to overwrite version and do so (makes it nicer for
users, but is not required). You can probably simply call
self._version_from_tool.
Do you prefer that I implement a way to show the version from the tool, or
call _version_from_tool ?

—
Reply to this email directly or view it on GitHub.

Are the -svcomp and -svcomp_only_output options always necessary or are
they just the specific configuration you want to run in SV-Comp?

They are specific for sv-comp.
The typical way to handle configuration options of tools within BenchExec

is to allow the user to specify them in the benchmark configuration file,
not have them hard-coded in the tool wrapper
(except if your tool absolutely requires these options).
Who is "the user" in this case?. Do I have to modify the "benchmark
configuration file" ?. Sorry, but I don't know where this file is.

Sorry if I was unclear, let me explain a little bit more.
When you use BenchExec for benchmarking, you specify everything about the benchmark in a certain file (the benchmark definition file): which input files are used, which tool is used, which resource limits, which configuration options for the tool etc. BenchExec then takes this information and determines how often it has to execute the benchmarked tool and with which command lines. For the latter question, it uses the tool wrapper like the one from this pull request: given an input file and some user-specified options, what is the exact command line that needs to be executed.
Now, if the tool wrapper always adds certain configuration options to the command line, nobody will be able to use BenchExec to benchmark your tool in a different configuration. Thus, the typical way is that the tool wrapper does not enforce such options (except if they are absolutely required for this tool). Then everyone who wants to benchmark your tool can decide and specify freely which configuration options to use: SV-Comp will be able to use -svcomp if you tell them so in your submitted system description, and other users will be able to use other options.
You do not need to write this benchmark definition file, but the SV-Comp organizers will need to do this (and everybody else who wants to use BenchExec for benchmarking). If you are interested in how this looks, you can look at our example file.

Does your tool have a version number you can extract automatically?
No, but I can add it. For the moment there's only one person working in the
project, and we release only a version a year, for sv-comp.

Then it would be great to overwrite version and do so (makes it nicer for
users, but is not required). You can probably simply call
self._version_from_tool.

Do you prefer that I implement a way to show the version from the tool, or
call _version_from_tool ?

Actually, it would be both. BenchExec just would like to have a version that it can show in the benchmark results. If your tool does not have a version that is ok for BenchExec, but it would be nice to have. How the version is determined depends on the function version of your tool wrapper. The typical way is that this function starts the tool with some special parameter and extracts the version from the tool output. Because this is so common, we provide a helper function _version_from_tool that does exactly this: start your tool with --version (by default) and return the output.
So if you want to provide a version number, you would need to do both: let your tool have a version number, and add some way to the tool wrapper to extract the version from the tool (possibly using our helper function).

2015-11-05 12:34 GMT+01:00 Philipp Wendler<EMAIL_ADDRESS>
Now, if the tool wrapper always adds certain configuration options to the
command line, nobody will be able to use BenchExec to benchmark your tool
in a different configuration. Thus, the typical way is that the tool
wrapper does not enforce such options (except if they are absolutely
required for this tool).

Then everyone who wants to benchmark your tool can decide and specify

freely which configuration options to use: SV-Comp will be able to use
-svcomp if you tell them so in your submitted system description, and
other users will be able to use other options.

OK, Now I think I understand better. So, the parameter -svcomp is specific
for the competition and maybe should be integrated in the benchmark
definition file. However, the -svcomp_output_only formats the output in
such a way that is readable by the "determine_result" function, and
therefore I think it should be left in the wrapper script.

Actually, it would be both. BenchExec just would like to have a version
that it can show in the benchmark results. If your tool does not have a
version that is ok for BenchExec, but it would be nice to have. How the
version is determined depends on the function version of your tool
wrapper. The typical way is that this function starts the tool with some
special parameter and extracts the version from the tool output. Because
this is so common, we provide a helper function _version_from_tool that
does exactly this: start your tool with --version (by default) and return
the output.

So if you want to provide a version number, you would need to do both: let

your tool have a version number, and add some way to the tool wrapper to
extract the version from the tool (possibly using our helper function).

OK, I'll do this and update the wrapper script. I've not find any example
of tool that uses the --version in the wrapper script, though. Can you
point me to an example?, or this doesn't need to be implemented in the
wrapper script?.
For all the changes we have discussed, do I need to create another pull
request, or can I update this one?.
Regards.

—
Reply to this email directly or view it on GitHub
https://github.com/dbeyer/benchexec/pull/84#issuecomment-154036837.

--
_                                      =   (
255,
lambda
V       ,B,c
:c   and Y(VV+B,B,  c
-1)if(abs(V)<6)else
(              2+c-4abs(V)-0.4)/i
)  ;v,      x=1500,1000;C=range(vx
);import  struct;P=struct.pack;M,
j  ='<QIIHHHH',open('M.bmp','wb').write
for X in j('BM'+P(M,vx3+26,26,12,v,x,1,24))or C:
i  ,Y=_;j(P('BBB',(lambda T:(T*80+T9
i-950T  99,T70-880T18+701*
T  9     ,T*i(1-T**45*2)))(sum(
[              Y(0,(A%3/3.+X%v+(X/v+
A/3/3.-x/2)/1j)*2.5
/x   -2.7,i)**2 for
A       in C
[:9]])
/9)
)   )
-. .----------------------------------------------------
Y
,,  ,---,
(,/_/
._/_/>
'-'   '-'

OK, Now I think I understand better. So, the parameter -svcomp is specific for the competition and maybe should be integrated in the benchmark definition file. However, the -svcomp_output_only formats the output in such a way that is readable by the "determine_result" function, and therefore I think it should be left in the wrapper script.

Yes, this is exactly how it should be.

I've not find any example of tool that uses the --version in the wrapper script, though. Can you point me to an example?, or this doesn't need to be implemented in the wrapper script?.

Actually, most wrappers do this, for example the ones for CBMC and CPAchecker. Almost all wrappers use our helper function, I think the wrapper for SMTInterpol is currently the only one that does not.

For all the changes we have discussed, do I need to create another pull request, or can I update this one?.

Just update this request, that's fine.

Changes made. I hope this can be merged :smiley:

The changes look good, thanks.
However, I just noticed the command-line paramer 2>/dev/null. Is this really on purpose? BenchExec will not use a shell to run your tool to avoid all the nasty escaping issues, thus your tool will end up with 2>/dev/null as literal input option instead of redirecting stderr to /dev/null.
There is no way to tell BenchExec to ignore stderr of a tool because I think the user should get all output. If you really want to do this, you need to adjust your tool. If your tool really should get 2>/dev/null as input parameter this is ok of course. Sorry for not noticing this earlier, the long line width hid this.

What I want to do with "2>/dev/null" is to ignore the output of stderr and not receiving it in the "determine_result" function. I don't want this to be passed as a parameter :stuck_out_tongue_closed_eyes:. I presume from your last message there's no way do differentiate in "determine_result" what comes from stdout and what comes from stderr?. Are both of them combined in the same string and this is what we get?. How are lines separated?, by a '\n' char?. Thanks.

Yes, both stdout and stderr of the tool are combined together and there is no way to differentiate between them. This is because (a) I think the full output of the tool should be given to the user, BenchExec should not hide anything, and (b) I do not know any way of keeping stdout and stderr separate in a meaningful way. Yes, we could capture stdout and stderr separately, but then we would loose the time relationship between the stdout lines and the stderr lines. This makes it very hard and sometimes impossible to interpret the output of tools that write both on stdout and stderr.
The parameter output of determine_result is a list, not a single string. Each entry of the list is one line of output of the tool.

OK, I've removed the redirection. It should still work because I check for the answer in the list via "in" operator in Python. Please tell me if there's any other concern.
Pablo


[fix] new dashboard state

new dashboard should always be V2, do not show preview message
According to designer's feedback, if user create new dash/add chart to existed dash from explore view, should show dashboard in view mode.

can you clarify this case:
owner opens dashboard in V1, he will see promotion message to preview in V2. If non-owner open this dashboard, and tries to save-as, should we save the v1 version in V1 or V2?

I think if editing v1, saving should be v1 and if editing v2, saving should be v2.

Owner can edit or save-as v1 or v2, as long he choose.
if a viewer is not dashboard's owner, he can not edit.


fix(amplify-codegen-appsync-model-plugin): revert lazy load

Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Codecov Report

Merging #2917 into master will increase coverage by 3.36%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master    #2917      +/-   ##
==========================================
+ Coverage   58.08%   61.44%   +3.36%
==========================================
  Files         231      222       -9
  Lines       12060    11400     -660
  Branches     2475     2228     -247
==========================================
  Hits         7005     7005
+ Misses       4741     4087     -654
+ Partials      314      308       -6

Impacted Files
Coverage Δ

...-plugin/src/visitors/appsync-typescript-visitor.ts
0% <ø> (ø)
:arrow_up:

...-plugin/src/visitors/appsync-javascript-visitor.ts
0% <0%> (ø)
:arrow_up:

...c-simulator/src/schema/directives/aws-subscribe.ts
0% <0%> (ø)
:arrow_up:

packages/amplify-cli/src/context-extensions.ts
25.69% <0%> (ø)
:arrow_up:

...lify-graphql-types-generator/src/compiler/index.ts
90.32% <0%> (ø)
:arrow_up:

...plify-appsync-simulator/src/server/subscription.ts
0% <0%> (ø)
:arrow_up:

...y-graphql-types-generator/src/compiler/legacyIR.ts
96.72% <0%> (ø)
:arrow_up:

...y-appsync-simulator/src/schema/directives/index.ts

...plify-appsync-simulator/src/velocity/util/index.ts

...y-appsync-simulator/src/velocity/util/map-utils.ts

... and 12 more

Continue to review full report at Codecov.

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


UI: add record administration panel

closes https://github.com/inveniosoftware/invenio-app-rdm/issues/2408

Looking good! 🔥


trxdb-loader should handle temporary tikv failures

PD dynamically (re-) assigns raft leaders that handle certain regions. When this happens during writes it seems that a write might fail due to region misses or leader updates. Such cases should be handled (not sure how, probably just retry the batch put?)
Jul 01 18:17:26 eos-trxdb11 dfuseeos[11633]: time="2020-07-01T18:17:26Z" level=info msg="drop regions that on the store 8(<IP_ADDRESS>:20160) due to send request fail, err: rpc error: code = DeadlineExceeded desc = context deadline exceeded"
Jul 01 18:17:33 eos-trxdb11 dfuseeos[11633]: 2020-07-01T18:17:33.624Z (trxdb-loader) 5sec AVG INSERT RATE (trxdb-loader/loader.go:316){"block_num": 128000596, "last_tick_block": 128000547, "block_sec": 1.75}
Jul 01 18:18:11 eos-trxdb11 dfuseeos[11633]: time="2020-07-01T18:18:11Z" level=warning msg="backoffer.maxSleep 20000ms is exceeded, errors:\nnot leader: region_id:152233 , ctx: &{{152233 233 17} id:152233 start_key:\"eos-v1-trxdb;\\005\\324\\177a\\264hj
Jul 01 18:18:11 eos-trxdb11 dfuseeos[11633]: 2020-07-01T18:18:11.704Z (launcher)
Jul 01 18:18:11 eos-trxdb11 dfuseeos[11633]: ################################################################
Jul 01 18:18:11 eos-trxdb11 dfuseeos[11633]: Fatal error in app trxdb-loader:
Jul 01 18:18:11 eos-trxdb11 dfuseeos[11633]: process block failed: Leaving ProcessBlock on failed flushAllMutations: regionMiss
Jul 01 18:18:11 eos-trxdb11 dfuseeos[11633]: ################################################################
Jul 01 18:18:11 eos-trxdb11 dfuseeos[11633]:  (launcher/launcher.go:174)
Jul 01 18:18:11 eos-trxdb11 dfuseeos[11633]: 2020-07-01T18:18:11.705Z (dfuse) Application trxdb-loader shutdown unexpectedly, quitting (cli/start.go:116)
Jul 01 18:18:11 eos-trxdb11 dfuseeos[11633]: Error: unable to launch: process block failed: Leaving ProcessBlock on failed flushAllMutations: regionMiss
Jul 01 18:18:11 eos-trxdb11 dfuseeos[11633]: 2020-07-01T18:18:11.705Z (cli) dfuse (derr/cli.go:25){"error": "unable to launch: process block failed: Leaving ProcessBlock on failed flushAllMutations: regionMiss"}
Jul 01 18:18:12 eos-trxdb11 systemd[1]: dfuse.service: Main process exited, code=exited, status=1/FAILURE
Jul 01 18:18:12 eos-trxdb11 systemd[1]: dfuse.service: Failed with result 'exit-code'.

Jul 07 23:23:31 eos-trxdb12d dfuseeos[11484]: time="2020-07-07T23:23:31Z" level=warning msg="backoffer.maxSleep 20000ms is exceeded, errors:\nregion not found for key \"eos-v1-trxdb;\\x05g\\x9fÑv\\xb5\\xe7H@\\xb0\\xb90L\\x0e\\xc3\\xfb\\xf1\\x17\\b`w\\xd
Jul 07 23:23:31 eos-trxdb12d dfuseeos[11484]: 2020-07-07T23:23:31.083Z (launcher)
Jul 07 23:23:31 eos-trxdb12d dfuseeos[11484]: ################################################################
Jul 07 23:23:31 eos-trxdb12d dfuseeos[11484]: Fatal error in app trxdb-loader:
Jul 07 23:23:31 eos-trxdb12d dfuseeos[11484]: process block failed: Leaving ProcessBlock on failed flushAllMutations: updateLeader
Jul 07 23:23:31 eos-trxdb12d dfuseeos[11484]: ################################################################
Jul 07 23:23:31 eos-trxdb12d dfuseeos[11484]:  (launcher/launcher.go:174)
Jul 07 23:23:31 eos-trxdb12d dfuseeos[11484]: 2020-07-07T23:23:31.083Z (dfuse) Application trxdb-loader shutdown unexpectedly, quitting (cli/start.go:116)
Jul 07 23:23:31 eos-trxdb12d dfuseeos[11484]: Error: unable to launch: process block failed: Leaving ProcessBlock on failed flushAllMutations: updateLeader
Jul 07 23:23:31 eos-trxdb12d dfuseeos[11484]: 2020-07-07T23:23:31.083Z (cli) dfuse (derr/cli.go:25){"error": "unable to launch: process block failed: Leaving ProcessBlock on failed flushAllMutations: updateLeader"}
Jul 07 23:23:31 eos-trxdb12d systemd[1]: dfuse.service: Main process exited, code=exited, status=1/FAILURE
Jul 07 23:23:31 eos-trxdb12d systemd[1]: dfuse.service: Failed with result 'exit-code'.

Yeah, we should have simple retries there, with a backoff. I'll put this issue in the planning.

Actually it seems like most of those failures are a strong indicator that the Tikv cluster is overloaded. So another (maybe better) solution would be to stop, but save the last successfully written block number. That allows to fix Tikv issues / reduce the load and then continue from where it stopped.

Okay there's no way to operate a Tikv cluster without this retry handling. We added a simple solution that waits for number_of_retries * 10 minutes. This helps a lot.


[Setting UI] Add ability to change language-specific settings

Type : Feature request
VSCode provides the ability to change settings based on the language type using such notation :
"[java]": {
    "files.autoSave": "off",
    "editor.fontFamily": "'Fira Mono', Consolas, 'Courier New', monospace"
}

It would be great if the Settings UI be able to change settings based on those languages. Since any setting can be changed under languages, the UI itself wouldn't change - there'd simply be an indicator that you are modifying setting for the language [LANGUAGE].
Quick mockup :

Under the triple dot, a new option would appear : Change by language which is either a dropdown for all available languages or a button that opens the language picker (I would prefer the language picker, because it would even be easier to enter custom language id this way).
There would also be a button somewhere to come back to changing settings in general (not language-specific).
The fix for #60055 was to basically open the json setting because the Setting UI does not handle language-specific settings - if this feature would be implemented, the Configure language specific settings command could open this new mode automatically, therefore respecting the user's setting ui choice.

I have #58995 for this request


add CUB200 prototype datasets

This is the only popular vision dataset (according to this list) that we are currently missing.
cc @pmeier @bjuncek

will also fix this: https://github.com/pytorch/vision/issues/1654

Another frequent dataset for metric learning is Stanford Online Products...

Test failure is unrelated.

I guess it would be nice to include some okay metric learning tutorial / reference impl using CUB/Stanford Online Products, this could be a useful example of new-style dataset usage


Next-state relation disabled when it is not

---- MODULE Foo ----

VARIABLE x

Init == x = TRUE

Next == x' = ~x
====

Thanks


pagination

how to set total count displaying in pagination?
how to set position about  seletions of page items?
thanks

My answer is all are unavailable on this component.Cause of these feature are not primary requirements for this components currently. But I can add these two feature in tuture :)

HI @MaxwellZhou, I add some pagination feature base your requirement and some idea in v1.0.0.
A quick example as follow,

   var options = {
      page: 2,  //which page you want to show as default
      sizePerPageList: [5,10], //you can change the dropdown list for size per page
      sizePerPage: 5,  //which size per page you want to locate as default
      paginationSize: 3,  //the pagination bar size.
    }

    //....

Thanks a lot.
<EMAIL_ADDRESS>From: AllenFang
Date: 2015-10-04 15:56
To: AllenFang/react-bootstrap-table
CC: MaxwellZhou
Subject: Re: [react-bootstrap-table] pagination (#59)
HI @MaxwellZhou, I add some pagination feature base your requirement and some idea in v1.0.0.
A quick example as follow,
var options = {
page: 2,  //which page you want to show as default
sizePerPageList: [5,10], //you can change the dropdown list for size per page
sizePerPage: 5,  //which size per page you want to locate as default
paginationSize: 3,  //the pagination bar size.
}
//....

—
Reply to this email directly or view it on GitHub.

How do I add the overall total rows? Like 'Showing 1-10 of 134'


Add hint that cec-database does not provide coefficients for the sapm function

Please have a look at the commits 5f0df9f and 110688e. Commit f81529b contains only pep8 changes. Sorry it is knee-jerk and if you don't like you can just revert it.
The first commit (5f0df9f) fixes the table in the docstring of the sapm function. It does not show up in the current documentation (see: http://pvlib-python.readthedocs.org/en/latest/pvlib.html#pvlib.pvsystem.sapm)
The third commit (110688e) adds the new hints. Please fix typos if necessary, my English is not too good.
There are 6 Errors using nosetest3 but they have been there before my changes.

It has nothing to do with this pull request but as I compiled the documentation I fixed this warning.

Thanks, looks great! I'd been meaning to fix those documentation warnings too.
I'll add this to the whatsnew file after we merge #93.
What are the nosetest3 errors? The travis build passed and the appveyor build fails due to an issue with continuum's new mkl libraries (I think).

The reason why AppVeyor does not pass has to do with failing tests:
pvlib.test.test_atmosphere.test_absoluteairmass_numeric ... ok
pvlib.test.test_atmosphere.test_absoluteairmass_nan ... ok
pvlib.test.test_clearsky.test_ineichen_required ... Command exited with code -1073741819

It might has to do something with a missing scipy installation on my computer. Here is the output of nosetests (the outputs of nosetests and nosetest3 are the same).
======================================================================
ERROR: pvlib.test.test_clearsky.test_ineichen_required
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/home/uwe/rli-lokal/git_home/pvlib-python/pvlib/test/test_clearsky.py", line 37, in test_ineichen_required
    out = clearsky.ineichen(times, tus)
  File "/home/uwe/rli-lokal/git_home/pvlib-python/pvlib/clearsky.py", line 120, in ineichen
    interp_turbidity=interp_turbidity)
  File "/home/uwe/rli-lokal/git_home/pvlib-python/pvlib/clearsky.py", line 230, in lookup_linke_turbidity
    'supply your own turbidities.')
nose.proxy.ImportError: The Linke turbidity lookup table requires scipy. You can still use clearsky.ineichen if you supply your own turbidities.
-------------------- >> begin captured logging << --------------------
pvlib: DEBUG: irradiance.extraradiation()
pvlib: DEBUG: Calculating ET rad using Spencer method
pvlib: DEBUG: using PyEphem to calculate solar position
pvlib: DEBUG: tz_localize to US/Arizona and then tz_convert to UTC
--------------------- >> end captured logging << ---------------------

But why does appveyor has the same problem?
https://ci.appveyor.com/project/wholmgren/pvlib-python-fv2to/build/1.0.77/job/840xrjrxb1jnben7
It is just a python2 problem.
https://ci.appveyor.com/project/wholmgren/pvlib-python-fv2to

Yes, on your computer it's due to missing scipy. I added the @requires_scipy decorator to that test in #93 so that developers can still run most of the tests without scipy.
I think that the issue on appveyor is a little different. That error is the result of something going very wrong when the python interpreter interacts with the scipy binary that Continuum created. While I don't know exactly where the problem is, this would not be the first time that Continuum distributed a less than perfect scipy distribution.

Thanks again!


Resize readme gif

Gif needed a little reduction in size. Set it as 480 px wide.

Codecov Report

Merging #42 into master will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff          @@
##           master    #42   +/-   ##
=====================================
  Coverage     100%   100%
=====================================
  Files          16     16
  Lines         244    244
=====================================
  Hits          244    244

Continue to review full report at Codecov.

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


Arm Commands

Added Arm + Wrist Commands (uses preset angles extracted from new PositionType enum)
Manual Arm Override Command

Turns off periodic motor voltage activities and motor speeds are now controlled by joystick inputs
left joystick = wrist
right joystick = arm

Angle Towards Center of Mass Calculator

Used for calculating arm feed forward

We should plan for the (likely) possibility that ArmFeedforward and SysId only works for single jointed arms (aka we lied earlier when we said they would work). At least from what I can tell, the docs don't explicitly how many joints are supported, although the equation shown here looks like it would only apply to single jointed arms. Thinking through a) how to control the arm and b) how to characterize it would be useful.

Still to do: calibrate set points for arm positions.
I think this could still be merged in though


Authentication Failed

Hello I am trying to embed widgets into my SPA.
I am able to get the accessToken no problem (via MSAL), but when trying to render the (approvalCenter) widget i get the following error:
Time:
Server/Client Correlation ID: a5b725a8-2485-4cf5-9f0c-5c7de917abad
Error: Authentication failed.
When using a different widget type (flows), I do not get this error rather an endless loading animation.
I am using msflowsdk-1.1.js
If you'd like to see the code please let me know and I will give access to my gitlab repository.
this.msflowsdk = new MsFlowSdk({
        hostName: "https://flow.microsoft.com",
        locale: "en-US"
      });
      this.approvalCenterWidget = this.msflowsdk.renderWidget(
        "approvalCenter",
        {
          container: "flow-div",
          enableOnBehalfOfTokens: true,
          flowsSettings: {},
          templatesSettings: {},
          approvalSettings: {},
          widgetStyleSettings: {}
        }
      );
      var that = this;
      this.approvalCenterWidget.listen("GET_ACCESS_TOKEN", function(
        requestParam,
        widgetDoneCallback
      ) {
        widgetDoneCallback(null, {
          token: that.$store.state.accessToken
        });
      });
      this.approvalCenterWidget.listen("WIDGET_READY", function() {
        console.log("The flow widget is now ready.");
      });
      this.approvalCenterWidget.listen("WIDGET_RENDERED", function() {
        console.log("The flow widget is now rendered.");
        document.getElementById("flow-div").className = "flow-container";
      });
      this.approvalCenterWidget.listen(
        "RECEIVED_APPROVAL_STATUS_CHANGED",
        function(param) {
          console.log(
            "The received approval has changed status. The current count of approvalRequests is " +
              param.data.approvalRequestsCount
          );
        }
      );

Thank you,
Lars

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: fac3ad92-eb8f-554a-5de3-14c430e594aa
Version Independent ID: fab1ceb3-5110-4452-0a0d-99346cc31230
Content: Integrate Microsoft Flow with websites and apps - Microsoft Flow
Content Source: flow-docs/developer/embed-flow-dev.md
Service: flow
GitHub Login: @bbarath
Microsoft Alias: barathb

Hello... any response?

Hi @lmvdz . Sorry for the long delay here. This came through as documentation feedback where customers submit feedback regarding what's in our documentation, and update our docs based on that feedback. I think you are looking for product support. Have you tried submitting this on the Power Automate Community?

Hi @Dean-Haas,
Sorry, I have just given up on using the library now... Perhaps I'll try again and see if I can get it working this time around. I'll make sure to post in the correct place if I run into an issue.
Thanks,
Lars

Hi @lmvdz
Did you ever get this integration working?


Fixes greyed out 'Active Manage Bed' button in Location Management Page #8814

Proposed Changes

Fixes #8814

Change 1 Resolved issue where the 'Active Manage Bed' button was greyed out in the Location Management Page.

@ohcnetwork/care-fe-code-reviewers
Merge Checklist

[ ] Add specs that demonstrate bug / test a new feature.
[ ] Update product documentation.
[ ] Ensure that UI text is kept in I18n files.
[ ] Prep screenshot or demo video for changelog entry, and attach it to issue.
[ ] Request for Peer Reviews
[ ] Completion of QA

Hey @bodhish ,
Could you please take a look at this asset?
https://github.com/user-attachments/assets/6a0c73e1-d770-4611-866b-67cbd0cdedb3
Let me know if it can be modified or improved. Thanks!

The button seems to be disabled if beds count is 0. How would I be able to add a bed for that location now?

Hey @rithviknishad ,
I’ve updated the code to disable the button only when totalBeds is null or undefined,
.Please check it out!

Now that it's disabled if null, we don't need to add conditional classes like @bodhish suggested right?

hey @rithviknishad ,
I see your point about simplifying the classes since the button is disabled when totalBeds is null. However, I think keeping the conditional classes for opacity is helpful for providing visual feedback. It allows users to see that the button is inactive (with reduced opacity) when there are no beds available, enhancing usability.
But I'm open to further discussion if you think a simpler approach would be better. Let me know your thoughts!

The ButtonV2 component already applies necessary visual feedbacks for it when disabled.
https://github.com/ohcnetwork/care_fe/blob/develop/src/Components/Common/components/ButtonV2.tsx#L101

hey @rithviknishad ,
Thanks for pointing that out! the ButtonV2 component already handles the necessary styles when it's disabled
I’ll update the code accordingly to rely on the built-in styles from ButtonV2. Thanks for your guidance!

Tested working fine @nihal467

LGTM

hey @rithviknishad   could you check this out?

why are we having a button when its a link ??
mentioned that we're using a button, but it's meant for navigation (like a link). Should we wrap it inside a  component instead of using  directly?

hey @rithviknishad
Since ButtonV2 automatically handles the link behavior when href is provided,
don't need to manually wrap the button in a Link

 <ButtonV2         id="manage-bed-button"         variant="secondary"         border         className="mt-3 flex w-full items-center justify-between"         href={location/${id}/beds}         disabled={totalBeds == null}       >         Manage Beds         <span className="flex items-center justify-center gap-2">           <CareIcon icon="l-bed" className="text-lg" />           {totalBeds ?? "--"}         </span>       </ButtonV2>


TypeScript failing to narrow field types indexed w/ const assertions

Bug Report
🔎 Search Terms
const assertion
const narrow
assertion narrow
🕗 Version & Regression Information
First seen in 4.1.2, reproduced in 4.4.3 and 4.5.0-dev.20210919.

This is the behavior in every version I tried, and I reviewed the FAQ for entries about "Type System Behavior", "Type Guards", "Things That Don't Work"

⏯ Playground Link
Playground link with relevant code
💻 Code
const test: { myfield?: number } = {};
const constField = 'myfield' as const;

if (test[constField]) {
  console.log(test[constField] + 1); // Object is possibly 'undefined'
  console.log(test.myfield + 1); // Object is possibly 'undefined'
}

🙁 Actual behavior
TypeScript is not able to narrow test[constField] from undefined|number to number
🙂 Expected behavior
TypeScript infers that test[constField] is simply number in the if block

Looks like duplicate of #44899 and linked issues.

This is also possibly a https://github.com/microsoft/TypeScript/issues/10530 duplicate - an issue that appears frequently since 2016, the solution was already proposed as a PR but was declined.

indeed this seems to be a duplicate, closing in favor of #10530


[Bug] Web based karma tests are no longer running

What version of OpenTelemetry are you using?
Current rebase of the contribu repo
What version of Node are you using?
16.14.0
What did you do?

clean fetch of repo
npm install
npm run install
Go into the plugins/web/opentelemetry-instrumentation-document-load
npm run test

What did you expect to see?

passing tests

What did you see instead?

failing tests

@MSNev if you have it handy can you post the failure? If not i'll just run it myself

D:\MSNev1\opentelemetry-js-contrib\plugins\web\opentelemetry-instrumentation-document-load>npm run test:browser

><EMAIL_ADDRESS>test:browser
> nyc karma start --single-run

Webpack bundling...
Error: EINVAL: invalid argument, mkdir 'C:\Users\newylie\AppData\Local\Temp\_karma_webpack_341915\D:\MSNev1\opentelemetry-js-contrib\plugins\web\opentelemetry-instrumentation-document-load\build\src'

The normal documented way to avoid this issue is to set the webpack
optimization: {
    runtimeChunk: false,
    splitChunks: false
}

However, these options did not work for the contrib repo

Is that a windows-specific issue? I ask because it didn't get caught during the initial PR to update to webpack 5. It's a bummer that we have to roll back to a previous testing version just for a single plugin.

No it's not, it's just a little more obvious because of the drive letter embedded in the resulting path that it uses to understand what is going on.
https://github.com/ryanclark/karma-webpack/issues/489
And in the contrib repo #1129 also hit it on a non-windows box https://github.com/open-telemetry/opentelemetry-js-contrib/pull/1129#discussion_r957504262

Interesting. That looks really similar to an error I was having on macos with temp directories in the main repo with webpack 5. any idea why this has taken so long to be a problem?

I think it's environmental, the main tests on GitHub seem to be passing. So it's really just as people start contributing their setup's (including mine) have issues with the defaults.


Multiple resolution problem

Hi, great work! I have one question about Multiple resolution.
In docs/Report-v1.2.0.md,  you point out that by using Bucket training strategy, you can use multiple resolution and multiple length of videos for training. However, the weights released (e.g. 93x720p, 93x480p, etc.) only support video generation with a fixed length and resolution. I want to ask why there is not a weight that support multiple length and resolution videos' generation?

It seems that **the Bucket training strategy** isn't used in v1.2.0.

Yes, we use in next version.

Thanks for your answer!


builtins: implement ST_AddMeasure

PR: https://github.com/cockroachdb/cockroach/pull/61514
From release notes:

The ST_AddMeasure function is now available for use. [#61514][#61514] {% comment %}doc{% endcomment %}

Documented on functions and operators and mentioned elsewhere in docs via #10555


Add linux/arm64 support to the main release

The image only exists for linux/amd64. It's hard to run the image or Helm chart locally on arm-based macOS.

sorry closed by mistake, reopening

This would be very nice to have to aid in testing and running this locally on ARM-based Macs.


ViewModel reset prior to View disappearing

When we call PopPageModel with animate=true the input controls on the View temporarily appear as zero.
For example if we bind a Entry to a double property
<Entry Text="{Binding TemperatureValue}"></Entry>
Then call
await this.CoreMethods.PopPageModel(newTemperature, true, true);
The text box resets to blank and that is visible for about 0.5 seconds before the View disappears. This is because the BindingContext gets set to Null prior to the View disappearing.
If I remove the binding in BindingContextChanged then the TextBox\Entry field continues to display data as I'd expect but I assume that isn't the expected approach.
protected override void OnBindingContextChanged()
{
    if (this.BindingContext == null)
    {
        this.txtTemperature.RemoveBinding(SfNumericTextBox.ValueProperty);
    }

    base.OnBindingContextChanged();
}

I assume this is By Design. Is there a suggested approach to prevent the momentary flash of an unbound View?
UPDATE
I have also asked this question StackOverflow, https://stackoverflow.com/questions/60171744/freshmvvm-and-resetting-vm-before-popping-modal

I'm struggling with this problem too. It hurts badly in my scenario because I have property bound two way with a converter on it and the ConvertBack method gets called with null values and crashes. I could workaround this but then my viewmodel would receive a bad value to persist so that's not an option. @rid00z this looks like a big bug to go unnoticed for so long, what are we missing here?

@nexxuno I do think it is a bug and it's good to hear i'm not the only one. I'd love to get some input from @rid00z but in the meantime I have updated the stackoverflow question with the solution we have gone with, https://stackoverflow.com/questions/60171744/freshmvvm-and-resetting-vm-before-popping-modal/61118083#61118083


feat: change column's default property to nullable (NULL)

I hereby agree to the terms of the GreptimeDB CLA
What's changed and what's your intention?
change column's default property to nullable (NULL).
Please explain IN DETAIL what the changes are in this PR and why they are needed:

Summarize your change (mandatory)
change column's default property to nullable.
How does this PR work? Need a brief introduction for the changed logic (optional)
Describe clearly one logical change and avoid lazy messages (optional)
Describe any limitations of the current code (optional)

Checklist

[x]  I have written the necessary rustdoc comments.
[x]  I have added the necessary unit tests and integration tests.

Refer to a related PR or issue link (optional)

@azhsmesos hi, are u still working on this issue?

@azhsmesos hi, are u still working on this issue?

Sorry for the delay in these days, I have time to write on the weekend.

@azhsmesos hi, are u still working on this issue?

Sorry for the delay in these days, I have time to write on the weekend.

Ah, just a reminder.  Thank you.

Closed by #751


Add link to ESLint rules via url attribute of the Diagnostic API

Fixes #151. Relies on https://github.com/Microsoft/vscode/pull/61436 to implement diagnostic URLs in VS Code (fixing https://github.com/Microsoft/vscode/issues/11847), as well as https://github.com/Microsoft/vscode-languageserver-node/pull/432.
This PR does three things:

Add eslint-rule-documentation to retrieve URLs as a fallback to the rules metadata, so older versions of ESLint / older versions of plugin rules can also benefit from URLs.
Make the URL retrieval work with versions of ESLint before v4.15.0 (2018-01-06), which introduced  CLIEngine#getRules().
Use the (new) url attribute of diagnostics to forward the ESLint rule's URL to VS Code, for display wherever.

Changes 1. and 2. could be useful now without further changes in VS Code or anywhere else. I can make separate PRs for these if they seem desirable enough.
Here is what the end result looks like at the moment (WIP):

The instructions to try this out locally are at the end of https://github.com/Microsoft/vscode/pull/61436.

Closing because of https://github.com/Microsoft/vscode/pull/61436#issuecomment-437942788.


Property:digitizationLevelSource

Definition
Indicator of whether the DigitizationLevel data are calculated from the digital records, or manually estimated

Existing property

Existing class

Existing property identifier

Format
Text

Required

Repeatable
no

Constraints
Controlled vocabulary

Examples
Calculated; Reported

Notes

Deprecated in favour of MeasurementOrFact class


brainstorm statistics and metrics for the dashboard

Current issues / open questions regarding statistics

questionType is not always set - is this a bug or a feature?
the rating (thumbs) are VERY hard to see/ find.
thumbs down should not be the default -> it should be a specific event (three categories)
how persistent is the user_id? -> is it only one session?

Build a question/answer aggregation tool to be able to select what we want

Add source URL
Use general telemetry (like location, device, language)
Count of thumbs up / total requests , Count of thumbs down / total requests, Count of not using thumbs at all / total requests
Number of bot usage compared to visits (check with Yanlong) (if too low maybe add annoying thing that says talk to me)
Number of requests per day per week per month, what time of day
Percentage of typed vs suggested questions compares to the total number of questions (after we fix the issue of missing type for some requests)
how many times the bot is not confident
show qa and add filter options
average questions per client_id (for a client how many questions are asked)

clarify the meaning of thumb_up field. @Hippopotamus0308

verify that all the collected data have questionType @Hippopotamus0308

towards thumbup, I will judge the value in the script, if there is no thumbup, this value will be set as undefined, but towards questionType value, currently I haven't figured out a good way to solve it. Shall I also set it as undefined?

why is questionType not kept when feedback is given? Best way to solve it is to just always keep it?

current design document for the dashboard
next step: meet with kelly to plan design

@nan-wang please review the design document for the dashboard


Change "s.dependency 'React'" to "s.dependency 'React-Core'"

I'm using this script:
https://gist.github.com/HosseinRashno/4786b289356ad9840b6c087ce8191fe4
to check
https://github.com/react-native-kit/react-native-track-player/blob/dev/react-native-track-player.podspec
and it says:
Detected podspec with wrong dependency ----> node_modules/react-native-track-player/react-native-track-player.podspec
Fixed podspec with wrong dependency ----> node_modules/react-native-track-player/react-native-track-player.podspec

https://github.com/react-native-kit/react-native-track-player/commit/02953da33a681722476b0ba423b76322252f4020


Fixes direct SettingsPanel insertion bug

Fixes #6.
Instead of an assertion, a normal "if" check is made.

Thanks a lot!! I'll merge it!
btw, the reason I slightly modified the code is to reduce branches. After doing some quite extensive performance testing for the 1.0 release (like 15 hours or so) after having the popup take like 150ms to happen on my laptop I didn't find a clear culprit, but concluded that if-statements in gd script are horribly slow, so I went on a mad rant to remove every one I could and swapped them for asserts (including the one causing the bug funny enough). Again. Thanks a lot for taking the time to do this. It really makes a big difference and the credit for the bug and fix is all yours, I'm just nit picking :)


Update configure-cloud-provider-firewall.md

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
For 1.12 Features: set Milestone to 1.12 and Base Branch to release-1.12
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Please delete this note before submitting the pull request.

I worked with Microsoft support and this feature is supported on AKS. "I did reach out to my backend team for clarification and they assured that this should work for you though the document doesn’t specify that it will work on Azure."

@jrudley Thank you for your contribution. Please sign the CLA so we can accept your PR

If you're having trouble signing the CLA, or you have signed it and it's not
working correctly, see https://github.com/cncf/servicedesk for more info. You
can also contact #sig-contribex on Slack. We cannot accept this contribution
until the checks are working correctly. Thanks!

@jrudley Just a friendly reminder to sign the CLA if you are able to

Sorry, I will not be able to get to this as I am out of town. Please reject the pr

On Aug 6, 2018, 8:48 PM, at 8:48 PM, Zach Arnold<EMAIL_ADDRESS>wrote:

@jrudley Just a friendly reminder to sign the CLA if you are able to
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
https://github.com/kubernetes/website/pull/9686#issuecomment-410906253

@jrudley Ok. Thanks!

/close


Training on large corpora is extremely slow, anyway to parallelize the pattern detector?

Using the recommended memory settings above certain improves the training speed(most requests are sub-second). Classification requests take anywhere between 15 to 30 seconds. Any way to speed them up ? Also, if multiple classify requests are sent in parallel, it throws a 500.


Certify GCP FIrestore state as Stable

Certify GCP Firestore state as Stable component

/assign

Add GCP Firestore state store to conformance tests

Write certification tests

Update status to "Stable"


Display booktitle for publications of type incollection.

Until now, only publications of type inproceedings have the booktitle attribute shown, although incollection would benefit from it as well.

thanks for this fix!


Fix typos

While reading the documentation I noticed some typo's. I hope this is ok :)

@langens-jonathan thank you for the corrections;  would you be able to sign the commit, and we can merge this.

hey @mbwhite  I think I have done so now


[Code health] Add RX utility for handling errors and displaying them in the UI

@gino-m proposed adding an RX converter called handleErrors that would effectively serve the role of doOnError, onErrorReturn, and friends and do the following:

Catch an error emitted by a stream.
Log an exception
(if applicable) show an error message in the UI in a consistent manner.

It'd be used (roughly) as follows:
offlineBaseMapRepository
            offlineBaseMapRepository.getOfflineAreasOnceAndStream())
              .getOfflineAreasOnceAndStream()
              .compose(handleErrors("Error loading base map", ImmutableList.of()));

See Gino's original comment for more info.

Similarly, we could add a helper called logErrors that reports them to logcat, but doesn't actually eat the error.


TypeError: Cannot read property 'getHostNode' of null

On the demo, I was stuck on the Poster List with the filter food.
Sadly, I was unable to reproduce the issue but I remember that I have manipulated the application a lot.

When I clicked on the menu, I had this error on the console:

Console error
Uncaught (in promise) TypeError: Cannot read property 'getHostNode' of null
    at Object.getHostNode (ReactReconciler.js:63)
    at f.getHostNode (ReactCompositeComponent.js:384)
    at Object.getHostNode (ReactReconciler.js:63)
    at Object.updateChildren (ReactChildReconciler.js:113)
    at h._reconcilerUpdateChildren (ReactMultiChild.js:213)
    at h._updateChildren (ReactMultiChild.js:312)
    at h.updateChildren (ReactMultiChild.js:299)
    at h._updateDOMChildren (ReactDOMComponent.js:936)
    at h.updateComponent (ReactDOMComponent.js:754)
    at h.receiveComponent (ReactDOMComponent.js:716)

And when I clicked on a edit button on a Poster, I had this one:

Console error
Uncaught Error: Minified React error #136; visit http://facebook.github.io/react/docs/error-decoder.html?invariant=136&args[]=r for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    at n (reactProdInvariant.js:31)
    at f.updateComponent (ReactCompositeComponent.js:584)
    at f.receiveComponent (ReactCompositeComponent.js:547)
    at Object.receiveComponent (ReactReconciler.js:125)
    at Object.updateChildren (ReactChildReconciler.js:109)
    at h._reconcilerUpdateChildren (ReactMultiChild.js:213)
    at h._updateChildren (ReactMultiChild.js:312)
    at h.updateChildren (ReactMultiChild.js:299)
    at h._updateDOMChildren (ReactDOMComponent.js:936)
    at h.updateComponent (ReactDOMComponent.js:754)
    at h.receiveComponent (ReactDOMComponent.js:716)

I wasn't even able to remove the filter or something.

Closing, as there is no way we can fix this bug without reproducing it, or usable logs. Feel free to reopen once you have a scenario for reproducing it.


Unable to install/build: "Local modules not found"

Hello,
I am interested in forking the project in order to translate it to Spanish, however I am unable to install/build it and I'm not familiar enough with node and its ecosystem to be able to fix it.
Steps to reproduce:

Install node 18.16.0/npm 9.5.1
Clone repo,
Run npm install in the main directory. There are several warnings about outdated packages, but it's able to build successfully.
Run npm install in the example directory. I get this error:

npm ERR! Cannot read properties of undefined (reading 'extraneous')

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/jaquer/.npm/_logs/2023-04-29T15_41_53_535Z-debug-0.log

I did some research and found this StackOverflow answer suggesting removing package-lock.json and trying npm install again, but then I got this error:
npm ERR! code 1
npm ERR! path /home/jaquer/src/dnd-character-sheets/node_modules/typescript
npm ERR! command failed
npm ERR! command sh -c gulp build-eslint-rules
npm ERR! [07:30:10] Local modules not found in ~/src/dnd-character-sheets/node_modules/typescript
npm ERR! [07:30:12] Try running: npm install

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/jaquer/.npm/_logs/2023-04-29T15_29_45_002Z-debug-0.log

My searches for solutions have been fruitless. I can post the entire log somewhere if necessary.
I am running Debian 11.6 under WSL, in case that matters.
Let me know if you need any more information. Thank you.

I'm still unsure of where the incompatibility lies, but I was able to get the project to build by using node 14 (14.21.3 to be exact).

Hi @jaquer. Thanks for raising this and for the detail you've provided. Glad you could get it working. I'll try and recreate and fix when I can.

Has there been any progress on this issue? I tried to run the example as well but getting the same error over here.