Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

thread 'main' panicked at 'data.len()' #3

Closed
ImmaZoni opened this issue Aug 14, 2021 · 3 comments · Fixed by #51
Closed

thread 'main' panicked at 'data.len()' #3

ImmaZoni opened this issue Aug 14, 2021 · 3 comments · Fixed by #51
Labels
backburner not a priority bug Something isn't working

Comments

@ImmaZoni
Copy link
Contributor

Describe The Issue

After installing the .deb file i am unable to run on Ubuntu, receiving the following error:
thread 'main' panicked at 'data.len() must fit the width, height, and row_stride', /home/runner/.cargo/registry/src/github.jparrowsec.cn-1ecc6299db9ec823/gdk-pixbuf-0.9.0/src/pixbuf.rs:57:13

Showing the Full Rust Backtrace gives us the following details.

thread 'main' panicked at 'data.len() must fit the width, height, and row_stride', /home/runner/.cargo/registry/src/github.jparrowsec.cn-1ecc6299db9ec823/gdk-pixbuf-0.9.0/src/pixbuf.rs:57:13
stack backtrace:
   0:     0x55a873d519a0 - std::backtrace_rs::backtrace::libunwind::trace::h34055254b57d8e79
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
   1:     0x55a873d519a0 - std::backtrace_rs::backtrace::trace_unsynchronized::h8f1e3fbd9afff6ec
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x55a873d519a0 - std::sys_common::backtrace::_print_fmt::h3a99a796b770c360
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x55a873d519a0 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h32d1f94a80615d18
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/sys_common/backtrace.rs:46:22
   4:     0x55a873d77c7c - core::fmt::write::h306731c068f7162c
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/core/src/fmt/mod.rs:1110:17
   5:     0x55a873d4ae65 - std::io::Write::write_fmt::hd2fa90334eee2a21
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/io/mod.rs:1588:15
   6:     0x55a873d541ab - std::sys_common::backtrace::_print::h5abaa2601a852287
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/sys_common/backtrace.rs:49:5
   7:     0x55a873d541ab - std::sys_common::backtrace::print::h8d81445442bb638f
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/sys_common/backtrace.rs:36:9
   8:     0x55a873d541ab - std::panicking::default_hook::{{closure}}::hcfe804496a9fa747
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/panicking.rs:208:50
   9:     0x55a873d53c81 - std::panicking::default_hook::hbea8e3ccf2ba8901
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/panicking.rs:225:9
  10:     0x55a873d54874 - std::panicking::rust_panic_with_hook::h7ee9e1a2d0f8975a
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/panicking.rs:622:17
  11:     0x55a873c61e44 - std::panicking::begin_panic::{{closure}}::hb191926c75ece194
  12:     0x55a873c610dc - std::sys_common::backtrace::__rust_end_short_backtrace::h5dfa0ef52750deca
  13:     0x55a8738fbd0c - std::panicking::begin_panic::hf3166836ebffcdfc
  14:     0x55a873c590a4 - tao::platform_impl::platform::window::<impl core::convert::From<tao::platform_impl::platform::window::PlatformIcon> for gdk_pixbuf::auto::pixbuf::Pixbuf>::from::h3bbbbd74553c156c
  15:     0x55a873c06f17 - tao::platform_impl::platform::window::Window::new::h2ad12a23bfbfc237
  16:     0x55a873be4709 - tauri_runtime_wry::create_webview::h2f10ab855362e910
  17:     0x55a873bdee93 - <tauri_runtime_wry::Wry as tauri_runtime::Runtime>::create_window::ha7913b3459a4059e
  18:     0x55a87397547e - tauri::app::Builder<R>::run::h8354e64501de5240
  19:     0x55a873a3288a - app::main::heb3bda2d29f63e8a
  20:     0x55a873a27ef3 - std::sys_common::backtrace::__rust_begin_short_backtrace::hcbbb78530f622e4f
  21:     0x55a873a27f09 - std::rt::lang_start::{{closure}}::h3a2abccd25d74555
  22:     0x55a873d54e79 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h2aabc384aab89b7b
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/core/src/ops/function.rs:259:13
  23:     0x55a873d54e79 - std::panicking::try::do_call::hc5fcacb7a85fc7b1
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/panicking.rs:401:40
  24:     0x55a873d54e79 - std::panicking::try::hb5d9603af3abbe3a
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/panicking.rs:365:19
  25:     0x55a873d54e79 - std::panic::catch_unwind::h98fe6ac3925e64b4
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/panic.rs:434:14
  26:     0x55a873d54e79 - std::rt::lang_start_internal::h22ac7383c516f93e
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/rt.rs:34:21
  27:     0x55a873a32e42 - main
  28:     0x7f78d0e3d0b3 - __libc_start_main
  29:     0x55a873901f9e - _start
  30:                0x0 - <unknown>

Expected Behavior

Running of program.

System Details

Lenovo Thinkpad T15 Gen 2 Intel Core i5-11135G7 16GB Ram.
Ubuntu LTS 20.04 Kernel 5.13.9

@ImmaZoni ImmaZoni added bug Something isn't working backburner not a priority linux labels Aug 14, 2021
@jdheeter
Copy link
Contributor

jdheeter commented Oct 5, 2021

I also experienced this error on Ubuntu 20 running in virtualbox.

@gluneau
Copy link

gluneau commented Dec 22, 2021

Same for me:

➜  subspace-desktop git:(main) ✗ yarn tauri dev
yarn run v1.22.5
$ tauri dev
 app:spawn Running "/home/.../GitHub/subspace-desktop/node_modules/@tauri-apps/cli/bin/tauri-cli tauri dev" +0ms

   Compiling app v0.1.0 (/home/.../GitHub/subspace-desktop/src-tauri)
    Finished dev [unoptimized + debuginfo] target(s) in 17.10s
     Running `target/debug/app`
thread 'main' panicked at 'data.len() must fit the width, height, and row_stride', /home/.../.cargo/registry/src/github.jparrowsec.cn-1ecc6299db9ec823/gdk-pixbuf-0.14.0/src/pixbuf.rs:52:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

@1devNdogs
Copy link
Contributor

Found the problem in here, it is related to tauri icons requierements, we where using a 500x500 png on subspace-logo.png when a 1240x1240 transparent PNG was requiered.

This file is used by yarn tauri icon command to generate the app icons. A non 1240x1240 transparent PNG will generate wrong size icons. This icons issue only affects Linux.

This branch contains correct icon sizes and regenerated icon folder. Tested on ubuntu and debian and seems to works now. https://github.com/subspace/subspace-desktop/tree/fix-linux-build, next release should include this changes.

@1devNdogs 1devNdogs linked a pull request Feb 17, 2022 that will close this issue
isSerge added a commit that referenced this issue Oct 3, 2022
* update init in order to catch error and update state

* propagate error from `createAutostartDir`, `enable` and `disable` methods

* `isEnabled` method: return `false` if failed to read file

* update state if `exportLogs` method fails

* `startFarming`: throw error if no address

* `Config.init` propagates error and state is updated

* `Config.write` propagate error

* propagate error and update state if failed to reset the app and start plotting

* add unit tests

* addressing comments

* update generic error message
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backburner not a priority bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants