Splash Screen Occasionally Takes Far Longer to Clear #633

Closed
opened 2023-02-17 01:10:18 +00:00 by sarah · 3 comments
Owner

Based on my testing, every so often cwtch will launch and be stuck on the splash screen for far longer than normal - up to a minute.

My guess is there is some subtle asynchrony issue which every so often forces the splash screen to wait a long time for the clear message - perhaps an event bus flood?

This has little impact except annoyance and the occasional failed pipeline test (because splash screen dismissal times out at 10 seconds)

Based on my testing, every so often cwtch will launch and be stuck on the splash screen for far longer than normal - up to a minute. My guess is there is some subtle asynchrony issue which every so often forces the splash screen to wait a long time for the clear message - perhaps an event bus flood? This has little impact except annoyance and the occasional failed pipeline test (because splash screen dismissal times out at 10 seconds)
sarah added the
cwtch-beta-1.11
bug
labels 2023-02-17 01:10:30 +00:00
sarah added the
scheduled
label 2023-03-10 17:42:51 +00:00
sarah removed the
cwtch-beta-1.11
label 2023-03-27 19:16:11 +00:00

My experience is that cwtch does take a long time to get past the splash screen, but took 1m22s to display the purple screen at all - the splash screen gives way to the program itself after a total of 2m22s. Testing again gives values of 1m9s for a blank screen, and the graphic appears until a total of 2m12s have passed.
Running cwtch from the terminal returns...

my_application.cc: using aot_library_path or '/usr/lib/cwtch/libapp.so'

...and remains onscreen for 1m6s. After this, the following appears as the splash screen shows up.

flutter: Cwtch version: v1.11.0 built on: 2023-03-28-20-28
flutter: runApp()
flutter: initState: running...
flutter: initState: registering notification, shutdown handlers...
flutter: initState: creating cwtchnotifier, ffi
flutter: initState: invoking cwtch.Start()
flutter: initState: done!
flutter: StartCwtch( cwtchdir: /home/ktn/.cwtch, torPath: tor )
2023/04/08 18:35:23 cwtch-autobindings/lib.go [INFO] StartCwtch(...)
2023/04/08 18:35:23 cwtch-autobindings/lib.go [INFO] application: <nil> eventHandler: <nil>
2023/04/08 18:35:23 cwtch-autobindings/lib.go [INFO] Creating new EventHandler()
2023/04/08 18:35:23 cwtch-autobindings/lib.go [INFO] Loading Cwtch Directory /home/ktn/.cwtch and tor path: tor
2023/04/08 18:35:23 settings/settings.go [INFO] initialized global settings file: &{/home/ktn/.cwtch ui.globals [ ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** *R*E*D*A*C*T*E*D* *** *** *** *** ***]} 

32 two-to-three digit numbers separated by spaces appear in these brackets. I can provide these, but have redacted them here because I don't know what they are. These same numbers appear on the following redacted line, also in the brackets.

2023/04/08 18:35:23 cwtch-autobindings/lib.go [INFO] making directory /home/ktn/.cwtch
2023/04/08 18:35:23 settings/settings.go [INFO] initialized global settings file: &{/home/ktn/.cwtch ui.globals [** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** *R*E*D*A*C*T*E*D* *** *** *** *** ***]}
2023/04/08 18:35:23 cwtch-autobindings/lib.go [INFO] making directory /home/ktn/.cwtch
2023/04/08 18:35:23 tor/torProvider.go [INFO] tor version: 0.4.7.13
2023/04/08 18:35:24 cwtch-autobindings/lib.go [INFO] libcwtch-go application launched 

After a total of 2m12s, the the terminal does not update, but the splash gives way to the program and this output remains. Pls let me know if any more info would be useful. :3 I'm using herbstluftwm as my wm.

My experience is that cwtch does take a long time to get past the splash screen, but took 1m22s to display the purple screen at all - the splash screen gives way to the program itself after a total of 2m22s. Testing again gives values of 1m9s for a blank screen, and the graphic appears until a total of 2m12s have passed. Running cwtch from the terminal returns... ``` my_application.cc: using aot_library_path or '/usr/lib/cwtch/libapp.so' ``` ...and remains onscreen for 1m6s. After this, the following appears as the splash screen shows up. ``` flutter: Cwtch version: v1.11.0 built on: 2023-03-28-20-28 flutter: runApp() flutter: initState: running... flutter: initState: registering notification, shutdown handlers... flutter: initState: creating cwtchnotifier, ffi flutter: initState: invoking cwtch.Start() flutter: initState: done! flutter: StartCwtch( cwtchdir: /home/ktn/.cwtch, torPath: tor ) 2023/04/08 18:35:23 cwtch-autobindings/lib.go [INFO] StartCwtch(...) 2023/04/08 18:35:23 cwtch-autobindings/lib.go [INFO] application: <nil> eventHandler: <nil> 2023/04/08 18:35:23 cwtch-autobindings/lib.go [INFO] Creating new EventHandler() 2023/04/08 18:35:23 cwtch-autobindings/lib.go [INFO] Loading Cwtch Directory /home/ktn/.cwtch and tor path: tor 2023/04/08 18:35:23 settings/settings.go [INFO] initialized global settings file: &{/home/ktn/.cwtch ui.globals [ ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** *R*E*D*A*C*T*E*D* *** *** *** *** ***]} ``` > 32 two-to-three digit numbers separated by spaces appear in these brackets. I can provide these, but have redacted them here because I don't know what they are. These same numbers appear on the following redacted line, also in the brackets. ``` 2023/04/08 18:35:23 cwtch-autobindings/lib.go [INFO] making directory /home/ktn/.cwtch 2023/04/08 18:35:23 settings/settings.go [INFO] initialized global settings file: &{/home/ktn/.cwtch ui.globals [** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** *R*E*D*A*C*T*E*D* *** *** *** *** ***]} 2023/04/08 18:35:23 cwtch-autobindings/lib.go [INFO] making directory /home/ktn/.cwtch 2023/04/08 18:35:23 tor/torProvider.go [INFO] tor version: 0.4.7.13 2023/04/08 18:35:24 cwtch-autobindings/lib.go [INFO] libcwtch-go application launched ``` After a total of 2m12s, the the terminal does not update, but the splash gives way to the program and this output remains. Pls let me know if any more info would be useful. :3 I'm using herbstluftwm as my wm.
Author
Owner

Update on this based on yesterdays research:

This is caused by Cwtch being unable to connect to a Tor process. It can happen for a few reasons:

  1. Another process is using the same Tor data-dir (this causes a ~5 second delay)
  2. Cwtch is configured to use a specific tor process control port, and that port is unavailable/clashing with another process (this delay can be anywhere from 30 seconds to 5 minutes depending on the specific OS configured socket timeouts)

The solution to this is a change to autobindings to rework the setup so that the splash screen logic no longer depends on connecting to Tor. This used to be a big problem, but after recent changes to how protocol engines are created and initialized should be pretty easy to fix.

Any Tor errors will then only be surfaced on the Tor config page.

This should get in 1.12

Update on this based on yesterdays research: This is caused by Cwtch being unable to connect to a Tor process. It can happen for a few reasons: 1. Another process is using the same Tor data-dir (this causes a ~5 second delay) 2. Cwtch is configured to use a specific tor process control port, and that port is unavailable/clashing with another process (this delay can be anywhere from 30 seconds to 5 minutes depending on the specific OS configured socket timeouts) The solution to this is a change to autobindings to rework the setup so that the splash screen logic no longer depends on connecting to Tor. This used to be a big problem, but after recent changes to how protocol engines are created and initialized should be pretty easy to fix. Any Tor errors will then only be surfaced on the Tor config page. This should get in 1.12
sarah added the
cwtch-beta-1.12
in-nightly
labels 2023-06-15 22:55:22 +00:00
Author
Owner
Fixed by https://git.openprivacy.ca/cwtch.im/autobindings/pulls/29
sarah closed this issue 2023-06-15 22:59:13 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cwtch.im/cwtch-ui#633
No description provided.