Spagett1 / pineflash

A tool to flash ironos to the pinecil soldering iron and possibly other pine64 devices in the future
Other
213 stars 12 forks source link

Crashes upon start #42

Closed vsviridov closed 1 year ago

vsviridov commented 1 year ago

On Windows 10.

After launching the main window briefly appears, with a button "Versions found" and a progress bar receding. After few seconds the window disappears.

Spagett1 commented 1 year ago

Hi, would you be comfortable installing rust (from rustup.rs) and compiling it manually (done by running the cargo run command inside the project directory) you will also need to download (or copy from your exksting install) blisp and dfu-util into a folder called tools in the top folder of the project.

This will give you some logs when run.

If not i can try and generate a windows build with debugging enabled but it will take me a bit of time.

vsviridov commented 1 year ago

let me try...

vsviridov commented 1 year ago

I've compiled a version, but it does not produce any logs to the windows console...

Spagett1 commented 1 year ago

Are you running it with cargo run?

vsviridov commented 1 year ago

I ran it in VSCode with the rust-analyzer and it produced the following output

-------------------------------------------------------------------
You may only use the C/C++ Extension for Visual Studio Code
with Visual Studio Code, Visual Studio or Visual Studio for Mac
software to help you develop and test your applications.
-------------------------------------------------------------------
Loaded 'C:\Users\Vasili\projects\PineFlash\target\debug\pineflash.exe'. Symbols loaded.
Loaded 'C:\Windows\System32\ntdll.dll'.
Loaded 'C:\Windows\System32\kernel32.dll'.
Loaded 'C:\Windows\System32\KernelBase.dll'.
Loaded 'C:\Windows\System32\user32.dll'.
Loaded 'C:\Windows\System32\win32u.dll'.
Loaded 'C:\Windows\System32\gdi32.dll'.
Loaded 'C:\Windows\System32\gdi32full.dll'.
Loaded 'C:\Windows\System32\msvcp_win.dll'.
Loaded 'C:\Windows\System32\ucrtbase.dll'.
Loaded 'C:\Windows\System32\ws2_32.dll'.
Loaded 'C:\Windows\System32\rpcrt4.dll'.
Loaded 'C:\Windows\System32\advapi32.dll'.
Loaded 'C:\Windows\System32\msvcrt.dll'.
Loaded 'C:\Windows\System32\sechost.dll'.
Loaded 'C:\Windows\System32\shell32.dll'.
Loaded 'C:\Windows\System32\ole32.dll'.
Loaded 'C:\Windows\System32\combase.dll'.
Loaded 'C:\Windows\System32\oleaut32.dll'.
Loaded 'C:\Windows\System32\setupapi.dll'.
Loaded 'C:\Windows\System32\cfgmgr32.dll'.
Loaded 'C:\Windows\System32\bcrypt.dll'.
Loaded 'C:\Windows\System32\shlwapi.dll'.
Loaded 'C:\Windows\System32\imm32.dll'.
Loaded 'C:\Windows\System32\dwmapi.dll'.
Loaded 'C:\Windows\System32\opengl32.dll'.
Loaded 'C:\Windows\System32\UIAutomationCore.dll'.
Loaded 'C:\Windows\System32\winmm.dll'.
Loaded 'C:\Windows\System32\uxtheme.dll'.
Loaded 'C:\Windows\System32\vcruntime140.dll'.
Loaded 'C:\Windows\System32\glu32.dll'.
Loaded 'C:\Windows\System32\propsys.dll'.
Loaded 'C:\Windows\System32\cryptbase.dll'.
Loaded 'C:\Windows\System32\msctf.dll'.
Loaded 'C:\Windows\System32\bcryptprimitives.dll'.
Loaded 'C:\Windows\System32\SHCore.dll'.
Loaded 'C:\Windows\System32\kernel.appcore.dll'.
Loaded 'C:\Windows\System32\clbcatq.dll'.
Loaded 'C:\Windows\System32\DataExchange.dll'.
Loaded 'C:\Windows\System32\dcomp.dll'.
Loaded 'C:\Windows\System32\d3d11.dll'.
Loaded 'C:\Windows\System32\dxgi.dll'.
Loaded 'C:\Windows\System32\twinapi.appcore.dll'.
Loaded 'C:\Windows\System32\ExplorerFrame.dll'.
Loaded 'C:\Windows\System32\AppXDeploymentClient.dll'.
Loaded 'C:\Windows\System32\DriverStore\FileRepository\u0390319.inf_amd64_32d8157dec983dab\B389920\atig6pxx.dll'.
Loaded 'C:\Windows\System32\DriverStore\FileRepository\u0390319.inf_amd64_32d8157dec983dab\B389920\atio6axx.dll'.
Loaded 'C:\Windows\System32\version.dll'.
Loaded 'C:\Windows\System32\devobj.dll'.
Loaded 'C:\Windows\System32\wintrust.dll'.
Loaded 'C:\Windows\System32\crypt32.dll'.
Loaded 'C:\Windows\System32\msasn1.dll'.
Loaded 'C:\Windows\System32\ResourcePolicyClient.dll'.
Unloaded 'C:\Windows\System32\ResourcePolicyClient.dll'.
Loaded 'C:\Windows\System32\sxs.dll'.
mincore\com\oleaut32\dispatch\ups.cpp(2122)\oleaut32.dll!00007FF9FA659DD6: (caller: 00007FF9FA6591E9) ReturnHr(1) tid(571c) 8002801D Library not registered.
Loaded 'C:\Windows\System32\windows.storage.dll'.
Loaded 'C:\Windows\System32\wldp.dll'.
Loaded 'C:\Windows\System32\mswsock.dll'.
Loaded 'C:\Windows\System32\dnsapi.dll'.
Loaded 'C:\Windows\System32\IPHLPAPI.DLL'.
Loaded 'C:\Windows\System32\nsi.dll'.
Loaded 'C:\Windows\System32\rasadhlp.dll'.
Loaded 'C:\Windows\System32\FWPUCLNT.DLL'.
Loaded 'C:\Windows\System32\TextInputFramework.dll'.
Loaded 'C:\Windows\System32\CoreMessaging.dll'.
Loaded 'C:\Windows\System32\CoreUIComponents.dll'.
Loaded 'C:\Windows\System32\ntmarta.dll'.
Loaded 'C:\Windows\System32\WinTypes.dll'. 
Loaded 'C:\Windows\System32\WinTypes.dll'.
Unloaded 'C:\Windows\System32\WinTypes.dll'.
Loaded 'C:\Windows\System32\winusb.dll'.
Loaded 'C:\Windows\System32\hid.dll'.
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src\submodules\connection_poller.rs:25:47
stack backtrace:
Loaded 'C:\Windows\System32\dbghelp.dll'.
   0: std::panicking::begin_panic_handler
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library\std\src\panicking.rs:579
   1: core::panicking::panic_fmt
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library\core\src\panicking.rs:64
   2: core::panicking::panic
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library\core\src\panicking.rs:114
   3: enum2$<core::option::Option<alloc::string::String> >::unwrap<alloc::string::String>
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc\library\core\src\option.rs:942
   4: pineflash::Flasher::check_connections
             at .\src\submodules\connection_poller.rs:25
   5: pineflash::impl$3::update
             at .\src\main.rs:168
   6: eframe::native::epi_integration::impl$0::update::closure$0
             at C:\Users\Vasili\.cargo\registry\src\github.com-1ecc6299db9ec823\eframe-0.21.3\src\native\epi_integration.rs:454
   7: egui::context::Context::run<eframe::native::epi_integration::impl$0::update::closure_env$0>
             at C:\Users\Vasili\.cargo\registry\src\github.com-1ecc6299db9ec823\egui-0.21.0\src\context.rs:286
   8: eframe::native::epi_integration::EpiIntegration::update
             at C:\Users\Vasili\.cargo\registry\src\github.com-1ecc6299db9ec823\eframe-0.21.3\src\native\epi_integration.rs:452
   9: eframe::native::run::glow_integration::impl$2::paint
             at C:\Users\Vasili\.cargo\registry\src\github.com-1ecc6299db9ec823\eframe-0.21.3\src\native\run.rs:790
  10: eframe::native::run::run_and_return::closure$0<eframe::native::run::glow_integration::GlowWinitApp>
             at C:\Users\Vasili\.cargo\registry\src\github.com-1ecc6299db9ec823\eframe-0.21.3\src\native\run.rs:140
  11: winit::platform_impl::platform::event_loop::impl$3::run_return::closure$0<enum2$<eframe::native::run::UserEvent>,eframe::native::run::run_and_return::closure_env$0<eframe::native::run::glow_integration::GlowWinitApp> >
             at C:\Users\Vasili\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.28.3\src\platform_impl\windows\event_loop.rs:260
  12: alloc::boxed::impl$46::call_mut<tuple$<enum2$<winit::event::Event<enum2$<eframe::native::run::UserEvent> > >,ref_mut$<enum2$<winit::event_loop::ControlFlow> > >,dyn$<core::ops::function::FnMut<tuple$<enum2$<winit::event::Event<enum2$<eframe::native::run::
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc\library\alloc\src\boxed.rs:1994
  13: winit::platform_impl::platform::event_loop::runner::impl$3::call_event_handler::closure$0<enum2$<eframe::native::run::UserEvent> >
             at C:\Users\Vasili\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.28.3\src\platform_impl\windows\event_loop\runner.rs:250
  14: core::panic::unwind_safe::impl$23::call_once<tuple$<>,winit::platform_impl::platform::event_loop::runner::impl$3::call_event_handler::closure_env$0<enum2$<eframe::native::run::UserEvent> > >
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc\library\core\src\panic\unwind_safe.rs:271
  15: std::panicking::try::do_call<core::panic::unwind_safe::AssertUnwindSafe<winit::platform_impl::platform::event_loop::runner::impl$3::call_event_handler::closure_env$0<enum2$<eframe::native::run::UserEvent> > >,tuple$<> >
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc\library\std\src\panicking.rs:487
  16: glutin::api::wgl::surface::impl$2::resize<glutin::surface::WindowSurface>
  17: std::panicking::try<tuple$<>,core::panic::unwind_safe::AssertUnwindSafe<winit::platform_impl::platform::event_loop::runner::impl$3::call_event_handler::closure_env$0<enum2$<eframe::native::run::UserEvent> > > >
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc\library\std\src\panicking.rs:451
  18: std::panic::catch_unwind<core::panic::unwind_safe::AssertUnwindSafe<winit::platform_impl::platform::event_loop::runner::impl$3::call_event_handler::closure_env$0<enum2$<eframe::native::run::UserEvent> > >,tuple$<> >
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc\library\std\src\panic.rs:140
  19: winit::platform_impl::platform::event_loop::runner::EventLoopRunner<enum2$<eframe::native::run::UserEvent> >::catch_unwind<enum2$<eframe::native::run::UserEvent>,tuple$<>,winit::platform_impl::platform::event_loop::runner::impl$3::call_event_handler::clos
             at C:\Users\Vasili\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.28.3\src\platform_impl\windows\event_loop\runner.rs:157
  20: winit::platform_impl::platform::event_loop::runner::EventLoopRunner<enum2$<eframe::native::run::UserEvent> >::call_event_handler<enum2$<eframe::native::run::UserEvent> >
             at C:\Users\Vasili\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.28.3\src\platform_impl\windows\event_loop\runner.rs:242
  21: winit::platform_impl::platform::event_loop::runner::EventLoopRunner<enum2$<eframe::native::run::UserEvent> >::call_redraw_events_cleared<enum2$<eframe::native::run::UserEvent> >
             at C:\Users\Vasili\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.28.3\src\platform_impl\windows\event_loop\runner.rs:409
  22: winit::platform_impl::platform::event_loop::runner::EventLoopRunner<enum2$<eframe::native::run::UserEvent> >::move_state_to<enum2$<eframe::native::run::UserEvent> >
             at C:\Users\Vasili\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.28.3\src\platform_impl\windows\event_loop\runner.rs:358
  23: winit::platform_impl::platform::event_loop::runner::EventLoopRunner<enum2$<eframe::native::run::UserEvent> >::redraw_events_cleared<enum2$<eframe::native::run::UserEvent> >
             at C:\Users\Vasili\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.28.3\src\platform_impl\windows\event_loop\runner.rs:234
  24: winit::platform_impl::platform::event_loop::thread_event_target_callback::closure$0<enum2$<eframe::native::run::UserEvent> >
             at C:\Users\Vasili\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.28.3\src\platform_impl\windows\event_loop.rs:2371
  25: core::ops::function::FnOnce::call_once<winit::platform_impl::platform::event_loop::thread_event_target_callback::closure_env$0<enum2$<eframe::native::run::UserEvent> >,tuple$<> >
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc\library\core\src\ops\function.rs:250
  26: core::panic::unwind_safe::impl$23::call_once<isize,winit::platform_impl::platform::event_loop::thread_event_target_callback::closure_env$0<enum2$<eframe::native::run::UserEvent> > >
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc\library\core\src\panic\unwind_safe.rs:271
  27: std::panicking::try::do_call<core::panic::unwind_safe::AssertUnwindSafe<winit::platform_impl::platform::event_loop::thread_event_target_callback::closure_env$0<enum2$<eframe::native::run::UserEvent> > >,isize>
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc\library\std\src\panicking.rs:487
  28: glutin::api::wgl::surface::impl$2::resize<glutin::surface::WindowSurface>
  29: std::panicking::try<isize,core::panic::unwind_safe::AssertUnwindSafe<winit::platform_impl::platform::event_loop::thread_event_target_callback::closure_env$0<enum2$<eframe::native::run::UserEvent> > > >
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc\library\std\src\panicking.rs:451
  30: std::panic::catch_unwind<core::panic::unwind_safe::AssertUnwindSafe<winit::platform_impl::platform::event_loop::thread_event_target_callback::closure_env$0<enum2$<eframe::native::run::UserEvent> > >,isize>
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc\library\std\src\panic.rs:140
  31: winit::platform_impl::platform::event_loop::runner::EventLoopRunner<enum2$<eframe::native::run::UserEvent> >::catch_unwind<enum2$<eframe::native::run::UserEvent>,isize,winit::platform_impl::platform::event_loop::thread_event_target_callback::closure_env$0
             at C:\Users\Vasili\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.28.3\src\platform_impl\windows\event_loop\runner.rs:157
  32: winit::platform_impl::platform::event_loop::thread_event_target_callback<enum2$<eframe::native::run::UserEvent> >
             at C:\Users\Vasili\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.28.3\src\platform_impl\windows\event_loop.rs:2547
  33: CallWindowProcW
  34: DispatchMessageW
  35: SendMessageTimeoutW
  36: KiUserCallbackDispatcher
  37: NtUserDispatchMessage
  38: DispatchMessageW
  39: winit::platform_impl::platform::event_loop::EventLoop<enum2$<eframe::native::run::UserEvent> >::run_return<enum2$<eframe::native::run::UserEvent>,eframe::native::run::run_and_return::closure_env$0<eframe::native::run::glow_integration::GlowWinitApp> >
             at C:\Users\Vasili\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.28.3\src\platform_impl\windows\event_loop.rs:282
  40: winit::platform::run_return::impl$0::run_return<enum2$<eframe::native::run::UserEvent>,eframe::native::run::run_and_return::closure_env$0<eframe::native::run::glow_integration::GlowWinitApp> >
             at C:\Users\Vasili\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.28.3\src\platform\run_return.rs:51
  41: eframe::native::run::run_and_return<eframe::native::run::glow_integration::GlowWinitApp>
             at C:\Users\Vasili\.cargo\registry\src\github.com-1ecc6299db9ec823\eframe-0.21.3\src\native\run.rs:124
  42: eframe::native::run::glow_integration::run_glow::closure$0
             at C:\Users\Vasili\.cargo\registry\src\github.com-1ecc6299db9ec823\eframe-0.21.3\src\native\run.rs:994
  43: eframe::native::run::with_event_loop::closure$0<enum2$<core::result::Result<tuple$<>,enum2$<eframe::Error> > >,eframe::native::run::glow_integration::run_glow::closure_env$0>
             at C:\Users\Vasili\.cargo\registry\src\github.com-1ecc6299db9ec823\eframe-0.21.3\src\native\run.rs:108
  44: std::thread::local::LocalKey<core::cell::RefCell<enum2$<core::option::Option<winit::event_loop::EventLoop<enum2$<eframe::native::run::UserEvent> > > > > >::try_with<core::cell::RefCell<enum2$<core::option::Option<winit::event_loop::EventLoop<enum2$<eframe
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc\library\std\src\thread\local.rs:446
  45: std::thread::local::LocalKey<core::cell::RefCell<enum2$<core::option::Option<winit::event_loop::EventLoop<enum2$<eframe::native::run::UserEvent> > > > > >::with<core::cell::RefCell<enum2$<core::option::Option<winit::event_loop::EventLoop<enum2$<eframe::na
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc\library\std\src\thread\local.rs:422
  46: eframe::native::run::with_event_loop<enum2$<core::result::Result<tuple$<>,enum2$<eframe::Error> > >,eframe::native::run::glow_integration::run_glow::closure_env$0>
             at C:\Users\Vasili\.cargo\registry\src\github.com-1ecc6299db9ec823\eframe-0.21.3\src\native\run.rs:101
  47: eframe::native::run::glow_integration::run_glow
             at C:\Users\Vasili\.cargo\registry\src\github.com-1ecc6299db9ec823\eframe-0.21.3\src\native\run.rs:991
  48: eframe::run_native
             at C:\Users\Vasili\.cargo\registry\src\github.com-1ecc6299db9ec823\eframe-0.21.3\src\lib.rs:201
  49: pineflash::main
             at .\src\main.rs:359
  50: core::ops::function::FnOnce::call_once<void (*)(),tuple$<> >
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc\library\core\src\ops\function.rs:250
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Exception thrown at 0x00007FF9F86BCB69 in pineflash.exe: Microsoft C++ exception:  ?? ::st_panic at memory location 0x000000C9966F6C00.
Exception thrown at 0x00007FF9F86BCB69 in pineflash.exe: Microsoft C++ exception:  ?? ::st_panic at memory location 0x000000C9966FC460.
Unloaded 'C:\Windows\System32\FWPUCLNT.DLL'.
The program '[14720] pineflash.exe' has exited with code 101 (0x65).
vsviridov commented 1 year ago

I've put additional check for is_some and it doesn't crash at this spot. I guess it was trying to get a serial number from some other plugged in USB device...

Spagett1 commented 1 year ago

Ah, thanks for the help here, its probably that or windows returns slightly different output than Linux which is what i mainly use for development.

I'll have this fixed by the next release.

vsviridov commented 1 year ago

Thanks. Sadly the latest firmware does not seem to work on my version of the Pinecil :(

Spagett1 commented 1 year ago

That's unfortunate, i think they are aware of that bug over at ironos and are working on a fix

ForsakenHarmony commented 1 year ago

Also getting a very similar crash on macos

Backtrace

```rs thread 'main' panicked at 'internal error: entered unreachable code', /Users/hrmny/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poll-promise-0.2.0/src/promise.rs:332:49 stack backtrace: 0: rust_begin_unwind at /rustc/cba14074bb4cc12bfe918eabd0d52a3999b2a461/library/std/src/panicking.rs:578:5 1: core::panicking::panic_fmt at /rustc/cba14074bb4cc12bfe918eabd0d52a3999b2a461/library/core/src/panicking.rs:67:14 2: core::panicking::panic at /rustc/cba14074bb4cc12bfe918eabd0d52a3999b2a461/library/core/src/panicking.rs:117:5 3: poll_promise::promise::Promise::ready 4: ::update 5: eframe::native::epi_integration::EpiIntegration::update 6: ::paint 7: eframe::native::run::run_and_return::{{closure}} 8: as winit::platform_impl::platform::app_state::EventHandler>::handle_nonuser_event 9: winit::platform_impl::platform::app_state::Handler::handle_nonuser_event 10: winit::platform_impl::platform::app_state::AppState::cleared 11: winit::platform_impl::platform::observer::control_flow_end_handler 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: winit::platform_impl::platform::event_loop::EventLoop::run_return 23: eframe::native::run::with_event_loop 24: eframe::native::run::glow_integration::run_glow 25: eframe::run_native 26: pineflash::main ```

Spagett1 commented 1 year ago

Interesting, thanks for the backtrace, is it possible that your firewall is blocking pineflash?

Spagett1 commented 1 year ago

This should be fixed in the latest release