Disabling local video track causes crash

I am using TwilioVideo for calls over the internet. I am trying to support disabling video.
Based on the example code, I expected this would do the trick:
localVideoTrack?.isEnabled = false

Where localVideoTrack is an instance of TVILocalVideoTrack created using:
let camera = TVICameraCapturer(source: .frontCamera, delegate: self)
localVideoTrack = TVILocalVideoTrack.init(capturer: camera!)

I used basically the same approach with the TVILocalAudioTrack to mute and unmute microphone, which works like a charm.
However, with video, when I call:
localVideoTrack?.isEnabled = false

I get a crash:
2018-09-25 17:58:47.270895+0200 App[714:101541] -[TVIRTCI420Buffer coreVideoFrameBuffer]: unrecognized selector sent to instance 0x280d8ce00
2018-09-25 17:58:47.289063+0200 App[714:101541] Encountered an uncaught exception. All Mixpanel instances were archived.
2018-09-25 17:58:47.289128+0200 App[714:101541] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[TVIRTCI420Buffer coreVideoFrameBuffer]: unrecognized selector sent to instance 0x280d8ce00'
*** First throw call stack:
(0x18f53bef8 0x18e709a40 0x18f453154 0x18f541810 0x18f5434bc 0x1043b754c 0x1043b6cac 0x1043f4524 0x10460e358 0x10461ed0c 0x104431f58 0x104433d18 0x10443bf24 0x109068de4 0x109070e88 0x109071b7c 0x10907bc18 0x18f1560f0 0x18f158d00)
libc++abi.dylib: terminating with uncaught exception of type NSException

Any idea why this is happening?

@MilanNosal
Can you tell me what version of TwilioVideo you are using where you see this crash occurring?
Thanks,
Ryan

I used 2.3, yesterday I have updated to 2.4 and the crash still occurs.. Could it be something with renderers assigned to track? Or the room settings?

Thanks for getting back so quick. I don't believe it has anything to do with room settings. I just tested this in our internal application and I am not seeing the crash.
Is this crash occurring on the device where you are disabling the local video or on the remote participant side? Are you able to share the source showing how you are rendering the local video track?
I would like to try and get a setup where I can reproduce the crash you are seeing locally.
Thank you,
Ryan

The problem occurs on local video side. I try to stop sending video track by disabling it, and it crashes. The remote side does not seem to be affected.
I tried to remove the all the irrelevant code. It most probably wont get compiled, but maybe you'll be able to see the problem in it. If that won't help, I'll try to write a minimal reproducible example.
//  CXScreenSharingManager.swift
//
//
//  Created by Milan Nosáľ on 21/08/2018.
//

import UIKit
import TwilioVideo
import CallKit
import ReplayKit
import AVFoundation

class CXScreenSharingManager: NSObject {

    enum Action {
        case startingCall
        case answeringCall
    }

    enum State {
        case inactive
        case dialing
        case connecting
        case connected
        case disconnecting
        case disconnected
    }

    static let shared: CXScreenSharingManager = CXScreenSharingManager()

    // Video SDK components
    fileprivate var room: TVIRoom?
    fileprivate var remoteParticipant: TVIRemoteParticipant?

    var isConnectedToRoom: Bool {
        return room != nil
    }

    weak var remoteVideoRenderer: TVIVideoView? {
        didSet {
            if self.remoteParticipant != nil {
                if let oldValue = oldValue,
                    !(self.remoteParticipant?.videoTracks.isEmpty ?? true) {
                    let remoteVideoTrack = self.remoteParticipant?.remoteVideoTracks[0].remoteTrack
                    remoteVideoTrack?.removeRenderer(oldValue)
                }

                if let remoteVideoRenderer = remoteVideoRenderer,
                    !(self.remoteParticipant?.videoTracks.isEmpty ?? true) {
                    let remoteVideoTrack = self.remoteParticipant?.remoteVideoTracks[0].remoteTrack
                    remoteVideoTrack?.addRenderer(remoteVideoRenderer)

                }
            }
        }
    }

    weak var localVideoRenderer: TVIVideoView? {
        didSet {
            if let oldValue = oldValue {
                localVideoTrack?.removeRenderer(oldValue)
            }
            if let localVideoRenderer = localVideoRenderer {
                localVideoTrack?.addRenderer(localVideoRenderer)
                localVideoRenderer.shouldMirror = (source == .frontCamera)
            }
        }
    }

    var isCameraOn: Bool {
        get {
            return localVideoTrack?.isEnabled ?? false
        }
        set {
            if newValue {
                localVideoTrack?.isEnabled = true
            } else {
                // TODO: This Causes crash
                localVideoTrack?.isEnabled = false
            }
        }
    }

    // This (and the next) works as expected
    var isMicOn: Bool {
        get {
            return localAudioTrack?.isEnabled ?? false
        }
        set {
            localAudioTrack?.isEnabled = newValue
        }
    }

    func toggleMic() {
        if let audioTrack = self.localAudioTrack {
            self.localAudioTrack?.isEnabled = !(audioTrack.isEnabled)
        }
    }

    fileprivate var accessToken: String?

    fileprivate var audioDevice: TVIDefaultAudioDevice = TVIDefaultAudioDevice()
    fileprivate var localAudioTrack: TVILocalAudioTrack?
    fileprivate var camera: TVICameraCapturer?
    fileprivate var localVideoTrack: TVILocalVideoTrack?

    fileprivate var source: TVICameraCaptureSource? {
        didSet {
            self.localVideoRenderer?.shouldMirror = (source == .frontCamera)
        }
    }

    // CallKit components
    fileprivate let callKitProvider: CXProvider
    fileprivate let callKitCallController: CXCallController
    fileprivate var callKitCompletionHandler: ((Bool) -> Void?)? = nil

    override init() {
        let configuration = CXProviderConfiguration(localizedName: "App")
        configuration.maximumCallGroups = 1
        configuration.maximumCallsPerCallGroup = 1
        configuration.supportsVideo = true

        callKitProvider = CXProvider(configuration: configuration)
        callKitCallController = CXCallController()

        super.init()

        callKitProvider.setDelegate(self, queue: nil)

        TwilioVideo.audioDevice = self.audioDevice
    }

    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }

    deinit {
        // CallKit has an odd API contract where the developer must call invalidate or the CXProvider is leaked.
        callKitProvider.invalidate()
    }

    func presentError(message: String) {
        print(message)
    }

    func logMessage(messageText: String) {
        print(messageText)
    }

    // MARK: Rest

    func call(in model: Model) {

        TokenUtils.fetchTokenAsync(identity: "\(id)", roomName: model.id) { (result) in
            switch result {
            case .success(let token):
                self.accessToken = token

                self.performStartCallAction(uuid: UUID(), model: model)

            case .failure(let error):
                self.logMessage(messageText: ">>> Error getting token: \(error.localizedDescription)")
            }
        }
    }

    func reportIncomingCall(in model: Model) {
        TokenUtils.fetchTokenAsync(identity: "\(id)", roomName: model.id) { (result) in
            switch result {
            case .success(let token):
                self.accessToken = token

                self.reportIncomingCall(uuid: UUID(), model: model)

            case .failure(let error):
                self.logMessage(messageText: ">>> Error getting token: \(error.localizedDescription)")
            }
        }
    }

    func disconnect() {
        if let room = room, let uuid = room.uuid {
            //            room.disconnect()
            logMessage(messageText: "Attempting to disconnect from audio room \(room.name)")
            performEndCallAction(uuid: uuid)
        }
    }

    func cleanupRemoteParticipant() {
        if self.remoteParticipant != nil {
            if let remoteVideoRenderer = remoteVideoRenderer,
                !(self.remoteParticipant?.videoTracks.isEmpty ?? true) {
                let remoteVideoTrack = self.remoteParticipant?.remoteVideoTracks[0].remoteTrack
                remoteVideoTrack?.removeRenderer(remoteVideoRenderer)
            }
        }
        self.remoteParticipant = nil
    }
}

// MARK: TVIRoomDelegate
extension CXScreenSharingManager: TVIRoomDelegate {
    func didConnect(to room: TVIRoom) {

        logMessage(messageText: "Connected to room \(room.name) as \(String(describing: room.localParticipant?.identity))")

        var videoTrackfulParticipants = room.remoteParticipants.filter { (participant) -> Bool in
            return !participant.videoTracks.isEmpty
        }
        self.remoteParticipant = videoTrackfulParticipants.first
        self.remoteParticipant?.delegate = self

        // audio
        let cxObserver = callKitCallController.callObserver
        let calls = cxObserver.calls

        // Let the call provider know that the outgoing call has connected
        if let uuid = room.uuid, let call = calls.first(where: { $0.uuid == uuid }) {
            if call.isOutgoing {
                callKitProvider.reportOutgoingCall(with: uuid, connectedAt: nil)
            }
        }

        self.callKitCompletionHandler!(true)

    }

    func room(_ room: TVIRoom, didDisconnectWithError error: Error?) {
        logMessage(messageText: "Disconnected from room \(room.name), error = \(String(describing: error))")

        self.cleanupRemoteParticipant()
        self.room = nil
        self.callKitCompletionHandler = nil
    }

    func room(_ room: TVIRoom, didFailToConnectWithError error: Error) {
        logMessage(messageText: "Failed to connect to room \(room.name) with error")

        // video
        self.room = nil
        self.callKitCompletionHandler!(false)
    }

    func room(_ room: TVIRoom, participantDidConnect participant: TVIRemoteParticipant) {
        logMessage(messageText: "Participant \(participant.identity) connected to room \(room.name) with \(participant.remoteAudioTracks.count) audio and \(participant.remoteVideoTracks.count) video tracks")

        if self.remoteParticipant == nil && !participant.videoTracks.isEmpty {
            self.remoteParticipant = participant
            self.remoteParticipant?.delegate = self
        }
    }

    func room(_ room: TVIRoom, participantDidDisconnect participant: TVIRemoteParticipant) {

        if self.remoteParticipant == participant {
            cleanupRemoteParticipant()

            var videoTrackfulParticipants = room.remoteParticipants.filter { (participant) -> Bool in
                return !participant.videoTracks.isEmpty
            }
            self.remoteParticipant = videoTrackfulParticipants.first
            self.remoteParticipant?.delegate = self

            if let remoteVideoRenderer = self.remoteVideoRenderer {
                remoteParticipant?.videoTracks.first?.videoTrack?.addRenderer(remoteVideoRenderer)
            }
        }
        logMessage(messageText: "Room \(room.name), Participant \(participant.identity) disconnected")

    }
}

// MARK: TVIRemoteParticipantDelegate
extension CXScreenSharingManager: TVIRemoteParticipantDelegate {

    func remoteParticipant(_ participant: TVIRemoteParticipant,
                           publishedVideoTrack publication: TVIRemoteVideoTrackPublication) {
        // Remote Participant has offered to share the video Track.
        logMessage(messageText: "Participant \(participant.identity) published \(publication.trackName) video track")
    }

    func remoteParticipant(_ participant: TVIRemoteParticipant,
                           unpublishedVideoTrack publication: TVIRemoteVideoTrackPublication) {
        // Remote Participant has stopped sharing the video Track.
        logMessage(messageText: "Participant \(participant.identity) unpublished \(publication.trackName) video track")
    }

    func remoteParticipant(_ participant: TVIRemoteParticipant,
                           publishedAudioTrack publication: TVIRemoteAudioTrackPublication) {
        // Remote Participant has offered to share the audio Track.
        logMessage(messageText: "Participant \(participant.identity) published \(publication.trackName) audio track")
    }

    func remoteParticipant(_ participant: TVIRemoteParticipant,
                           unpublishedAudioTrack publication: TVIRemoteAudioTrackPublication) {
        // Remote Participant has stopped sharing the audio Track.
        logMessage(messageText: "Participant \(participant.identity) unpublished \(publication.trackName) audio track")
    }

    func subscribed(to videoTrack: TVIRemoteVideoTrack,
                    publication: TVIRemoteVideoTrackPublication,
                    for participant: TVIRemoteParticipant) {
        // We are subscribed to the remote Participant's video Track. We will start receiving the
        // remote Participant's video frames now.
        logMessage(messageText: "Subscribed to \(publication.trackName) video track for Participant \(participant.identity)")

        if let remoteVideoRenderer = self.remoteVideoRenderer,
            self.remoteParticipant == participant {
            videoTrack.addRenderer(remoteVideoRenderer)
        }
    }

    func unsubscribed(from videoTrack: TVIRemoteVideoTrack,
                      publication: TVIRemoteVideoTrackPublication,
                      for participant: TVIRemoteParticipant) {
        // We are unsubscribed from the remote Participant's video Track. We will no longer receive the
        // remote Participant's video.
        logMessage(messageText: "Unsubscribed from \(publication.trackName) video track for Participant \(participant.identity)")

        if let remoteVideoRenderer = self.remoteVideoRenderer,
            self.remoteParticipant == participant {
            videoTrack.removeRenderer(remoteVideoRenderer)
        }
    }

    func subscribed(to audioTrack: TVIRemoteAudioTrack,
                    publication: TVIRemoteAudioTrackPublication,
                    for participant: TVIRemoteParticipant) {
        // We are subscribed to the remote Participant's audio Track. We will start receiving the
        // remote Participant's audio now.
        logMessage(messageText: "Subscribed to \(publication.trackName) audio track for Participant \(participant.identity)")
    }

    func unsubscribed(from audioTrack: TVIRemoteAudioTrack,
                      publication: TVIRemoteAudioTrackPublication,
                      for participant: TVIRemoteParticipant) {
        // We are unsubscribed from the remote Participant's audio Track. We will no longer receive the
        // remote Participant's audio.
        logMessage(messageText: "Unsubscribed from \(publication.trackName) audio track for Participant \(participant.identity)")
    }

    func remoteParticipant(_ participant: TVIRemoteParticipant,
                           enabledVideoTrack publication: TVIRemoteVideoTrackPublication) {
        logMessage(messageText: "Participant \(participant.identity) enabled \(publication.trackName) video track")
    }

    func remoteParticipant(_ participant: TVIRemoteParticipant,
                           disabledVideoTrack publication: TVIRemoteVideoTrackPublication) {
        logMessage(messageText: "Participant \(participant.identity) disabled \(publication.trackName) video track")
    }

    func remoteParticipant(_ participant: TVIRemoteParticipant,
                           enabledAudioTrack publication: TVIRemoteAudioTrackPublication) {
        logMessage(messageText: "Participant \(participant.identity) enabled \(publication.trackName) audio track")
    }

    func remoteParticipant(_ participant: TVIRemoteParticipant,
                           disabledAudioTrack publication: TVIRemoteAudioTrackPublication) {
        logMessage(messageText: "Participant \(participant.identity) disabled \(publication.trackName) audio track")
    }

    func failedToSubscribe(toAudioTrack publication: TVIRemoteAudioTrackPublication,
                           error: Error,
                           for participant: TVIRemoteParticipant) {
        logMessage(messageText: "FailedToSubscribe \(publication.trackName) audio track, error = \(String(describing: error))")
    }

    func failedToSubscribe(toVideoTrack publication: TVIRemoteVideoTrackPublication,
                           error: Error,
                           for participant: TVIRemoteParticipant) {
        logMessage(messageText: "FailedToSubscribe \(publication.trackName) video track, error = \(String(describing: error))")
    }
}

extension CXScreenSharingManager : CXProviderDelegate {

    func providerDidReset(_ provider: CXProvider) {
        logMessage(messageText: "Callkit: providerDidReset:")

        // AudioDevice is enabled by default
        self.audioDevice.isEnabled = true

        room?.disconnect()
    }

    func providerDidBegin(_ provider: CXProvider) {
        logMessage(messageText: "Callkit: providerDidBegin")
    }

    func provider(_ provider: CXProvider, didActivate audioSession: AVAudioSession) {
        logMessage(messageText: "Callkit: provider:didActivateAudioSession:")

        self.audioDevice.isEnabled = true
    }

    func provider(_ provider: CXProvider, didDeactivate audioSession: AVAudioSession) {
        logMessage(messageText: "Callkit: provider:didDeactivateAudioSession:")
    }

    func provider(_ provider: CXProvider, timedOutPerforming action: CXAction) {
        logMessage(messageText: "Callkit: provider:timedOutPerformingAction:")
    }

    func provider(_ provider: CXProvider, perform action: CXStartCallAction) {
        logMessage(messageText: "Callkit: provider:performStartCallAction:")

        /*
         * Configure the audio session, but do not start call audio here, since it must be done once
         * the audio session has been activated by the system after having its priority elevated.
         */

        // Stop the audio unit by setting isEnabled to `false`.
        self.audioDevice.isEnabled = false

        // Configure the AVAudioSession by executing the audio device's `block`.
        self.audioDevice.block()

        callKitProvider.reportOutgoingCall(with: action.callUUID, startedConnectingAt: nil)

        performRoomConnect(uuid: action.callUUID) { (success) in
            if success {
                provider.reportOutgoingCall(with: action.callUUID, connectedAt: Date())
                action.fulfill()
            } else {
                action.fail()
            }
        }

    }

    func provider(_ provider: CXProvider, perform action: CXAnswerCallAction) {
        logMessage(messageText: "Callkit: provider:performAnswerCallAction:")

        /*
         * Configure the audio session, but do not start call audio here, since it must be done once
         * the audio session has been activated by the system after having its priority elevated.
         */

        // Stop the audio unit by setting isEnabled to `false`.
        self.audioDevice.isEnabled = false

        // Configure the AVAudioSession by executign the audio device's `block`.
        self.audioDevice.block()

        performRoomConnect(uuid: action.callUUID) { (success) in
            if success {
                action.fulfill(withDateConnected: Date())
            } else {
                action.fail()
            }
        }
    }

    func provider(_ provider: CXProvider, perform action: CXEndCallAction) {
        NSLog("Callkit: provider:performEndCallAction:")

        // AudioDevice is enabled by default
        self.audioDevice.isEnabled = true
        room?.disconnect()

        action.fulfill()
    }

    func provider(_ provider: CXProvider, perform action: CXSetMutedCallAction) {
        NSLog("Callkit: provier:performSetMutedCallAction:")

        //                toggleMic(sender: self)

        action.fulfill()
    }

    func provider(_ provider: CXProvider, perform action: CXSetHeldCallAction) {
        NSLog("Callkit: provier:performSetHeldCallAction:")

        let cxObserver = callKitCallController.callObserver
        let calls = cxObserver.calls

        guard let call = calls.first(where: { $0.uuid == action.callUUID }) else {
            action.fail()
            return
        }

        if call.isOnHold {
            holdCall(onHold: false)
        } else {
            holdCall(onHold: true)
        }
        action.fulfill()
    }
}

// MARK: Call Kit Actions
extension CXScreenSharingManager {

    func performStartCallAction(uuid: UUID) {
        let callHandle = CXHandle(type: .generic, value: "Name")
        let startCallAction = CXStartCallAction(call: uuid, handle: callHandle)

        startCallAction.isVideo = true

        let transaction = CXTransaction(action: startCallAction)

        callKitCallController.request(transaction)  { error in
            if let error = error {
                NSLog("Callkit: StartCallAction transaction request failed: \(error.localizedDescription)")
                return
            }
            NSLog("Callkit: StartCallAction transaction request successful")
        }

    }

    func reportIncomingCall(uuid: UUID, completion: ((NSError?) -> Void)? = nil) {
        let callHandle = CXHandle(type: .generic, value: displayName)

        let callUpdate = CXCallUpdate()
        callUpdate.remoteHandle = callHandle
        callUpdate.supportsDTMF = false
        callUpdate.supportsHolding = true
        callUpdate.supportsGrouping = false
        callUpdate.supportsUngrouping = false
        callUpdate.hasVideo = true

        callKitProvider.reportNewIncomingCall(with: uuid, update: callUpdate) { error in
            if error == nil {
                NSLog("Callkit: Incoming call successfully reported.")
            } else {
                NSLog("Callkit: Failed to report incoming call successfully: \(String(describing: error?.localizedDescription)).")
            }
            completion?(error as NSError?)
        }
    }

    func performEndCallAction(uuid: UUID) {
        let endCallAction = CXEndCallAction(call: uuid)
        let transaction = CXTransaction(action: endCallAction)

        callKitCallController.request(transaction) { error in
            if let error = error {
                NSLog("Callkit: EndCallAction transaction request failed: \(error.localizedDescription).")
                self.callKitProvider.reportCall(with: uuid, endedAt: nil, reason: CXCallEndedReason.remoteEnded)
                return
            }

            NSLog("Callkit: EndCallAction transaction request successful")
        }
    }

    fileprivate func startPreview() {
        // Preview our local camera track in the local video preview view.
        camera = TVICameraCapturer(source: .frontCamera, delegate: self)
        localVideoTrack = TVILocalVideoTrack.init(capturer: camera!)
        if let localVideoTrack = localVideoTrack {
            // Add renderer to video track for local preview
            //            localVideoTrack!.addRenderer(self.previewView)
            if let localVideoRenderer = localVideoRenderer {
                localVideoTrack.addRenderer(localVideoRenderer)
            }

            logMessage(messageText: "Video track created")
        } else {
            logMessage(messageText: "Failed to create video track")
        }
    }

    func performRoomConnect(uuid: UUID, model: Model, completionHandler: @escaping (Bool) -> Swift.Void) {

        // Prepare local media which we will share with Room Participants.
        // Create an audio track.
        if localAudioTrack == nil {
            localAudioTrack = TVILocalAudioTrack()

            if localAudioTrack == nil {
                logMessage(messageText: "Callkit: Failed to create audio track")
            }
        }
        // Create a video track which captures from the camera.
        if localVideoTrack == nil {
            self.startPreview()
        }

        guard let accessToken = self.accessToken else {
            logMessage(messageText: "Callkit: No access token")
            return
        }

        // Preparing the connect options with the access token that we fetched (or hardcoded).
        let connectOptions = TVIConnectOptions.init(token: accessToken) { (builder) in

            // Use the local media that we prepared earlier.
            builder.audioTracks = self.localAudioTrack != nil ? [self.localAudioTrack!] : [TVILocalAudioTrack]()
            builder.videoTracks = self.localVideoTrack != nil ? [self.localVideoTrack!] : [TVILocalVideoTrack]()

            // Use the preferred audio codec
            if let preferredAudioCodec = TwillioSettings.shared.audioCodec {
                builder.preferredAudioCodecs = [preferredAudioCodec]
            }

            // Use the preferred video codec
            if let preferredVideoCodec = TwillioSettings.shared.videoCodec {
                builder.preferredVideoCodecs = [preferredVideoCodec]
            }

            // Use the preferred encoding parameters
            if let encodingParameters = TwillioSettings.shared.getEncodingParameters() {
                builder.encodingParameters = encodingParameters
            }

            // The name of the Room where the Client will attempt to connect to. Please note that if you pass an empty
            // Room `name`, the Client will create one for you. You can get the name or sid from any connected Room.
            builder.roomName = model.id

            // The CallKit UUID to associate with this Room.
            builder.uuid = uuid
        }

        self.state = .connecting

        // Connect to the Room using the options we provided.
        room = TwilioVideo.connect(with: connectOptions, delegate: self)

        logMessage(messageText: "Callkit: Attempting to connect to room \(String(describing: model.id))")

        self.callKitCompletionHandler = completionHandler
    }
}

extension CXScreenSharingManager: TVICameraCapturerDelegate {
    func cameraCapturer(_ capturer: TVICameraCapturer, didStartWith source: TVICameraCaptureSource) {
        self.source = source
    }
}

@paynerc
Hi! So I've just found out that the same error happens in SampleHandler.swift that's part of your example application when you try to disable the track there. it's from the ReplayKit example, there the broadcast extension. I believe you can replicate it very easily yourself, but here's the code with a couple of changes made by me to be able to try it out (to pinpoint my changes, I've added couple of FIXME: comments on places where I have added or changes something.. as you can see it's really almost no changes at all):
//
//  SampleHandler.swift
//  BroadcastExtension
//
//  Created by Piyush Tank on 7/1/18.
//  Copyright © 2018 Twilio. All rights reserved.
//
import Accelerate
import TwilioVideo
import ReplayKit

class SampleHandler: RPBroadcastSampleHandler, TVIRoomDelegate, TVIVideoCapturer {

    public var isScreencast: Bool = true

    // Video SDK components
    public var room: TVIRoom?
    weak var captureConsumer: TVIVideoCaptureConsumer?

    static let kDesiredFrameRate = 30
    static let kDownScaledFrameWidth = 540
    static let kDownScaledFrameHeight = 960

    let audioDevice = ExampleCoreAudioDevice()

    // FIXME: Added reference so I get back to it later
    var localScreenTrack: TVILocalVideoTrack?

    public var supportedFormats: [TVIVideoFormat] {
        get {
            /*
             * Describe the supported format.
             * For this example we cheat and assume that we will be capturing the entire screen.
             */
            let screenSize = UIScreen.main.bounds.size
            let format = TVIVideoFormat()
            format.pixelFormat = TVIPixelFormat.formatYUV420BiPlanarFullRange
            format.frameRate = UInt(SampleHandler.kDesiredFrameRate)
            format.dimensions = CMVideoDimensions(width: Int32(screenSize.width), height: Int32(screenSize.height))
            return [format]
        }
    }

    override func broadcastStarted(withSetupInfo setupInfo: [String : NSObject]?) {

        TwilioVideo.audioDevice = ExampleCoreAudioDevice(audioCapturer: self)

        // User has requested to start the broadcast. Setup info from the UI extension can be supplied but optional.

        // FIXME: My own access token
        let accessToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImN0eSI6InR3aWxpby1mcGE7dj0xIn0.eyJqdGkiOiJTSzJiNTgyZDc0ZDVlMDc2OTA0MmUxYzIxZTdiYWE1MWU5LTE1Mzg0MTg4NzkiLCJncmFudHMiOnsiaWRlbnRpdHkiOiIxNTIxMyIsInZpZGVvIjp7InJvb20iOiI2Rjk3OTM3Ri1EQzJCLTQ4MTQtQUI5Mi0wQjU2QzI3NDRCQkUifX0sImlhdCI6MTUzODQxODg3OSwiZXhwIjoxNTM4NDIyNDc5LCJpc3MiOiJTSzJiNTgyZDc0ZDVlMDc2OTA0MmUxYzIxZTdiYWE1MWU5Iiwic3ViIjoiQUNiYmJlNzZhODg1N2E0NzY0ZmZhZGUzODU2MDY1N2ZjZiJ9.Q6wcAVUisyJQRrGbQJ0qfU_LRS9qmLKyOZ__vVnRbZU";

        // FIXME: storing reference to local track
        localScreenTrack = TVILocalVideoTrack(capturer: self)
        let h264VideoCodec = TVIH264Codec()
        let localAudioTrack = TVILocalAudioTrack()
        let connectOptions = TVIConnectOptions.init(token: accessToken) { (builder) in

            // Use the local media that we prepared earlier.
            builder.audioTracks = [localAudioTrack!]
            builder.videoTracks = [self.localScreenTrack!]

            // Use the preferred video codec
            builder.preferredVideoCodecs = [h264VideoCodec] as! [TVIVideoCodec]

            // The name of the Room where the Client will attempt to connect to. Please note that if you pass an empty
            // Room `name`, the Client will create one for you. You can get the name or sid from any connected Room.

            // FIXME: I commented out the if, since I'm using the same way in both cases
//            if #available(iOS 12.0, *) {
                builder.roomName = "6F97937F-DC2B-4814-AB92-0B56C2744BBE"
//            } else {
//                builder.roomName = setupInfo?["RoomName"] as? String
//            }
        }

        // Connect to the Room using the options we provided.
        room = TwilioVideo.connect(with: connectOptions, delegate: self)

        // User has requested to start the broadcast. Setup info from the UI extension can be supplied but optional.
        print("broadcastStarted")
    }

    override func broadcastPaused() {
        // User has requested to pause the broadcast. Samples will stop being delivered.
    }

    override func broadcastResumed() {
        // User has requested to resume the broadcast. Samples delivery will resume.
    }

    override func broadcastFinished() {
        // User has requested to finish the broadcast.
    }

    override func processSampleBuffer(_ sampleBuffer: CMSampleBuffer, with sampleBufferType: RPSampleBufferType) {
        RPScreenRecorder.shared().isMicrophoneEnabled = true
        switch sampleBufferType {
        case RPSampleBufferType.video:
            if ((captureConsumer != nil) && room?.state == .connected) {
                processVideoSampleBuffer(sampleBuffer)
            }
            break
        case RPSampleBufferType.audioApp:
            if (room?.state == .connected) {
                ExampleCoreAudioDeviceRecordCallback(sampleBuffer)
            }
            break
        case RPSampleBufferType.audioMic:
            if (room?.state == .connected) {
                ExampleCoreAudioDeviceRecordCallback(sampleBuffer)
            }
            break
        }
    }

    var tempPixelBuffer : CVPixelBuffer?;

    func startCapture(_ format: TVIVideoFormat, consumer: TVIVideoCaptureConsumer) {
        captureConsumer = consumer
        captureConsumer!.captureDidStart(true)

        CVPixelBufferCreate(kCFAllocatorDefault,
                            480,//self.width,
            640, //self.height,
            kCVPixelFormatType_420YpCbCr8BiPlanarFullRange,
            nil,
            &tempPixelBuffer)
    }

    func stopCapture() {
        print("Stop capturing.")
    }

    // MARK:- Private
    func processVideoSampleBuffer(_ sampleBuffer: CMSampleBuffer) {
        //        let  imageBuffer = sampleBuffer.imageBuffer!
//        let pixelBuffer = sampleBuffer.imageBuffer!
        // FIXME: got error on previous line, had to replace it with this:
        guard let pixelBuffer: CVPixelBuffer = CMSampleBufferGetImageBuffer(sampleBuffer) else { return }
        var outPixelBuffer : CVPixelBuffer? = nil

        CVPixelBufferLockBaseAddress(pixelBuffer, [])

        let pixelFormat = CVPixelBufferGetPixelFormatType(pixelBuffer)

        if (pixelFormat != kCVPixelFormatType_420YpCbCr8BiPlanarFullRange) {
            assertionFailure("Extension assumes the incoming frames are of type NV12")
        }

        let status = CVPixelBufferCreate(kCFAllocatorDefault,
                                         SampleHandler.kDownScaledFrameWidth,
                                         SampleHandler.kDownScaledFrameHeight,
                                         pixelFormat,
                                         nil,
                                         &outPixelBuffer);
        if (status != kCVReturnSuccess) {
            print("Failed to create pixel buffer");
        }

        CVPixelBufferLockBaseAddress(outPixelBuffer!, []);

        // Prepare source pointers.
        var sourceImageY = vImage_Buffer(data: CVPixelBufferGetBaseAddressOfPlane(pixelBuffer, 0),
                                         height: vImagePixelCount(CVPixelBufferGetHeightOfPlane(pixelBuffer, 0)),
                                         width: vImagePixelCount(CVPixelBufferGetWidthOfPlane(pixelBuffer, 0)),
                                         rowBytes: CVPixelBufferGetBytesPerRowOfPlane(pixelBuffer, 0))

        var sourceImageUV = vImage_Buffer(data: CVPixelBufferGetBaseAddressOfPlane(pixelBuffer, 1),
                                          height: vImagePixelCount(CVPixelBufferGetHeightOfPlane(pixelBuffer, 1)),
                                          width:vImagePixelCount(CVPixelBufferGetWidthOfPlane(pixelBuffer, 1)),
                                          rowBytes: CVPixelBufferGetBytesPerRowOfPlane(pixelBuffer, 1))

        // Prepare out pointers.
        var outImageY = vImage_Buffer(data: CVPixelBufferGetBaseAddressOfPlane(outPixelBuffer!, 0),
                                      height: vImagePixelCount(CVPixelBufferGetHeightOfPlane(outPixelBuffer!, 0)),
                                      width: vImagePixelCount(CVPixelBufferGetWidthOfPlane(outPixelBuffer!, 0)),
                                      rowBytes: CVPixelBufferGetBytesPerRowOfPlane(outPixelBuffer!, 0))

        var outImageUV = vImage_Buffer(data: CVPixelBufferGetBaseAddressOfPlane(outPixelBuffer!, 1),
                                       height: vImagePixelCount(CVPixelBufferGetHeightOfPlane(outPixelBuffer!, 1)),
                                       width:vImagePixelCount( CVPixelBufferGetWidthOfPlane(outPixelBuffer!, 1)),
                                       rowBytes: CVPixelBufferGetBytesPerRowOfPlane(outPixelBuffer!, 1))

        var error = vImageScale_Planar8(&sourceImageY,
                                        &outImageY,
                                        nil,
                                        vImage_Flags(0));
        if (error != kvImageNoError) {
            print("Failed to down scale luma plane ")
            return;
        }

        error = vImageScale_CbCr8(&sourceImageUV,
                                      &outImageUV,
                                      nil,
                                      vImage_Flags(0));
        if (error != kvImageNoError) {
            print("Failed to down scale chroma plane")
            return;
        }

        CVPixelBufferUnlockBaseAddress(outPixelBuffer!, []);
        CVPixelBufferUnlockBaseAddress(pixelBuffer, []);

        let time: CMTime = CMSampleBufferGetPresentationTimeStamp(sampleBuffer)
        let frame = TVIVideoFrame(timestamp: time,
                                  buffer: outPixelBuffer!,
                                  orientation: TVIVideoOrientation.up)

        captureConsumer?.consumeCapturedFrame(frame!)
    }

    // MARK:- TVIRoomDelegate

    func didConnect(to room: TVIRoom) {
        print("didConnectToRoom")

        // FIXME: Connect to the room and try to disable the track.. Maybe it would crash also before connecting, but it does not matter for me..
        self.localScreenTrack?.isEnabled = false
    }

    func room(_ room: TVIRoom, didFailToConnectWithError error: Error) {
        print("didFailToConnectWithError")
    }

    func room(_ room: TVIRoom, didDisconnectWithError error: Error?) {
        print("didDisconnectWithError")
    }

    func room(_ room: TVIRoom, participantDidConnect participant: TVIRemoteParticipant) {
        print("participantDidConnect")
    }

    func room(_ room: TVIRoom, participantDidDisconnect participant: TVIRemoteParticipant) {
        print("participantDidDisconnect")
    }
}

Having the same issue here, version 2.4.1.
The other part of the conversation understands that the track is disabled.
This is a collapsed log to see some timestamps, first row is our own log that indicates that the track has been disabled.
2018-10-03 17:30:00.321818+0200 ***[12242:3536754] ***: [Twilio_Room_Local_Event] {"event":"disabledVideoTrack"}
2018-10-03 17:30:00.341165+0200 ***[12242:3537154] -[TVIRTCI420Buffer coreVideoFrameBuffer]: unrecognized selector sent to instance 0x281d58f40

I am digging into this right now and will post as soon as I am able to replicate.
Quick question, what iOS versions are you seeing this on?
Ryan

Both my devices are on iOS 12 GM

Great!
In my case 12.0 also. Haven't tested it on 11.x.

OK. That's good to know. I will test on the various devices I have and see if I can reproduce and if there is any iOS version relation.

@MilanNosal, @aastlind
Also, what device models are you testing on?

OK. I have tested on both an iPhone 6Plus and an iPhone X with iOS 12 and am not seeing anything yet. I don't have an iPhone 8 Plus.. I have a 7 Plus with iOS 11 and was also not able to reproduce the issue.
A few more questions for you on this:

Do you have a RoomSid for a room that you were connected to when the crash occurred? I would like to pull the server logs to see the room configuration, etc. If you have a RoomSid, you can email it to<EMAIL_ADDRESS>and reference this ticket and then let me know that you sent it so I know to look for it.
When the crash occurs, can you capture the stack trace of the crash? You can type bt in the debugger when the crash occurs and just attach that to this issue. Or if you are running outside of the debugger, the actual crash report would help a ton. I can resymbolicate that and hopefully get a better idea of what actually is happening.

I am interested to hear if the crash is related to the iPhone 8 Plus or happens on other devices as well.
Ryan

Stack trace (bt):
* thread #72, queue = 'EncoderQueue', stop reason = signal SIGABRT
  * frame #0: 0x000000018a509104 libsystem_kernel.dylib`__pthread_kill + 8
    frame #1: 0x000000018a588a00 libsystem_pthread.dylib`pthread_kill$VARIANT$armv81 + 296
    frame #2: 0x000000018a460d78 libsystem_c.dylib`abort + 140
    frame #3: 0x0000000189b28f78 libc++abi.dylib`abort_message + 132
    frame #4: 0x0000000189b29120 libc++abi.dylib`default_terminate_handler() + 304
    frame #5: 0x0000000189b41e48 libobjc.A.dylib`_objc_terminate() + 124
    frame #6: 0x0000000189b350fc libc++abi.dylib`std::__terminate(void (*)()) + 16
    frame #7: 0x0000000189b34a40 libc++abi.dylib`__cxa_throw + 132
    frame #8: 0x0000000189b41b84 libobjc.A.dylib`objc_exception_throw + 380
    frame #9: 0x000000018a88b154 CoreFoundation`-[NSObject(NSObject) doesNotRecognizeSelector:] + 140
    frame #10: 0x000000018a979810 CoreFoundation`___forwarding___ + 1412
    frame #11: 0x000000018a97b4bc CoreFoundation`_CF_forwarding_prep_0 + 92
    frame #12: 0x00000001057c354c TwilioVideo`-[TVIVideoEncoderH264 resetCompressionSessionIfNeededForPool:withFrame:] + 352
    frame #13: 0x00000001057c2cac TwilioVideo`-[TVIVideoEncoderH264 encode:codecSpecificInfo:frameTypes:] + 224
    frame #14: 0x0000000105800524 TwilioVideo`webrtc::(anonymous namespace)::ObjCVideoEncoder::Encode(webrtc::VideoFrame const&, webrtc::CodecSpecificInfo const*, std::__1::vector<webrtc::FrameType, std::__1::allocator<webrtc::FrameType> > const*) + 332
    frame #15: 0x0000000105a1a358 TwilioVideo`webrtc::VCMGenericEncoder::Encode(webrtc::VideoFrame const&, webrtc::CodecSpecificInfo const*, std::__1::vector<webrtc::FrameType, std::__1::allocator<webrtc::FrameType> > const&) + 212
    frame #16: 0x0000000105a2ad0c TwilioVideo`webrtc::vcm::VideoSender::AddVideoFrame(webrtc::VideoFrame const&, webrtc::CodecSpecificInfo const*) + 732
    frame #17: 0x000000010583df58 TwilioVideo`webrtc::VideoStreamEncoder::EncodeVideoFrame(webrtc::VideoFrame const&, long long) + 1312
    frame #18: 0x000000010583fd18 TwilioVideo`rtc::ClosureTask<webrtc::VideoStreamEncoder::OnFrame(webrtc::VideoFrame const&)::$_6>::Run() + 144
    frame #19: 0x0000000105847f24 TwilioVideo`rtc::TaskQueue::Impl::TaskContext::RunTask(void*) + 60
    frame #20: 0x000000010a954de4 libdispatch.dylib`_dispatch_client_callout + 16
    frame #21: 0x000000010a95ce88 libdispatch.dylib`_dispatch_lane_serial_drain + 720
    frame #22: 0x000000010a95db7c libdispatch.dylib`_dispatch_lane_invoke + 460
    frame #23: 0x000000010a967c18 libdispatch.dylib`_dispatch_workloop_worker_thread + 1220
    frame #24: 0x000000018a58e0f0 libsystem_pthread.dylib`_pthread_wqthread + 312
    frame #25: 0x000000018a590d00 libsystem_pthread.dylib`start_wqthread + 4

I also emailed the RoomSid to<EMAIL_ADDRESS>

See this on multiple devices

Hey @aastlind,
Thanks for the stack trace. I believe that, in 2.3.0 and later, we are making a bad assumption in the H.264 encoder about frame types, and formats. Disabling the Track causes software I420 buffers to be produced for the black frames, and our encoder was not expecting this type.
Regards,
Chris

@ceaglest: Only to confirm, I just run a test removing H.264 as preferred video codec (leaving VP9 and VP8 as remaining preferred codecs) and then it works fine to disable the track.
Good to see that you know where to start! :)

@aastlind I apologize for the issue. Yes, we have a bug in our H.264 video encoder. I am working on the fix and aiming to release it in a couple of days.  Thanks.

@MilanNosal @aastlind
We released Twilio Video iOS 2.5.1 today which addresses this crash.
Let us know if this has resolved your issue and then we'll close out this issue.
Thanks for your patience while we diagnosed and fixed the issue.
Ryan

@paynerc
The issue is resolved, thank you for support and quick resolution.

HI @paynerc
I am getting this crash again with 'TwilioVideo', '~> 5'
I am testing in
iPad(6th Generation)
iOS : 15.3.1
When I try to disable localVideoTrack, app just freeze in debug mode and on TestFlight build it crashes. I have that crash log if you want.
Thank you

@riddhixtraining,
Tagging @piyushtank on this issue as I am no longer with Twilio.
Ryan


Fix #76 : Remove the dropdown from Homepage

Pull Request
Fixes #76
Description:
Hello.
Hope you're doing well.
Since this issue is regarding the client side, I simply configured the client folder on my machine and implemented the necessary changes. I have made the code changes in client\src\components\Navbar.jsx file, wherein I have simply eliminated the list view that had the select tags responsible for displaying the dropdown menu.
Now, the landing page looks as mentioned in the screenshots section below.
Hope the mentioned code changes meet the necessary requirement.
If at all there are any problems regarding the implemented code changes, then do let me know.
Sincere apologies if I made any mistakes while solving this issue.
Note: Do [x] to select the below checkbox
Checklist:

[x] I have tested my changes.
[x] My code follows the project's coding standards.
[ ] I have updated the documentation (if applicable).

Screenshots:

Additional information
Please provide any other information that you think may be relevant to the pull request.

The issue is not assigned to you ?

No, @AnupK1234. It hasn't been assigned to me yet.

Kindly do not create a PR unless the issue is assigned to you. I you wish to work on a issue do let me know in the comments of that issue. I will assign it to you

Hello @AnupK1234
Sincere apologies for not getting it assigned first and then creating a PR.
I will make sure not to make this mistake again in the future.
If at all there's anything that I can do to redeem myself, then please let me know.
Once again, I am deeply sorry for this step taken.

Drop a comment on the issue. I will assign it to you.

Please assign this issue to me.


How to include UnrealEnginePython in .build.cs to create PyActor with c++

I tried to include the plugin in my .build.cs
Basically I want to spawn a PyActor in the Constructor of my GameInstance.
This would allow me to call a python script directly on startup.
The problem is that once I include the PyActor.h in my GameInstance.cpp like this
#include "PyActor.h"
It throws a bunch of errors like this:
PyActor.h(54): error C2143: syntax error: missing ';' before '*'

Now the problem is this line in PyActor.h
private:
	PyObject *py_actor_instance;

The problem is PyObject come from a .h file in the installed python directory.
How can I include the UnrealEnginePython plugin in my project so I can use it in the c++ files of my project.
Note I included the plugin like this in my project.build.cs
PublicDependencyModuleNames.AddRange(new string[] { "UnrealEnginePython" });
I also copied the logic from UnrealEnginePython.build.cs into my Project.build.cs
E.g:

PublicIncludePaths.AddRange(
           new string[] {
                "UnrealEnginePython/Public",
           }
           );

        PrivateIncludePaths.AddRange(
            new string[] {
                "UnrealEnginePython/Private",
            }
            );

        if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32))
        {
            if (pythonHome == "")
            {
                pythonHome = DiscoverPythonPath(windowsKnownPaths);
                if (pythonHome == "")
                {
                    throw new System.Exception("Unable to find Python installation");
                }
            }
            System.Console.WriteLine("Using Python at: " + pythonHome);
            PublicIncludePaths.Add(pythonHome);
            string libPath = GetWindowsPythonLibFile(pythonHome);
            PublicLibraryPaths.Add(Path.GetDirectoryName(libPath));
            PublicAdditionalLibraries.Add(libPath);
        }

Note: this also includes the private's like python home dir and methods, but I cut the code here.

Hi, to use the UnrealEnginePython api from c++ you need to include the "UnrealEnginePython" module (like you already did) and include UnrealEnginePythonPrivatePCH.h before the PyActor.h

Hi,
I am facing a similar issue.
I followed the steps above, adding the module to the project.build.cs and Iincluding UnrealEnginePythonPrivatePCH.h before PyActor.h. Visual studio recognizes the files, however I am getting errors regarding RAWMESH_API.
I am using unreal engine version 4.16.3.
Any help would be appreciated.

I don't know, I already Implemented a workaround before I could try out the include.
Anyway I creating a Blueprint Python Actor. This sets up any default and has a function that calls python.
Then in c++ I simply find and call the blueprint function.

In latest code from github i have refactored the include system, so currently you should be able to just include the PyActor/PyComponent header to use the related clases

Thanks.


Req: The ability to set different distances and feedrates for the Z axis vs XY Axis

Having the jogging distances and feed rates be a universal setting for all axises makes it very easy to crash your Z-axis into stock by accident when jogging into position. Other g code senders address this by allowing different settings for the z-axis so you can keep your z-axis on 1mm while the x and y can be jogged at 10mm+ I think this would be a useful addition particularly for people using gamepads to jog the machine around.

ioSender has continuous jogging when using the cursor keys except when the  modifier is pressed for step jogging. Step jogging distance is typically 1mm or less (can be changed on the fly), other jogging distances should typically be set to at least the length of the longest axis. If the controller is grblHAL based and the machine is homed (and proper travel distances are configured) you may also set $40 to limit jogging to always be within machine limits.
Continuous jogging = only a single jog command with a long distance is issued on key down, and a jog cancel is issued on a key up. This means that the distance is in practice not limited by the settings but rather by how long they key is pressed.
I assume the gamepad simulates pressing the cursor keys to jog, so the same applies to that.
The wiki lists keyboard shortcuts available.


Code Execution

Pull Request
Description

Code compilation
Test case execution with automated input parsing, so that users do not need to read in inputs manually
Frontend components to support this feature

Putting out this PR so that you guys can try to break the functionality asap :D
NOTE: Remember to add inNEXT_PUBLIC_RAPID_API_KEY, NEXT_PUBLIC_RAPID_API_KEY, NEXT_PUBLIC_RAPID_API_URL in the frontend env :)
To be done in the same PR before closing:

[ ] Make the instructions in the "add question" modal clearer so that admin does not end up adding an example that will break the code exec

Related Issue(s)

Closes #108 #130
Changes Made

Screenshots (if applicable)

Correct code attempt:

Manual testcases/C++/Java (checking of correctness not supported for these):

Compilation and runtime errors are shown. E.g: Error from inputting a wrong input format:

Checklist

[x] I have checked that the changes included in the PR are intended to merge to master or any destination branch.
[x] I have verified that the new changes do not break any existing functionalities, unless the new changes are intended and have approved by the team.
[x] I will take care of the merging and delete the side-branch after the PR is merged.

Additional Notes/References

misleading comment for java
I thought I had to call the main method to run the code like python.

maybe a more helpful hint for cpp, for non-cpp user like me 🙃

also, the hint is misleading as well, unless I'm wrong with how cpp works.

Yah, I agree with junsheng's pov on this.. There seems to be a learning curve on this, realised how rusty i was at the same time... Otherwise, its working n good enough for demo 👍🏻

Suggestion to add this import for cpp so users dont need to #include  and other libraries

Suggestion to add this import as default code for cpp so users dont need to #include and other libraries

Ooh good idea! Thanks!!

@c0j0s thanks for the feedback! have updated the template codes to hopefully be clearer 😅

Misaligned panels due to new (i) button, fixed it as well as frontend build check in my commit

@tlyi has removed code execution for cpp and java, making them compile-only with full execution support for python and javascript. will justify this in the report with something like this article: https://bootcamp.berkeley.edu/blog/most-in-demand-programming-languages/


Improvement/typescript refactor

See https://github.com/DeviaVir/zenbot/issues/1652

Bloody good work! This looks leaps and bounds better

Thinking on creating a zenbot.ts and renaming this repo to zenbot.js and seeing which one gets more traction and further development to nominate that one as the default for /zenbot. Thoughts? My idea behind it is that I would like to prevent this project from dying because folks do not want to work with typescript.

@DeviaVir Splitting them out kinda makes sense but why not a separate branch? Easier to cherry pick changes applicable to both?

Already discussed with @DeviaVir on discord, but just wanted to put this down here as well.
I'm thinking a new branch would be the best way to go. A new repo will, for one, be at a disadvantage since all the stars and followers will be reset; it will create the need to maintain feature parity between the two projects which will inevitably succumb to piles of technical debt.
In case there's a huge backlash against typescript there's always the option of transpiling the source to plain JS.  From there, we could work on the plain JS files. As long as we don't compile down to an ES5 target, the transpiled code won't look like a nightmare.
Ultimately, I want this project to be badass. There's huge potential here. I don't have a dogmatic preference on which language is used, I just think TS would be a huge benefit here and it'll become clear once I'm done with this refactoring.
p.s. I've started work on state management last night and re-architecting the data schema. This change is going to break most backward compatibility (unless we create a migration script) but it introduces and immutable and observable state tree, which is nice especially in comparison to passing around the s object.

@notVitaliy Nice work, i'm working with TypeScript as well. Is the TS Version up2date? Can we progress on this ?

@notVitaliy I also think that the move to TS will bring some new life in the project. As per today TS is the standard in the JS world.
Do you have any update on this? I notice as per today this branch is 688 commits behind unstable.
Probably most of them are just exchange updates.

@dawez I actually turned this PR into a forked repo and then detached and completely re-wrote the whole bot. It's Magic8Bot.
I was pretty active in developing it for a few months but life got in the way.

@notVitaliy Sick! I will have a look at it and hopefully contribute if possible. Let's keep in contact!


[NEW]: Prime Trust looses Seed Phrase

Date
2023-08-25
Description
Prime Trust lost the seed phrase that was laser etched into steel and with that loosing access to their own account with 38.9 million in crypto.
Links
https://www.404media.co/crypto-startup-prime-trust-files-for-bankruptcy-after-losing-password-to-38-9-million-crypto-wallet/
Agreement

[X] I irrevocably agree to release my contribution under the CC-BY 3.0 License

Attribution name
Hadea
Personal link
No response

Prime Trust bankruptcy is covered in a few posts: https://web3isgoinggreat.com/?collection=prime-trust
I went into more detail about the events leading to the bankruptcy elsewhere, since it needed more space than W3IGG allows: https://newsletter.mollywhite.net/p/issue-38


Process Replay: move to pytest

TestProcessReplayBase
base class give a segment and list of processes to replay, and it replays them into self.log_msgs for analysis by other tests
TestProcessReplayDiffBase
base class to perform a diff based on self.log_msgs and a reference commit
TestCarProcessReplay
parameterized to perform a diff on each car's segment, and also checks controlsd was engaged at some point in the routes
parallelization is handled by pytest
all the command line arguments should be the same as before, except they are handled by pytest
there is an additional argument --long-diff that allows you to see each process's long diff (which formerly was placed into diff.txt)

now can run locally with --long-diff to get the full diff

The default is slow now. Can you make it multi-threaded by default again?

with https://github.com/commaai/openpilot/pull/30441 it will now default to threaded (as will all tests)


Mcrypt deprecated in PHP 7.1

Hi. The oatih2-client uses Mcrypt, and Mcrypt is deprecated in PHP 7.1.x and will be removed from the PHP core in 7.2. Is there a fix or on the way a work-around for this?

I believed this has been resolved by version 2.0.0, see #583.

Agreed. This should no longer be an issue in 2.0.0, as the compat library for random_bytes() no longer uses mcrypt. Please upgrade to 2.0.0 on PHP 7.1.


log debug messages as fine instead of warn

there's no issue an end-user needs to resolve, so the warnings are confusing
fixes #337

Looks great, thanks! :+1:


Enabled recursive Git submodule initialization for heroku git:clone

This is a pretty simple edit that allows convenient use of Git submodules from within the Heroku client. All it does is add the "--recursive" flag to the system call to Git; this will automatically initialize and update [potentially nested] submodules. This can be very useful for collaborating on large, complex projects! (documentation)

@wilkinson could you please continue your attemts?
I suffer without this feature

Just add --recursive. It will pass through

@dickeyxxx where? I use GitHub integration, and there no way to add arguments

This PR has nothing to do with github integration


Element exhibits incorrect transparency

Transparency of element is not visible if you look into this top slab. See below snapshot from MS and  Design Review.
See 'Nako-Image1.PNG' and 'Nako-Image2.PNG'.

Steps:

Open LBE Model2 from OpenBuildings - L21561_R2UU04A21 file from the NAKO
Synchronize the dgn to iModel with ITS-DT
Notice that the slab form in not transparent as it was in MicroStation

Steps 1 and 2 don't mean anything to us.
Please provide the .bim file and the .dgn file.

@Adnan-Ulhaq please provide the .bim and .dgn files.

Original bug.

TestCases.zip contains the original DGN, an iModel produced from it, and a simplified DGN containing only two elements, only one of which has transparency.
The contention appears to be that in mstn, element transparency takes precedence over material transparency, while in iTwin.js it is the reverse. I disagree -- my understanding is that in both contexts, the two transparencies are multiplied and both should be drawing the slab as 50% transparent. (material is 100% opaque, element's level is 50% transparent). Evidence.

MicroStation does indeed multiply the transparencies. iTwin.js only does so for texture transparency; for materials, RenderingAsset claims:
//! A material *always* overrides element transparency as a value from 0 (fully opaque) to 1 (fully transparent).
//!     If RENDER_MATERIAL_FlagHasTransmit=true, then RENDER_MATERIAL_Transmit holds that transparency value.
//!     Otherwise, the transparency value is 0.0.
//!     If the material has a pattern map, the alpha of the sampled texture will be multiplied by the material's alpha (inverse of its transparency).
//!     ###TODO Revit wants to be able to *not* override element transparency. This should be doable.

@nerijusJakeliunas what version of iTwin.js are you using to view the iModel?

@pmconne  I open iModel in Design Review with my web browser (Edge) so I do not know what version of iTwin.js is used

@nerijusJakeliunas that'd be 3.2.4. Thanks.

Seems reasonable to follow MicroStation on this...not ideal, but at least a behavior MicroStation users are used to, and it also solves the issue for Revit use case.

This feature will be included in iTwin.js 3.3.0.

I am reverting this change. Apparently, I figured out how all this works in MicroStation a few years ago, which led to how it currently works in iTwin.js.
In MicroStation, transparency can come from the element, the reference attachment, the level, and/or the material.
If it came from the reference or level, it gets multiplied with the material.
If it came from the element, it gets replaced by the material.
We're not going to propagate that into iModels. The material's transparency overrides the element's transparency.


I got this after I login. Any fix?

Warning: PDO::prepare(): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'uboat.user' doesn't exist in /var/www/src/Model.php on line 42
Fatal error: Uncaught Error: Call to a member function execute() on boolean in /var/www/src/Model.php:46 Stack trace: #0 /var/www/src/models/user.php(11): Model->query('SELECT * FROM `...', Array) #1 /var/www/src/controllers/login.php(32): user->actionAuth(Array) #2 /var/www/src/goat.php(75): Login->index() #3 /var/www/html/index.php(22): goat->__construct(Array) #4 {main} thrown in /var/www/src/Model.php on line 46

You need to import the database structure into you MySQL/MariaDB
Look at https://github.com/UBoat-Botnet/UBoat-Panel/blob/master/uboat.sql
https://github.com/UBoat-Botnet/UBoat/wiki/Panel-Setup

Updated password column using
MariaDB [uboat]> UPDATE user
                          -> SET password = 'new-pwdhash-here-using-test.php'
                          -> WHERE id = 1;

able to login thanks


Support groups in phpunit.xml.

Ok, I assume e1dfc4bdaeb543f7929b768bfc085cc0dc857ea4 to be an accident, because we won't change the projects name ;)
Additionally, your PR doesn't include any tests and the tests are failing (see https://travis-ci.org/brianium/paratest/builds/95685745 ). Please fix these issus to finish this PR, thanks.

After two years, I don't expect to hear anything anymore. So thanks for the try, next time please add some tests.


.call() binding should allow passing arguments

At the moment, it's possible to pass arguments using the .call binding through somewhat odd means (and feels like it might be accidental), but it would be really useful to have it as an accepted / documented part of the framework.
Currently, if the binding specifies an $event object (<checkbox-widget ontoggle.call="selected($event)"></checkbox-widget>) then the checkbox-widget custom element could pass an argument back:
...
 if (this.ontoggle) {
    this.ontoggle(this.checked);
 }
...

We can take advantage of this, but in the source code, this particular functionality is questioned and having it called $event seems wrong unless we're genuinely passing an event.
I guess the intention behind this originally was to allow raising custom events, and using a real event object, but I've never wanted to raise full events, but we are using the functionality, so would be sad to see it disappear (as seen in the comment above), so if nothing else, this is a plea to not delete it.

This is supported, $event is the "old way".  The new way is to use <checkbox-widget ontoggle.call="selected(foo, bar, baz)"> and this.ontoggle({ foo: 1, bar: 2, baz: 3 });

@jdanyow Would you be willing to update the cheat sheet to remove the docs on the old way and document the new way? It can be found in the framework repo, in the doc folder.

doesn't that mean that foo, bar, and baz need to be defined in the binding override context?  I was meaning for passing values only defined in the checkbox back.

@EisenbergEffect sure

@michaelmalonenz here's an example using the element from your original post:
<checkbox-widget ontoggle.call="selected(checked)"></checkbox-widget>

checkbox-widget.js
  ...
  if (this.ontoggle) {
    this.ontoggle({ checked: this.checked });
  }
  ...

Another example, to make it more clear:
<checkbox-widget ontoggle.call="selected(LOOK__sOme__ArGumEnt__)"></checkbox-widget>

checkbox-widget.js
  ...
  if (this.ontoggle) {
    this.ontoggle({ LOOK__sOme__ArGumEnt__: this.checked });
  }
  ...

:+1 This works for me, but I would have never known that this was possible. I think the above example would be great to have on the docs.

@jdanyow I really hope it's still possible to mix in view specific variables?
<checkbox-widget ontoggle.call="selected(LOOK__sOme__ArGumEnt, LOOK_SOME_OTHER_VIEW_SPECIFIC_ARG )"></checkbox-widget>

@stoffeastrom definitely!
call / delegate / trigger support any method invocation expression... multiple args, no args, whatever. The expression is evaluated when the event fires (in delegate/trigger scenarios) or when the behavior invokes the method (in call) scenarios.
Here's a concrete example:
export class App {
  foo = 'foo';
}

<input ref="myInput">
<div mousemove.delegate="helloWorld.doSomething(foo, myInput.value, $event)"></div>

When the mousemove event fires, the delegate binding will add the actual DOM event to a property on the scope named $event. Then it will evaluate the  helloWorld.doSomething(foo, myInput.value, $event) expression, just like it would if you were using it in a string interpolation expression like this ${helloWorld.doSomething(foo, myInput.value, $event)}.
What's special about the call binding is the custom element/attribute is you get to define what properties get added to the scope and thus available for data-binding.  For example let's say you had a custom element with a click bindable property:
my-element.js
export class MyElement {
  @bindable click;
  ...
  notifyClick(e) {
    // this makes "x" and "y" available for binding purposes:
    let args = { x: e.clientX, y: e.clientY };
    this.click(args);
  }
  ...
}

app.js
export class App {
  something = 'hello world';
}

app.html
<my-element click.call="handleClick(x, y, something)"></my-element>
```html

:+1:

Nowadays it still not in the cheat sheet, or I'm wrong?

@cirelli94 I went looking and didn't find that detail either. It must has slipped through the cracks. Would you be interested in submitting a PR to our documention? It would be a great contribution and would help the community. Here's the source file for the cheat sheet: https://github.com/aurelia/framework/blob/master/doc/article/en-US/cheat-sheet.md If you wanted to go for extra credit, you could also add a section to the end of this document: https://github.com/aurelia/binding/blob/master/doc/article/en-US/binding-delegate-vs-trigger.md It would really help us out!


Adding Owner References for Existing Resources

In this example I believe "to_be_owned.namespace" in the when clause supposed to be to_be_owned.metadata.namespace
 when: to_be_owned.namespace is not defined or to_be_owned.namespace != owning_resource.namespace

_ name: Patch resource with owner annotation
  when: to_be_owned.namespace is not defined or to_be_owned.namespace != owning_resource.namespace
  kubernetes.core.k8s:
    state: present
    resource_definition:
      apiVersion: "{{ to_be_owned.apiVersion }}"
      kind: "{{ to_be_owned.kind }}"
      metadata:
        name: "{{ to_be_owned.metadata.name }}"
        namespace: "{{ to_be_owned.metadata.namespace | default(omit)}}"
        annotations:
          operator-sdk/primary-resource: "{{ owning_resource.namespace }}/{{ owning_resource.name }}"
          operator-sdk/primary-resource-type: "{{ owning_resource.kind }}.{{ owning_resource.apiVersion.split('/')[0] }}"

@laurieaw63 Thanks for raising this issue! Just to verify, is this regarding an example in the documentation found here: https://sdk.operatorframework.io/docs/building-operators/ansible/reference/retroactively-owned-resources/#each_resourceyml ?

yes

Unassigning myself as I don't think I'll have a chance to get to this soon. If anyone picks it up and needs any help, feel free to ping me here. Thanks!
/unassign

Hey, I want to understand this issue and work on it,  can anyone please provide References and resources to understand and solve the issue?

To clarify, we need to change  ### to_be_owned.namespace to ### to_be_owned.metadata.namespace  right?

To clarify, we need to change to_be_owned.namespace to to_be_owned.metadata.namespace right?
@wasup-yash Correct


Generate lexicon

How do we generate lexicon(s), strongs and others? The SBLGNT have strongs, but with "npm run build:content" I don't get the lexicons built. Thanks.

I join the club. I found no way, how the lexicon entries are generated or is it an additional module? The strongs will be detect in the frontend, but every link to it leads to a 404 and a look in the files show the reason: The conten/lexicon is still not generated. What is the trick, does anybody knows more?

who seeks finds...
https://github.com/digitalbiblesociety/browserbible-bibles

but the lexicon there is not full complete - there is missing some information. Maybe someone can upload a free version of this combined in a ZIP-file?


Unable to get local-zone and local-data working

Creating a new file a-records.conf in /root/unbound with the default unbound.conf from the docker.
docker run \
  --name=unbound-dnscrypt \
  -p 53:53/tcp -p 53:53/udp \
  -v /root/unbound:/etc/unbound/custom.conf.d \
  klutchell/unbound-dnscrypt

server:
    local-zone: "doubleclick.net" redirect
    local-data: "doubleclick.net A <IP_ADDRESS>"

nslookup doubleclick.net DOCKER_IP

I am not getting the <IP_ADDRESS> IP address, instead I am getting a Non-authoritative answer:.
Is there something I have to enable to get this working? I have been researching for a bit of time now and can't find anything.

For some reason if I use the non dnscrypt version, DNSSEC and local lookups work now
docker run \
  --name=unbound \
  -p 53:53/tcp -p 53:53/udp \
  -v /root/unbound:/etc/unbound/custom.conf.d \
  klutchell/unbound

Hey there, klutchell/unbound-dnscrypt is the old name for this project and has not received updates for over 10 months. You should be using the klutchell/unbound image which seems to be working for you!
I'll add a note to the old DockerHub page and close this issue.

Thank you, one last thing, and it probably should go in a different thread.
[1664386290] unbound[1:0] warning: too many file descriptors requested. The builtinmini-event cannot handle more than 1024. Config for less fds or compile with libevent

How do I install libevent in the docker with rootfs?

The recent releases of klutchell/unbound are using libevent so you should not see this warning.

Thank you. Sorry, yah I accidently was pasting the old dnscrypt version again. Everything seems to be good. I am coming from a custom dnsmasq and was getting 30ms, and this is giving me like 6ms so that's much quicker. Also, Android requires DNSSEC.


No indication of progress with --csv

I'm currently running some benchmarks with --stdev 1 --csv and I'm wondering whether they will ever finish. Since there's no terminal output, I can't tell whether they are hanging at a particular benchmark.
Could terminal output be provided even when the --csv option is enabled, just like criterion and gauge handle it?

Oh, I think you might've already fixed this in https://github.com/Bodigrim/tasty-bench/commit/f9691c5667f8fd55af170b7eba7b46f721f96ea9. Would be great to get this released! :)

Yep, I had exactly the same problem which motivated  f9691c5 :) I'll release 0.2 once #1 is tested.
Also f2c98a053ea7be94167d5fd145858ae82d8f37c3 surprisingly fixes precision issues so much that de71f014ebb49d94ab1f230395f29f41c7c8712a actually sets --stdev 1 as default.

Wow, I wouldn't have expected that Integer arithmetic would introduce so much jitter! Sounds like a great improvement! :)

Ah, no surprises, just an integer overflow with Word64 %) Fixed in c21eefc334fb62c27c31dfd83757f7e8ae1785e7


manual migrate R 4.3, libjpeg_turbo

Try migrating R 4.3.
Closes #18
Checklist

[x] Used a personal fork of the feedstock to propose changes
[x] Bumped the build number (if the version is unchanged)
[x] Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
[x] Ensured the license file is being packaged.

@conda-forge-admin please rerender

@conda-forge-admin please rerender
@conda-forge-admin please restart cis

Fixed in #18


Add TypeScript declaration support using protoc-gen-ts plugin

This PR is an implementation of the feature request described in https://github.com/namely/docker-protoc/issues/111:
My proposal is to add a --with-typescript option to the node language that leverages the ts-protoc-gen plugin to generate TypeScript declaration files (.d.ts files) that match the JavaScript output of protoc --js_out=import_style=commonjs,binary.
That plugin can also generate service definitions that include TypeScript declarations in the structure required by the Improbable grpc-web implementation. This PR doesn't use that feature; I thought if it would be useful to expose it as an option, maybe it would make sense as an option to the web language, and could be its own PR?

Thanks sorry for the delay!


[BUG] recyclerView.computeVerticalScrollOffset() always return 0

📝 Describe the Bug
Upgrade pdf-viewer 2.1.1 version
After upgrading pdf-viewer to version 2.1.1, recyclerView.computeVerticalScrollOffset() always returns 0. The offset cannot be determined, resulting in an inability to determine whether the PDF has scrolled to the bottom. Is there any good solution?
📖 Library Version

PDF Viewer Version: [e.g., 2.1.1]

🚶 Steps to Reproduce
Please follow these steps to reproduce the issue:

Initial Setup/Library Method Used: [e.g., initWithUrl method]
Actions Taken: [e.g., Clicked on 'Load PDF']
Unexpected Behavior: [e.g., PDF not loading]
Relevant Code/Stack Trace: [Include code snippet or stack trace if applicable]

🤔 Expected Behavior
What did you expect to happen?
🖼 Screenshots/Videos
If applicable, add screenshots or videos to help explain your problem.
📱 Smartphone Info:

Device: [e.g., Samsung Galaxy S10]
OS: [e.g., Android 11]
Library Version: [e.g., 2.0.0]

💻 Code Snippets
Include relevant code snippets or links to code repositories.
📜 Log Output/Stack Trace
Include any error logs or stack trace for more context.
💬 Additional Context
Add any other context about the problem here. Mention if the issue is consistent, specific scenarios where the bug occurs, etc.

to fix your trouble check this solution click
maybe this will solve your problem.


Storage data not available on Symo GEN24

Hi,
when I run the example script i get nothing on my BYD HVM storage
DEBUG:pyfronius:Get current storage data for GetStorageRealtimeData.cgi?Scope=Device&DeviceId=0
DEBUG:pyfronius:Converting storage data from '{}'

Is that because GEN24 needs new protocols implemented as mentioned in the other issue?

Looks like "GetStorageRealtimeData Request is not supported any longer" by the current GEN24 Firmware.


create: Implement --console-socket option

Docker 17.06 relies on this new option because it relies on the latest version of runc (1.0.0-rc3). This PR implements this option for the create.
Fixes #293

Coverage increased (+0.1%) to 52.694% when pulling 08d2c195e6a243dbf047113db9b6620f5a876080 on implement_console_socket into 054fa04caab1b691ba594b5d303793c118b20e51 on master.

lgtm

lgtm

Would it be easier to copy & paste https://github.com/opencontainers/runc/blob/master/libcontainer/utils/cmsg.go instead of vendoring 11K of lines?

@dvoytik I agree with that but the reason why I made this choice is because I want to stay in sync with what is defined by runc. This means that if the SendFd functions changes for runc, then Docker will expect something else and we will break our compatibility.

Coverage increased (+1.0%) to 53.51% when pulling 3f9c1984992460ff900287c7da98b1234314b6dc on implement_console_socket into 054fa04caab1b691ba594b5d303793c118b20e51 on master.


Getting error while building plugin for Android

Plugin Version or Commit ID
V 0.10
Unity Version
2021
Your Host OS
Windows 11 pro
Target Platform
Windows Standalone, Android
[Windows Only] Visual Studio C++ and Windows SDK Version
No response
[Linux Only] GCC/G++ and GLIBC Version
No response
[Android Only] Android Build Tools and NDK Version
No response
[iOS Only] XCode Version
No response
Command Sequences
python build.py build --android arm64 -vv
Log

Additional Context
No response

duplicates #555.


WP-CLI Could not process the 'wp-config.php' transformation in Bedrock

[x] I've read the guidelines for Contributing to Roots Projects
[x] This request isn't a duplicate of an existing issue
[x] I've read the docs and followed them (if applicable)
[x] This is not a personal support request that should be posted on the Roots Discourse community

Description
I'm trying to inject a new config to wp-config.php using wp-cli by running this command wp config set S3_UPLOADS_BUCKET 'value'
Steps to reproduce

Fresh bedrock project
Complet WP installer
Run this command for example wp config set WP_DEBUG true --raw

Expected behavior:
I expect to see the new config inside wp-config.php file as well
Actual behavior:
console error with this message
Error: Could not process the 'wp-config.php' transformation.
Reason: Unable to locate placement anchor.

Versions
Mac-Os: latest
Bedrock: 1.14.1
PHP version:	7.4.9

Two things:

that command lets you set the anchor (https://github.com/wp-cli/config-command/blob/c3ed520d62e0ef93c713fff959c578ff90f6c488/src/Config_Command.php#L411-L413). Since Bedrock's wp-config.php doesn't have the normal anchor text, you could set that to a string that does exist.
Bedrock's configuration model uses config/application.php and not wp-config.php so you don't want to edit that file anyway.

I don't think it's possible to tell WP-CLI to look for a different file unfortunately.

Hi,
I faced this too, but fortunately found a fix
By default the  wp config set command adds the rule just before "/* That's all, stop editing!".
If your config file is missing that line then it may cause issues
The workaround is to either pass another --anchor or add the missing line.
/* That's all, stop editing! Happy publishing. */


[Bug] Smoking Embers give off a light level of 15

I assume this is a bug because Smoldering Embers, the brighter-burning block, only give off a light level of 4.

Yup, that checks out, don't know how I missed that. Thank you for pointing it out!

Fixed! eb92470


ARTEMIS-1659 add test for reload on inactive slave

Adding a test for this change to avoid any future regressions.

I don't mind much about the checkstyle broken here as I could fix with an intermediate checkout...
But this test is always failing for me. Isn't this supposed to work?
if it's broken can you commit a fix with the test?

Hmmm...The test passes for me. The test is for the change made on #1859. Without that change the test fails.


can.fixture.rand should be inclusive

I think the numbers and arrays produced from can.fixture.rand should be inclusive of the MAX argument instead of exclusive. I think it would  be a more intuitive API.
The best example of this I can give is this:
can.fixture.rand( [ "j", "m", "v", "c"] , 2, 3);

I think most people would assume this would give you either 2 or 3 items from the array, but in actuality is only ever going to give you 2 random items, because the MAX is exclusive.
In my opinion, It also leads to a more intuitive API for the numbers too:
// get a random integer between 0 and 10 (inclusive)
rand(10);

// get a random number between -5 and 5 (inclusive)
rand(-5, 5);

Math.random() gives you between 0 and 1 exclusive of 1 I believe.

It does. But I don't think that invalidates the argument, specifically the can.fixture.rand( [ "j", "m", "v", "c"] , 2, 3); example

Yeah, this would be a 3.X change.  I'm not sure about changing rand(-5,5) though.

Closing for the same issue in can-fixture


Extra numbers in reference_name?

When I run the code (which includes just "V1 F2000" as the reference_name) it has this output:

How do I get rid of the (1-11) next to the reference_name?  What is it referring to?  (I'm assuming to the years present in the climo file, and if that is the case, why doesn't one appear for the test case?)

Hi @kaabre, (1-11) is simulation years, which is read from metadata of simulation files. This helps to indicate the years averaged for climatology. We don't have a mechanism to leave out  these numbers though. And you are right, this should be done also for the reference plot for model-vs-model. I'm assigning myself to work on this.

Thanks!

Done

Done


update auto transcript_by

Update to transcript_by: youtube_to_bitcoin_transcript_v_1.0.0 to transcriber_to_bitcoin_transcript_0.1

does this work?
transcript_by: transcriber_to_bitcoin_transcript_v_{1.0.0}

I was thinking of including the name or at least the github name as well.
How about Shaswat Gupta via TBTBTC v1.0.0 or masterchief164 via TBTBTC v1.0.0


add Faculty of Engineering, Ain Shams Univ

@menna601 I am sorry, the domain eng.asu.edu.eg is removed from our trusted domains list because it was abused in the past. If you are the student of this school, please enroll to GitHub Student Developer Program. Then apply for JetBrains educational subscription with your GitHub account (GitHub tab at https://www.jetbrains.com/shop/eform/students).


[Feature] Can you try to synchronize the Lean's luci source

https://github.com/coolsnowwolf/luci/tree/master/applications
Can you try to synchronize some of the plugins in this, I hope to say that the content is similar on both sides

and pls add this plugin luci-app-openclash
https://github.com/vernesong/OpenClash/tree/master/luci-app-openclash

Feel free to create PRs for importing stuff from there, or better yet, ask the authors themselves to create PRs here.

wait
if luci app is lua language
Can it be pushed to pr?


Roll engine 10167db43344..d212b9ab33a0 (4 commits)

git@github.com:flutter/engine.git/compare/10167db43344...d212b9ab33a0
git log 10167db43344..d212b9ab33a0 --no-merges --oneline
2019-08-20<EMAIL_ADDRESS>Revert "Roll src/third_party/dart f7902889b6..6e2b3f0326 (7 commits)" (flutter/engine#11298)
2019-08-20<EMAIL_ADDRESS>Revert "Roll src/third_party/dart 6e2b3f0326..b99df2be86 (5 commits) (#11287)" (flutter/engine#11297)
2019-08-20<EMAIL_ADDRESS>Roll src/third_party/dart 6e2b3f0326..b99df2be86 (5 commits) (flutter/engine#11287)
2019-08-20<EMAIL_ADDRESS>Roll src/third_party/dart f7902889b6..6e2b3f0326 (7 commits)
The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md
If the roll is causing failures, please contact the current sheriff (liyuqian@google.com), and stop
the roller if necessary.

Auto-roller completed checks. About to merge.


Question about support for SimplyPro LTO-9 single unit

Hello
I am new to LTO and LTFS world, so forgive my ignorance. I am trying to evaluate using LTO tapes (LTFS) and found a nice tape drive for LTO-9 but I am not sure if its supported with this toolkit. https://tapes.nl/product/symplypro-lto-desktop-thunderbolt-3-hh-lto-9/
Isn't the api to talk with the tape drives the same for all of them?
Isn't LTFS a standard used across all devices?
If not, why wouldn't it be compatible with this drive for example?
I am just trying to use the LTFS filesystem with this unit in anything that is not Mac or Windows, no fancy stuff, just mount the tape as a drive, write and read from it

Your questions are not clear to me. May be, you and I am not in the same page. So I would like to start from the beginning.
First of all, you might not be able to see any changes in your system when you connect a LTO drive to your system except only one device is added into your system. (You can't see any drive icon on your desktop or somewhere.)
Once you connected a LTO drive in your system, a device file /dev/sg? is added on your machine in Linux or device entry is added on the 'system report' in Mac. This "device" on the system shall be used from one of application for tape like tar command. (It is quite deferent from the disk...)
LTFS is one of software to use LTO drive on system. So LTFS requires target drive is detcted on the system before using it. This drive detection problem is not a scope of this LTFS project at all. It just use a tape device detected by the system.

I am just trying to use the LTFS filesystem with this unit in anything that is not Mac or Windows, no fancy stuff, just mount the tape as a drive, write and read from it

LTFS is not a S/W that runs within a tape device at all. You need to connect the drive to the system (Linux or Mac) and run the LTFS S/W on that system. (For windows, the code in this project does not support it. Use other vendor's LTFS with supported drives.)

So is it correct to say that LTFS is a file system and this is standard in the market, and this "ltfs" project is a toolkit that implements the api to talk to this LTFS filesystem? Why does it state the tape drives supported in the README then? I dont understand....
So to use this specific drive I would need to find a specific driver for this specific drive in linux, and once I have the /dev/sg? device available this ltfs project is going to be able to format, read and write files as a "normal" folder in the mounted device using LTFS filesystem?

I really appreciate your time and answers. So what I understood is that in theory it should be detected but it has not been validates by your team.
Thanks a lot!!


Add Instagram file processing support to the image metadata updater

This pull request introduces support for Instagram file processing in the image metadata updater script. The following changes have been made:
Added a new regular expression pattern to identify Instagram files based on the format IMG_YYYYMMDD_HHMMSS_###.jpg, .jpeg, .png, and .webp.
Integrated Instagram file processing into the existing metadata updating workflow for images and videos.
Allowed the user to select instagram mode when running the script, enabling it to process Instagram files in the same manner as WhatsApp and Snapchat files.
Updated the process to handle Instagram files, updating their metadata when necessary.
Changes made:
New regex pattern added for Instagram files.
New processing logic for Instagram images.
Updated the process_directory function to handle Instagram mode.
Enhanced the user input to select instagram mode.
This update should allow users to manage and update metadata for Instagram files seamlessly alongside other supported platforms.
Testing:
Test cases for Instagram files (JPEG, PNG, WebP) have been verified.
Metadata updates are working as expected for Instagram images in the selected directory.

Thank you for the work for Instagram!, I'll update the readme


Use M3 TransformingLazyColumn in Wear App

Use M3 TransformingLazyColumn in Wear App
Refactor the app to use TransformingLazyColumn instead of ScalingLazyColumn for better scrolling behavior.
Adopt M3 components at the same time.
Add bookmark swipe to reveal actions.

@joreilly any objection to landing? Simpler than rebasing over time.


Allow user to provide custom buttons to the form

Refs #33

Shaping great!

et voilà !

Merveilleux! I'm landing this. Thanks for contributing :)

I've just published v0.10.0 to npm.

Perfect, thanks !

Do we have a sandbox or plunker for this issue. Any help is appreciated.
Regards
Avenash


Typescript Plugin

Ref https://twitter.com/left_pad/status/820054499389804544
This would help tooling for other things like ESLint, prettier, and users that use both Babel and Typescript (and using either < stage 3 syntax or want to use Babel to compile). And maybe other things in the future?
Now I'm not sure anyone on the team is able to dedicate time to create or maintain the plugin (there's plenty of stuff to work on already and all as volunteers) but we can help out with questions (testing, how it works, etc). I think it would work the same as how we maintain the flow plugin. The Flow team submits PRs for upcoming features/fixes and we help to review the changes according to our style/codebase.
A new proposal requires a few changes: https://github.com/babel/babel/wiki/Adding-a-new-Proposal-to-Babel. Basically a change to the parser, the code generator (for consistency although maybe not necessary), the AST spec doc, the
AST helper functions, and to the plugin that removes the types.
We are determining what to do about spec changes/major bumps via https://github.com/babel/babylon/issues/275. Basically a change that isn't a major bump would be a different plugin so we can just release a minor of the parser rather than a major bump.
The flow team is available to talk to us via slack/github and now we also have a #typescript room in our slack so can also discuss with the TS team and others that want to help out with this effort. (Signup at http://slack.babeljs.io/, the room url after you've signed in is https://babeljs.slack.com/messages/typescript/).

I'm going to edit this section later about the basics of implementing this but just wanted to get an issue started.

Babylon is acorn, so the way you can do plugins is by extending certain parser methods
https://github.com/babel/babylon/tree/master/src/plugins for flow/jsx

flow extending
jsx extending

[ ] find and extend the correct hooks for TS (probably similar to flow for most, need a few new ones)
[ ] create all the helper parser methods pp.methodHere
[ ] add to plugins https://github.com/babel/babylon/blob/b6c3b5aa8319582f695e7944503612e39aa08261/src/index.js#L14-L17
[ ] import tests from TS?
[ ] update readme

I am going to dig into this ASAP, but just wanted to note in advance that it would be great to avoid duplicating the efforts we have already made on https://github.com/eslint/typescript-eslint-parser, which is solving a very similar problem of ESTree and TS AST interop/conversion.

@danez is currently working on compatibility with ESTree #277

IMHO the best way to go for TS right now is forking babylon and there making the adjustments to parse TypeScript. Babel can then use this alternative parser and also an alternative generator (which can be based on babel-generator). Transforms in babel can live independently anyway.
It maybe even easier to adjust the TypeScript parser to have an option to output babel-compatible AST, so it can be used directly in babel, but I have never had a look at TypeScript so dunno.
I think it would be good to not add more different syntax extensions to the babel repos to keep them more maintainable, not just code-wise, but also issues and PR which would increase if we add more and more stuff (and we already have a lot). And instead focus more on making it more easy to extend.

It's possible to extract some AST subset, compatible with flow and ts? For writing some universal transformation plugins.

@danez

It maybe even easier to adjust the TypeScript parser to have an option to output babel-compatible AST

So TS + typescript-eslint-parser is already a way to effectively take TypeScript source code and produce an ESTree AST.
If I understand correctly, the work currently being done on Babel + ESTree is around Babel outputting ESTree, but if it were possible to for Babel to also consume ESTree as an option, then we potentially have a lot of the moving parts already...
I don't yet know enough about Babel to know how that relates to @hzoo task list  in the description above

@JamesHenry Nearly.
The work that is currently done is to have an option (or plugin) that enables babylon (the parser of babel) to output estree. This is so that other tools like eslint, react-docgen, basically everything that consumes estree ASTs to be able to drop in babylon.
Afaik there are no plans to use the estree mode within babel, as the changes that were made to the ESTree format are all valuable additions/changes and make it way easier to write plugins in babel.

@danez
The intention of the issue/discussion earlier was that I thought we could possibly have a ts plugin like with flow/jsx? And that the Babel team wouldn't be the ones maintaining/creating it, but it would be like flow in that the Flow team can make PRs etc.
And yes @JamesHenry already has done separate work via typescript-eslint-parser which uses the TS parser -> ESTree. This issue was about getting babylon itself to parse TS but maybe that's unnecessary?

And instead focus more on making it more easy to extend.

Not sure what we can do there yet?

Well even with flow, we are not up2date with all the syntax-features it supports and my main concern is that for every syntax-plugin (flow, jsx, ts, ...) all the bugs would come in here in this repo, and right now it is the babel-team triaging, managing and fixing them most of the time and not the flow team (no offense her btw, probably they would do it if we ping them). But more plugins -> more bugs/changes/updates.
That is why i think it would be nice to have separate repos with separate responsibilities.
Of course making external plugins work in a reasonable way is a complete different topic and I have no idea how atm.

I posted this in the #typescript slack channel, but this might have better visibility:
I'm curious if anyone has given thought to how to name/shape the ast extensions, i.e. should they attempt to resemble the official ts compiler? or the ts grammar spec? or potentially share node names with flow?
some notes:

the ts official compiler AST isn’t a 1:1 mapping to the spec grammar (as would be expected I guess)
some of the ts compiler nodes are directly mappable to EStree nodes (i.e. ts PropertyAccessExpression -> estree MemberExpression)
some of the ts compiler nodes and flow nodes are directly mappable (i.e. StringTypeAnnotation -> StringKeyword)

others are not, i.e. InterfaceDeclaration in the flow AST has a body property which is an ObjectType that holds the interface's indexers, properties, and call properties. In the ts compiler AST, InterfaceDeclaration directly references the indexers, properties, and call properties without the intermediate ObjectType. (The ts grammar spec otoh, does have the ObjectType concept which is analogous to the flow node by the same name.)

some concepts between the two are somewhat analogous, but do not have exactly the same semantics (i.e. interfaces can have mixins in flow, but there are no mixins in ts)

I suspect that a typescript extension should target a separate set of ast node names from flow to entirely avoid collisions where the two systems don't match, but that leaves a question for how to best extend beyond the base ESTree types (attempting to match the ts compiler, or attempting to match a combination of the grammar spec + flow ast node structure).

@stephen As mentioned in slack, I will document what we have done in typescript-eslint-parser. It is something we have already had to tackle

Initial pr merged in https://github.com/babel/babylon/issues/523!
Babel prs: https://github.com/babel/babel/pull/5896, https://github.com/babel/babel/pull/5899, https://github.com/babel/babel/pull/5856

Ok all 3 PRs are merged, and released in alpha.19
Can test with
{
  "presets": ["typescript"]
}

You'll want to make sure all your packages are 7.0.0-alpha.19, although babel-loader/gulp-babel are already out of alpha/beta since they won't need to be updated.

@hzoo do you have any resource or link to get started with writing Babel plugins for TS? Or is it the same as with Flow? Anyway thank you for your great work!! 😍

It works like with Flow, but with different nodes. You can find them in the TypeScript sections of src/types.js:
https://github.com/babel/babylon/blob/master/src/types.js#L792
https://github.com/babel/babylon/blob/master/src/types.js#L869


failed to connect to ORPort: dial: connection refued

Hi, gumblex. First of all, thank you for the creation of the project.
When I use this project, encountered the following issues, can you help me look at it?
2015/09/01 10:11:44 [NOTICE]: obfs4proxy-0.0.6-dev - launched
2015/09/01 10:13:07 [ERROR]: obfs4([scrubbed]:35534) - failed to connect to ORPort: dial: connection refused
2015/09/01 10:13:09 [ERROR]: obfs4([scrubbed]:35538) - failed to connect to ORPort: dial: connection refused
2015/09/01 10:13:11 [ERROR]: obfs4([scrubbed]:35548) - failed to connect to ORPort: dial: connection refused
2015/09/01 10:13:11 [ERROR]: obfs4([scrubbed]:35552) - failed to connect to ORPort: dial: connection refused

Sorry, I was wrong place...

@gumblex
I'm not sure, I think I posted wrong place? I reposted to here

Obfs4 is probably not responsible for this. Please post your config file here. (Remove your private IP address and obfs4 certificate.)

Below is my server config:
{
    "role": "server",
    "ptexec": "obfs4proxy -logLevel=ERROR -enableLogging=true",
    "ptname": "obfs4",
    "ptproxy": "",
    "ptserveropt": "",
    "state": "/tmp/PT/"
}

I have read the source code, and found the error was throw from here
But I don't know what ORPort is used for.

I meant your public IP address, but it didn't matter... I think there isn't a server listening on the "local" address. This script and obfs4 tunnel raw TCP stream, so you must have a real application server (HTTP server, SSH, SOCKS server, etc.) to make it work. Think it as obfscated port forwarding.

I found your profile location is Shanghai, China. Can you read chinese?
I use shadowsocks as a application server and listening "local" port 1080, and ptproxy's local address is <IP_ADDRESS>:1080, is this wrong?

没错。ORPort 就是服务端的 "local" 地址(ptproxy.py 99 行)，obfs4 说没法连接。

你的意思是，问题出在服务端的obfs4 和 shadowsocks之间？obfs4无法连接服务端的shadowsocks监听端口？iptables 的FORWARD policy，我默认DROP了，会和这个有关吗？VPS上的服务器被我删了。。。

不早了，我明晚再尝试一下，谢谢你的帮助。

无法连接，可能和防火墙有关。服务端的 ptproxy 没做什么网络连接方面的事情。

不好意思，是ss配置错了，将服务端ss的server/port配置成监听服务器的obf4 forward的端口才对，谢谢你的帮助。


Not trying filter tricks on empty PREFIX needle

fixes issue #572

@pdet I have added an optimiser as suggested.


Initial docs for media entity video module

Would be great to add some basic information/tutorial.

I'll see if I can get to it. I mainly wanted to fix the 404 from this page: https://drupal-media.gitbooks.io/drupal8-guide/content/modules/media_entity/type_providers.html