#Managing Windows panics consistently

31 messages · Page 1 of 1 (latest)

velvet sun
#

I need close a window and open a new one programmatically.
Closing A and opening B works fine. Closing B and opening A causes some generic panic.
I've used tauri::async_runtime::spawn and ::spawn_blocking and std::thread::spawnand all panic in the same manner.

Both actions are called inside a listen_global callback. They are perfect inverse of each other and check for existence before trying to operate. Anything off top of your head could be a cause for a panic?

#

The inline docs insinuates that I would not need to spawn a thread in my circumstances, but I could not create circumstances where you don't have to do that

fallow pivot
#
  1. which OS? Windows?
  2. is there no message at all? Just silently exiting?

The inline docs insinuates that I would not need to spawn a thread in my circumstances, but I could not create circumstances where you don't have to do that
iirc event listeners (can?) run on the main thread. not sure

#

and 4) This does sound familiar but i can't seem to find the discussion/issue it reminds me of

velvet sun
# fallow pivot 1) which OS? Windows? 2) is there _no_ message at all? Just silently exiting? 3)...
  1. all of them
  2. unless I swallow it accidentally, yes. I just get a "thread panic!" and life goes on
  3. so where can I actually invoke that api without spawning a thread?
  4. I've asked something similar before and did not get an answer, there was another guy asking something similar in the past, but the question was about handling multiple windows in general, my question is about multiple windows "at the same time"
fallow pivot
#
  1. async tauri commands
#

which is essentially a spawned task, so nothing different from what you tried already

#

another question, i assume you didn't upgrade to v2 over night and are still using v1 right? (trying to repro it on my end now)

velvet sun
#

I've tried to do a command and conquer approach, so that things maybe happen in different tasks

#

but it did not really change much except things run out of order now 👹

fallow pivot
#

hmm, would you happen to have a code example?

#

i can't get it to panic on my end

velvet sun
velvet sun
#

It's a segmentation fault

#

Ok I think I know what the issue is

#

A window cannot faciliate the closing of itself

#

me as main, I am not allowed to ever close main

velvet sun
#

Ok no, it's not that. Something is now allowing me to close down the main menu

velvet sun
#

@fallow pivot I got it. I know whats breaking my fucking app. Oh my god.
adding .register_uri_scheme_protocol breaks the whole thing

#

no fucking clue why

velvet sun
#

Ok so it's not just registering it, it's only when it's interacting

#

doesn't matter what the registering does, just that it is registered and something has reached for it ever

#

This bug has cost me a total of 56 hours since I started tracking it, thats roughly 22.5k$ in lost man-hours. I can't say I'm happy

#

Worst of all, I still have no idea why the bug happens. Just that it does in these arcane conditions

fallow pivot
#

sorry for the delay, could you open a github issue about this? Just something really short with a link to this thread 🙏

velvet sun
#

Continuing @pure prisms pondering, can confirm this is also happening on a windows machine, this time I did get something in the cmd
[ERROR:window_impl.cc(121)] Failed to unregister class Chrome_WidgetWin_0. Error = 0

pure prism
#

Oh no 🙃