simplex-chat / simplex-chat

SimpleX - the first messaging network operating without user identifiers of any kind - 100% private by design! iOS, Android and desktop apps 📱!
https://simplex.chat
GNU Affero General Public License v3.0
7.21k stars 327 forks source link

[Bug]: Desktop app crash/ infinite loop crash when trying to video call #4555

Open cstm-dev opened 3 months ago

cstm-dev commented 3 months ago

Is there an existing issue for this?

Platform

Windows

OS version

Windows 11

App version

6.0.0-beta.2

Current Behavior

Sometimes, when I try to video call someone the app crashes completely or ends up in an opening/ closing infinite loop so I have to force close the application and restart it.

Expected Behavior

I start a video call, the browser opens and the call connects.

Steps To Reproduce

Open the application, enter passcode, enter database password, click on a contact, start a video call.

Relevant log output

java.net.BindException: Address already in use: bind
    at java.base/sun.nio.ch.Net.bind0(Native Method)
    at java.base/sun.nio.ch.Net.bind(Unknown Source)
    at java.base/sun.nio.ch.Net.bind(Unknown Source)
    at java.base/sun.nio.ch.NioSocketImpl.bind(Unknown Source)
    at java.base/java.net.ServerSocket.bind(Unknown Source)
    at java.base/java.net.ServerSocket.bind(Unknown Source)
    at org.nanohttpd.protocols.http.ServerRunnable.run(ServerRunnable.java:63)
    at java.base/java.lang.Thread.run(Unknown Source)
cstm-dev commented 3 months ago

The above error also occurs in the stable version 5.8.2

cstm-dev commented 3 months ago

Another crash when getting called

View crashed

java.io.FileNotFoundException: C:\Users\-\AppData\Local\Temp\simplex\a661aaf5-4f62-4ad2-9be2-33689a8f7abf (The system cannot find the path specified) at java.base/java.io.FileOutputStream.open0(Native Method) at java.base/java.io.FileOutputStream.open(Unknown Source) at java.base/java.io.FileOutputStream.<init>(Unknown Source) at java.base/java.io.FileOutputStream.<init>(Unknown Source) at chat.simplex.common.platform.SoundPlayer.start(RecAndPlay.desktop.kt:216) at chat.simplex.common.views.call.IncomingCallAlertViewKt$IncomingCallAlertView$1.invokeSuspend(IncomingCallAlertView.kt:31) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104) at androidx.compose.ui.platform.FlushCoroutineDispatcher$flush$1.invoke(FlushCoroutineDispatcher.skiko.kt:90) at androidx.compose.ui.platform.FlushCoroutineDispatcher$flush$1.invoke(FlushCoroutineDispatcher.skiko.kt:78) at androidx.compose.ui.platform.FlushCoroutineDispatcher.performRun(FlushCoroutineDispatcher.skiko.kt:99) at androidx.compose.ui.platform.FlushCoroutineDispatcher.flush(FlushCoroutineDispatcher.skiko.kt:78) at androidx.compose.ui.scene.ComposeSceneRecomposer.performScheduledEffects(ComposeSceneRecomposer.skiko.kt:88) at androidx.compose.ui.scene.BaseComposeScene.render(BaseComposeScene.skiko.kt:165) at androidx.compose.ui.scene.ComposeSceneMediator$DesktopSkikoView.onRender(ComposeSceneMediator.desktop.kt:523) at org.jetbrains.skiko.SkiaLayer.update$skiko(SkiaLayer.awt.kt:548) at org.jetbrains.skiko.redrawer.AWTRedrawer.update(AWTRedrawer.kt:54) at org.jetbrains.skiko.redrawer.Direct3DRedrawer.redrawImmediately(Direct3DRedrawer.kt:74) at org.jetbrains.skiko.SkiaLayer.paint(SkiaLayer.awt.kt:388) at androidx.compose.ui.scene.skia.WindowSkiaLayerComponent$contentComponent$1.paint(WindowSkiaLayerComponent.desktop.kt:51) at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source) at java.desktop/javax.swing.JComponent.paint(Unknown Source) at java.desktop/javax.swing.JLayeredPane.paint(Unknown Source) at java.desktop/javax.swing.JComponent.paintChildren(Unknown Source) at java.desktop/javax.swing.JComponent.paint(Unknown Source) at androidx.compose.ui.window.Window_desktopKt$Window$12$1.invoke(Window.desktop.kt:434) at androidx.compose.ui.window.Window_desktopKt$Window$12$1.invoke(Window.desktop.kt:419) at androidx.compose.ui.window.AwtWindow_desktopKt$AwtWindow$3.invoke(AwtWindow.desktop.kt:78) at androidx.compose.ui.window.AwtWindow_desktopKt$AwtWindow$3.invoke(AwtWindow.desktop.kt:76) at androidx.compose.ui.util.UpdateEffect_desktopKt$UpdateEffect$2$performUpdate$1.invoke(UpdateEffect.desktop.kt:59) at androidx.compose.ui.util.UpdateEffect_desktopKt$UpdateEffect$2$performUpdate$1.invoke(UpdateEffect.desktop.kt:55) at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:2304) at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.observe(SnapshotStateObserver.kt:504) at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:260) at androidx.compose.ui.util.UpdateEffect_desktopKt$UpdateEffect$2.invoke$performUpdate(UpdateEffect.desktop.kt:55) at androidx.compose.ui.util.UpdateEffect_desktopKt$UpdateEffect$2.invoke(UpdateEffect.desktop.kt:64) at androidx.compose.ui.util.UpdateEffect_desktopKt$UpdateEffect$2.invoke(UpdateEffect.desktop.kt:47) at androidx.compose.runtime.DisposableEffectImpl.onRemembered(Effects.kt:82) at androidx.compose.runtime.CompositionImpl$RememberEventDispatcher.dispatchRememberObservers(Composition.kt:1295) at androidx.compose.runtime.CompositionImpl.applyChangesInLocked(Composition.kt:984) at androidx.compose.runtime.CompositionImpl.applyChanges(Composition.kt:1005) at androidx.compose.runtime.Recomposer.composeInitial$runtime(Recomposer.kt:1099) at androidx.compose.runtime.CompositionImpl.composeInitial(Composition.kt:633) at androidx.compose.runtime.CompositionImpl.setContent(Composition.kt:619) at androidx.compose.ui.window.Application_desktopKt$awaitApplication$2$1$2.invokeSuspend(Application.desktop.kt:219) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104) at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.desktop/java.awt.EventQueue$4.run(Unknown Source) at java.desktop/java.awt.EventQueue$4.run(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)