Giter Site home page Giter Site logo

Comments (3)

amrbashir avatar amrbashir commented on August 30, 2024 1

Unfortunately I don't have the time to create a minimal reproducable example but wanted you know anyway.

I am unable to reproduce this with rust 1.78, please take some time to make a minimal repro so we can fix this asap

from tauri.

betamos avatar betamos commented on August 30, 2024

No repro but seems like I ran into a similar one related to Rust 1.78:

thread 'tokio-runtime-worker' panicked at library\core\src\panicking.rs:156:5:
unsafe precondition(s) violated: slice::from_raw_parts requires the pointer to be aligned and non-null, and the total size of the slice not to exceed `isize::MAX`

Workaround:

RUSTFLAGS='-C debug_assertions=no' npm run tauri build -- --debug

tauri info

[✔] Environment
    - OS: Windows 10.0.19045 X64
    ✔ WebView2: 125.0.2535.92
    ✔ MSVC: Visual Studio Build Tools 2019
    ✔ rustc: 1.78.0 (9b00956e5 2024-04-29)
    ✔ cargo: 1.78.0 (54d8815d0 2024-03-26)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default)
    - node: 20.14.0
    - yarn: 1.22.4
    - npm: 8.4.0

[-] Packages
    - tauri [RUST]: 1.5.3
    - tauri-build [RUST]: 1.5.0
    - wry [RUST]: 0.24.6
    - tao [RUST]: 0.16.5
    - @tauri-apps/api : not installed!
    - @tauri-apps/cli [NPM]: 1.5.14

[-] App
    - build-type: bundle
    - CSP: default-src blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self' img-src: 'self'
    - distDir: ../ui/build
    - devPath: http://localhost:5173/

from tauri.

nicolaiunrein avatar nicolaiunrein commented on August 30, 2024

@betamos Did you capture a backtrace? It seems the issue you are seeing is caused by a different assertion. I figured out mine is caused by moving the above struct (with an internal Rc) to a different thread which is UB because Rc is not Send and dropping it there. The assertion I hit is that the strong count does not equal 0 which IMO can only happen in unsafe code. The question is how to re-create a situation where the Rc can escape the thread it was created on. I have some vague ideas but need to find the time to investigate. In summary we are calling a method with a callback closure (FnMut) where we reference a Box<dyn Eventemitter> (a trait object around a tauri::Window` if I remember correctly) from inside the closure.

from tauri.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.