briar issueshttps://code.briarproject.org/groups/briar/-/issues2023-08-28T16:00:09Zhttps://code.briarproject.org/briar/briar-mailbox/-/issues/147Research accessibility testing2023-08-28T16:00:09ZakwizgranResearch accessibility testingFind out what would be involved in testing the Mailbox app for accessibility, and what resources are available to help with this testing.Find out what would be involved in testing the Mailbox app for accessibility, and what resources are available to help with this testing.https://code.briarproject.org/briar/briar-mailbox/-/issues/119Allow navigating back to onboarding activity2023-08-28T16:00:09ZIvanaAllow navigating back to onboarding activityA question arose during the testing of the implementation of #32
The context: When a user installs the app, the first screen they see gives them two options: either skip intro, or walk through intro.
If the user skips intro, then the...A question arose during the testing of the implementation of #32
The context: When a user installs the app, the first screen they see gives them two options: either skip intro, or walk through intro.
If the user skips intro, then they see the do-not-kill-me fragment, which asks them to "Allow connections"... ithout tapping on that button they cannot continue, as the "Continue button" is disabled.
If the user does skip the intro, this is the next screen they see. If the user tries to navigate back, they are kicked out of the app. This may be OK, as the only previous screen is the 'home' screen? Or should the user be able to navigate back to it?
If the user does not skip the intro, they can navigate back and forth between the 4 intro screens, which is OK. However, after the 4th intro screen, the 'do not kill me' fragment is shown to them, and from there they cannot navigate back. A user may want to navigate back if they accidentally pressed the Continue button on the previous screen before thye properly read the contents? But if the user tries to navigate back to the previous screen, they are kicked out of the app.
To be considered: is the navigation back from the 'do not kill me' to the previous screen something that we would want to see implemented? Or not?
In any case, this is a Low priority now, because it is not necessary for the first version of the product. If the decision is made to address this and implement it, then it is a nice to have for the first version - ie only to be implemented if we have lots of time to spare. At the moment **NOT SPONSOR6**
If the decision is made to not implement it even in future releases, then this ticket can be closed.https://code.briarproject.org/briar/briar-mailbox/-/issues/188Use periodic alarm to check whether Mailbox is running2023-08-28T16:00:09ZakwizgranUse periodic alarm to check whether Mailbox is runningSchedule a periodic alarm to check whether the Mailbox is running. If it's not running and was not manually stopped, start it automatically just like we would after the device restarts. This may help us to work around issues with power m...Schedule a periodic alarm to check whether the Mailbox is running. If it's not running and was not manually stopped, start it automatically just like we would after the device restarts. This may help us to work around issues with power managers that kill long-running apps.https://code.briarproject.org/briar/briar-desktop/-/issues/75Use relative time spans instead of absolute ones2023-08-25T13:33:36ZNicoUse relative time spans instead of absolute oneshttps://code.briarproject.org/briar/briar-desktop/-/merge_requests/23 introduced proper absolute timestamps, this issue is about doing something like "5 min ago".
For Android there's [`DateUtils.html.getRelativeTimeSpanString(long)`](ht...https://code.briarproject.org/briar/briar-desktop/-/merge_requests/23 introduced proper absolute timestamps, this issue is about doing something like "5 min ago".
For Android there's [`DateUtils.html.getRelativeTimeSpanString(long)`](https://developer.android.com/reference/android/text/format/DateUtils.html#getRelativeTimeSpanString%28long%29).Desktop 0.7.0https://code.briarproject.org/briar/briar-desktop/-/issues/305Set windows' minimum size depending on Dp2023-08-25T13:33:36ZMikolai GütschowSet windows' minimum size depending on DpThe following discussion from !144 should be addressed:
- [ ] @sebkur started a [discussion](https://code.briarproject.org/briar/briar-desktop/-/merge_requests/144#note_62513): (+4 comments)
> I think it probably makes sense to ad...The following discussion from !144 should be addressed:
- [ ] @sebkur started a [discussion](https://code.briarproject.org/briar/briar-desktop/-/merge_requests/144#note_62513): (+4 comments)
> I think it probably makes sense to add a minimum size to the dialog's underlying window, too. Like we do in `BriarUi#start()`, i.e. we could add
> ```
> window.minimumSize = Dimension(450, 500)
> ```
> or even use the initial sizes used above (although the probably need to be converted to pixels somehow
quoting @paul-lorenc :
> From https://github.com/JetBrains/compose-jb/issues/1773, it looks like we can use the following line:
>
> `val density = LocalDensity.current`
>
> To get the current screen density, then calculate the dp to pixel conversion using this density (maybe?). For now I think `window.minimumSize = Dimension(x, y)` is good enough here, and we can further investigate this method to use here, and also for defining the minimum size of the main UI window.Desktop 0.7.0SebastianSebastianhttps://code.briarproject.org/briar/briar-desktop/-/issues/200Test data: read flag doesn't work2023-08-25T13:33:36ZSebastianTest data: read flag doesn't workMessages marked as read per `ConversationsData.kt` are not actually marked as read in the app.
I have tried modifying `DeterministicTestDataCreatorImpl`'s `createPrivateMessage()` like this:
```kotlin
db.transaction<Runt...Messages marked as read per `ConversationsData.kt` are not actually marked as read in the app.
I have tried modifying `DeterministicTestDataCreatorImpl`'s `createPrivateMessage()` like this:
```kotlin
db.transaction<RuntimeException>(false) { txn ->
db.receiveMessage(txn, contactId, m.message)
conversationManager.setReadFlag(txn, groupId, m.message.id, read)
}
```
where `conversationManager.setReadFlag(txn, groupId, m.message.id, read)` is added, however:
```
org.briarproject.bramble.api.db.DbException: null
at org.briarproject.briar.client.MessageTrackerImpl.setReadFlag(MessageTrackerImpl.java:159)
at org.briarproject.briar.conversation.ConversationManagerImpl.setReadFlag(ConversationManagerImpl.java:135)
at org.briarproject.briar.desktop.testdata.DeterministicTestDataCreatorImpl.createPrivateMessage$lambda-7(DeterministicTestDataCreatorImpl.kt:365)
at org.briarproject.bramble.db.DatabaseComponentImpl.transaction(DatabaseComponentImpl.java:200)
at org.briarproject.briar.desktop.testdata.DeterministicTestDataCreatorImpl.createPrivateMessage(DeterministicTestDataCreatorImpl.kt:363)
at org.briarproject.briar.desktop.testdata.DeterministicTestDataCreatorImpl.createPrivateMessage(DeterministicTestDataCreatorImpl.kt:330)
at org.briarproject.briar.desktop.testdata.DeterministicTestDataCreatorImpl.createPrivateMessages(DeterministicTestDataCreatorImpl.kt:312)
at org.briarproject.briar.desktop.testdata.DeterministicTestDataCreatorImpl.createTestDataOnIoExecutor(DeterministicTestDataCreatorImpl.kt:116)
at org.briarproject.briar.desktop.testdata.DeterministicTestDataCreatorImpl.createTestData$lambda-0(DeterministicTestDataCreatorImpl.kt:93)
```Desktop 0.7.0https://code.briarproject.org/briar/briar-desktop/-/issues/206Check if TaskScheduler tasks behave properly across suspend/hibernate.2023-08-25T13:33:36ZSebastianCheck if TaskScheduler tasks behave properly across suspend/hibernate.Desktop 0.7.0https://code.briarproject.org/briar/briar-desktop/-/issues/180Implement BriarAlertDialog with consistent styling and simple API2023-08-25T13:33:35ZMikolai GütschowImplement BriarAlertDialog with consistent styling and simple APIsee https://code.briarproject.org/briar/briar-desktop/-/merge_requests/70#note_58764see https://code.briarproject.org/briar/briar-desktop/-/merge_requests/70#note_58764Desktop 0.7.0https://code.briarproject.org/briar/briar-desktop/-/issues/458Research on and decide for across-screen navigation libraries/pattern2023-08-25T13:33:35ZMikolai GütschowResearch on and decide for across-screen navigation libraries/patternE.g. needed for #453. Quoting @grote from there:
> I only know that there's hundreds of competing navigation libraries for compose, not sure we want add our own implementation to the mix. Many of those probably only work on Android.E.g. needed for #453. Quoting @grote from there:
> I only know that there's hundreds of competing navigation libraries for compose, not sure we want add our own implementation to the mix. Many of those probably only work on Android.Desktop 0.7.0https://code.briarproject.org/briar/briar-desktop/-/issues/311Disable copy ~~and paste~~ on password fields2023-08-25T13:33:35ZSebastianDisable copy ~~and paste~~ on password fieldsI think usually this is not possible.
I guess it helps prevent people copying the password from the first field to the second ;)I think usually this is not possible.
I guess it helps prevent people copying the password from the first field to the second ;)Desktop 0.7.0Altynbek NurtazaAltynbek Nurtazahttps://code.briarproject.org/briar/briar-desktop/-/issues/450Add explainer information for release on how to install downloaded MSI from t...2023-08-25T13:33:35ZSebastianAdd explainer information for release on how to install downloaded MSI from the internetDesktop 0.7.0SebastianSebastianhttps://code.briarproject.org/briar/briar-desktop/-/issues/360App fails to shut down when jar has been overwritten2023-08-25T13:33:35ZakwizgranApp fails to shut down when jar has been overwrittenSteps to reproduce:
* Build briar-desktop jars using different commits for the `briar` submodule (I used `release-1.4.7` (https://code.briarproject.org/briar/briar/-/commit/7536f16c6136ebd5700a0f0ad49441050cf60096) and `poll-own-hidden-s...Steps to reproduce:
* Build briar-desktop jars using different commits for the `briar` submodule (I used `release-1.4.7` (https://code.briarproject.org/briar/briar/-/commit/7536f16c6136ebd5700a0f0ad49441050cf60096) and `poll-own-hidden-service` (https://code.briarproject.org/briar/briar/-/commit/aeac73175910585abc490d06f55a725c6eef6fb8))
* Start briar-desktop using the first jar
* Sign in
* Overwrite the first jar with the second jar
* Close the briar-desktop window
Expected behaviour:
* The window closes and the process exits
* It's possible to relaunch briar-desktop and sign in
Actual behaviour:
* The window doesn't close on the first attempt
* On the second attempt, the window closes but the process remains running
* It's possible to relaunch briar-desktop, but attempting to sign in shows the "Sorry, Briar was unable to open the database" error screen (due to the database still being locked by the original process)
* After killing the original process manually it's possible to relaunch briar-desktop and sign in
On the first attempt to close the window results in various NoClassDefFoundErrors when the JVM fails to load classes that are used during shutdown. I guess the exact exceptions may depend on which branches are used to reproduce the bug, but I got an exception for `PluginManagerImpl$PluginStopper`, for example. These exceptions seem to prevent `LifecycleManager#stopServices()` from shutting down the core.
```
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/briarproject/bramble/plugin/PluginManagerImpl$PluginStopper
at org.briarproject.bramble.plugin.PluginManagerImpl.stopService(PluginManagerImpl.java:157)
at org.briarproject.bramble.lifecycle.LifecycleManagerImpl.stopServices(LifecycleManagerImpl.java:198)
at org.briarproject.briar.desktop.ui.BriarUiImpl.stop(BriarUi.kt:109)
at org.briarproject.briar.desktop.Main$run$8$1.invoke(Main.kt:124)
at org.briarproject.briar.desktop.Main$run$8$1.invoke(Main.kt:123)
at androidx.compose.ui.window.Window_desktopKt$Window$3$1$1.windowClosing(Window.desktop.kt:166)
at java.desktop/java.awt.AWTEventMulticaster.windowClosing(AWTEventMulticaster.java:357)
at java.desktop/java.awt.Window.processWindowEvent(Window.java:2078)
at java.desktop/javax.swing.JFrame.processWindowEvent(JFrame.java:298)
at java.desktop/java.awt.Window.processEvent(Window.java:2037)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5011)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2772)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4843)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Caused by: java.lang.ClassNotFoundException: org.briarproject.bramble.plugin.PluginManagerImpl$PluginStopper
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 31 more
```
Incidentally, the stacktrace seems to show that `BriarUiImpl#stop()` is calling `LifecycleManager#stopServices()` on the UI thread, which it probably shouldn't.
The second attempt to close the window results in another NoClassDefFoundError that apparently kills the UI and thus closes the window, but still without killing the core.
```
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: kotlinx/coroutines/CoroutinesInternalError
at kotlinx.coroutines.DispatchedTask.handleFatalException(DispatchedTask.kt:144)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:115)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Caused by: java.lang.ClassNotFoundException: kotlinx.coroutines.CoroutinesInternalError
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 15 more
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: kotlinx/coroutines/CoroutinesInternalError
at kotlinx.coroutines.DispatchedTask.handleFatalException(DispatchedTask.kt:144)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:115)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: kotlinx/coroutines/CoroutinesInternalError
at kotlinx.coroutines.DispatchedTask.handleFatalException(DispatchedTask.kt:144)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:115)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
```Desktop 0.7.0https://code.briarproject.org/briar/briar-desktop/-/issues/332Update Conversation Search to Material Spec2023-08-25T13:33:35ZpaulUpdate Conversation Search to Material SpecI found https://material.io/design/navigation/search.html#expandable-search which covers how we likely should handle the contact list search bar in a "material way". If this looks good to everyone, I can try and implement this change.I found https://material.io/design/navigation/search.html#expandable-search which covers how we likely should handle the contact list search bar in a "material way". If this looks good to everyone, I can try and implement this change.Desktop 0.7.0https://code.briarproject.org/briar/briar-desktop/-/issues/130Create test private groups with different creators2023-08-25T13:33:35ZNicoCreate test private groups with different creatorsIn !40 `LocalAuthor` is the creator of the private groups all the time, would be cool to have different creators.In !40 `LocalAuthor` is the creator of the private groups all the time, would be cool to have different creators.Desktop 0.7.0https://code.briarproject.org/briar/briar-desktop/-/issues/349FAB in chat window not shown if older message arrives out-of-order2023-08-25T13:33:35ZMikolai GütschowFAB in chat window not shown if older message arrives out-of-orderThis issue was encountered while testing for release 0.2.1 #346. We would need to have a way to reproduce this (e.g. by sending some message from a test contact after a given time in TestData).
Nevertheless, the message counter in the c...This issue was encountered while testing for release 0.2.1 #346. We would need to have a way to reproduce this (e.g. by sending some message from a test contact after a given time in TestData).
Nevertheless, the message counter in the contact list was updated (directly after?) receiving the out-of-order message and after changing to another chat and navigating back to the chat with the new message, the scrollview was automatically scrolled to the new message.Desktop 0.7.0https://code.briarproject.org/briar/briar-desktop/-/issues/528Unlinking mailbox doesn't remove the problem indicator2023-08-25T13:33:34ZMikolai GütschowUnlinking mailbox doesn't remove the problem indicatorAfter unlinking the mailbox, the sidebar is still showing the problem indicator.After unlinking the mailbox, the sidebar is still showing the problem indicator.Desktop 0.7.0Torsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar-desktop/-/issues/539Ability to remove blogs2023-08-25T13:33:34ZMikolai GütschowAbility to remove blogsI'm actually not fully sure what that means, but saw the option on Android.
It is worth to notice that it is not possible to remove one's own blog.I'm actually not fully sure what that means, but saw the option on Android.
It is worth to notice that it is not possible to remove one's own blog.Desktop 0.7.0https://code.briarproject.org/briar/briar-desktop/-/issues/306Center AddContactDialog in current MainWindow2023-08-25T13:33:34ZMikolai GütschowCenter AddContactDialog in current MainWindowFollow-up of https://code.briarproject.org/briar/briar-desktop/-/merge_requests/144#note_62432
Currently it is centered in the center of the screen, no matter where the Briar Main Window is shown.Follow-up of https://code.briarproject.org/briar/briar-desktop/-/merge_requests/144#note_62432
Currently it is centered in the center of the screen, no matter where the Briar Main Window is shown.Desktop 0.7.0https://code.briarproject.org/briar/briar-desktop/-/issues/478Windows 10: tor is put under quarantine2023-08-25T13:33:34ZSebastianWindows 10: tor is put under quarantineI installed the 0.4.0 release on both my Windows 11 and Windows 10 testing machines. It works fine under Windows 11, however on Windows 10 I seemed not to get any connection when trying to add contacts. Starting Briar.exe from the comman...I installed the 0.4.0 release on both my Windows 11 and Windows 10 testing machines. It works fine under Windows 11, however on Windows 10 I seemed not to get any connection when trying to add contacts. Starting Briar.exe from the command line, I can see an exception where the `PluginManagerImpl` is not able to run program `~\.briar\desktop\tor\tor`. It tells me it cannot run the executable because it may contain a virus. The file is actually gone afterwards as it has been put into quarantine. Looking into Windows Defender, I can see that the file has been put under quarantine because it has detected "Trojan:Win32/Sabsik.FL.B!ml".Desktop 0.7.0SebastianSebastianhttps://code.briarproject.org/briar/briar/-/issues/2443OOM error when polling large number of contacts2023-08-24T15:00:10ZakwizgranOOM error when polling large number of contacts* Android version: 13
* Phone model: Realme RMX3516 (RMX3516EEA)
* Briar version: 1.5.4 (7d76171)
Stacktrace:
```
java.lang.OutOfMemoryError: Failed to allocate a 48 byte allocation with 252528 free bytes and 246KB until OOM, target foo...* Android version: 13
* Phone model: Realme RMX3516 (RMX3516EEA)
* Briar version: 1.5.4 (7d76171)
Stacktrace:
```
java.lang.OutOfMemoryError: Failed to allocate a 48 byte allocation with 252528 free bytes and 246KB until OOM, target footprint 201326592, growth limit 201326592; giving up on allocation because <1% of heap free after GC.
at java.util.regex.Pattern.matcher(Pattern.java:1040)
at org.briarproject.bramble.plugin.tor.TorPlugin.createConnection(TorPlugin.java:361)
at org.briarproject.bramble.plugin.tor.TorPlugin.lambda$connect$2(TorPlugin.java:349)
at org.briarproject.bramble.plugin.tor.TorPlugin.$r8$lambda$dsAekyWijvXWn3loJi16FAklboE(Unknown Source:0)
at org.briarproject.bramble.plugin.tor.TorPlugin$$ExternalSyntheticLambda4.run(Unknown Source:6)
at org.briarproject.android.dontkillmelib.wakelock.AndroidWakeLockManagerImpl.lambda$executeWakefully$0(AndroidWakeLockManagerImpl.java:71)
at org.briarproject.android.dontkillmelib.wakelock.AndroidWakeLockManagerImpl.$r8$lambda$YrcWd5iwE_LXXUj-LlmRNhzP9-U(Unknown Source:0)
at org.briarproject.android.dontkillmelib.wakelock.AndroidWakeLockManagerImpl$$ExternalSyntheticLambda0.run(Unknown Source:4)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
at java.lang.Thread.run(Thread.java:1012)
```
* NativeHeapAllocated: 467,674,320
* NativeHeapFree: 57,465,872
* NativeHeapTotal: 539,607,040
* SystemMemoryFree: 1,281,261,568
* SystemMemoryLow: false
* SystemMemoryThreshold: 339,738,624
* SystemMemoryTotal: 3,834,589,184
* VirtualMachineMemoryFree: 4,663,224
* VirtualMachineMemoryMaximum: 201,326,592
* VirtualMachineMemoryTotal: 201,326,592
The log shows that the crash happened about 9 seconds after polling the Tor plugin. Connection attempts from the previous two polls were still in progress, as shown by the messages logged when those attempts timed out. The previous two polls appear to have happened in quick succession, as two failures for the same address were often logged back-to-back. (This can happen when the plugin's enabled, as the first poll happens immediately and the second is scheduled after a randomised interval.)
The log shows that the user has at least 54 contacts. I'd speculate that this may cause polling to take longer than the polling interval, causing pending connection attempts to pile up.
All of the connection failures except the last are logged as "java.io.IOException: Connection failed: Host unreachable". The last connection failure is logged as "java.net.SocketTimeoutException: failed to connect to /127.0.0.1 (port 59050) from /127.0.0.1 (port 57012) after 5000ms", indicating that the connection to Tor's SOCKS port on localhost timed out. Perhaps the Tor process had become unresponsive, or perhaps the Java process was spending too much time in GC to service the connection.
The memory stats show 539 MB of native heap, which is a lot! Maybe there's a large backlog of socket connections, each with some native heap allocations, and each with an IoExecutor thread waiting on it that might have its own native heap allocations?
`VirtualMemoryFree` doesn't match the amount in the OOM error message, which is an issue we've seen before (https://code.briarproject.org/briar/briar/-/issues/1898#note_76643).
It's useful to know that the allocator gives up if it can't free more than 1% of the max heap space after GC.