小编mon*_*lly的帖子

Selenium::WebDriver::Error Chrome 在 M1 芯片上崩溃

我花了几天时间试图解决这个问题,我遇到了以下代码:

caps = Selenium::WebDriver::Remote::Capabilities.chrome(
      "chromeOptions" => {
        :args => ['--user-agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36 LegalMonsterNoBlock"']
      }
    )
    driver = Selenium::WebDriver.for :remote, url: selenium_host, :desired_capabilities => caps
    driver.get(url)
Run Code Online (Sandbox Code Playgroud)

我正在尝试运行调用此方法的测试。测试运行良好。它打开 Chrome 运行测试,但每当我到达调用上述方法的应用程序部分时,测试失败并显示以下错误:

Minitest::UnexpectedError: Selenium::WebDriver::Error::UnknownError: unknown error: Chrome failed to start: crashed
          (chrome not reachable)
          (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
        Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
        System info: host: …
Run Code Online (Sandbox Code Playgroud)

selenium selenium-chromedriver selenium-webdriver apple-m1

6
推荐指数
1
解决办法
782
查看次数

光线跟踪F# - 缺少三角形图中的洞:正确点击?

我已经研究了很长一段时间,并坚持这个错误.

我们在F#中为学校项目建立了一个光线跟踪器.(链接解释Ray tracer:https://blog.frogslayer.com/kd-trees-for-faster-ray-tracing-with-triangles/)

我们为三角形,边界框创建了一个命中函数,一个KD树来处理具有数千个三角形的图形,例如Stanford Bunny和KD树的遍历算法.

我们已经调试了KD树的创建,确保为浮点添加epsilon值,并检查边界框之间的重复项是否被删除.我们确信我们正确地分割了场景中的形状列表,但是我们在尝试渲染的图中得到了"洞".

这是我们的KD树实现,我附上了这些洞的图片:

斯坦福兔子

螺旋

module TmKdtree

open Point
open Shapes

type BoundingBox = BasicShape.BoundingBox 
type Shape = BasicShape.Shape

type TmKdtree =
    | Leaf of BasicShape.Triangle list * BoundingBox 
    | Node of BasicShape.Triangle list * TmKdtree * TmKdtree * BoundingBox  * (string*Point)

let epsilon = 0.001

//Making a boundingbox for the KD-tree, by finding max H point in the boundingboxlist and min l point in the boundingbox list. 
let mkKdBbox (shapes : …
Run Code Online (Sandbox Code Playgroud)

f# raytracing kdtree

5
推荐指数
1
解决办法
247
查看次数