text:
NPM build script file glob / wildcard needs double-quote wrapper in command line

See the build tasks / scripts cson2json, clean, lint, pretest:travis in:
https://github.com/readium/readium-js-viewer/tree/develop/package

Fixed here:
https://github.com/readium/readium-js-viewer/commit/87bb4ab9330daa9896b6cdd16c8814065dc7a466

Further checks across multiple platforms confirmed that only the jshint and concat scripts (which are using the Glob NodeJS module under the hood with explicit parameter arg[0]) are sensitive to the wildcard quoting on the command line. Thus the following checkins:
https://github.com/readium/readium-js-viewer/commit/aff3a34a9574f4a3c4f98b701ccb515bd20ae162
https://github.com/readium/readium-js/commit/a37f75f47dd7702a9dd80d33975a6950ecafb20b
https://github.com/readium/readium-shared-js/commit/c42a4b4e41151a87a40ab6fff2dcbade049e3ffa
https://github.com/readium/readium-cfi-js/commit/c15c305f9c3ed9760e5dc455631ac07850df312d

repo: readium/readium-js-viewer


text:
xmlerror.h No file found on ubuntu

Hello,
We have tried to build Android on linux but not able to build due to below error.
base.cpp --> include <xmlerror.h> no such file found.

I have solved this problem by installing zsh !

Better even: use the Gradle / AndroidStudio fearure branch which completely negates the need for MakeHeaders.sh, and enables hybrid Java / C++ debugging !

Heads-up: the old Eclipse model is deprecated (by Google), now replaced with Android Studio IDE +Gradle build system. The pull requests have been merged into the develop branch.

source: gharchive/issue

authors: danielweck dmpatel123 zhufx

repo: readium/readium-sdk

license_type: permissive

license_source: github-api


text:
Possibilité de changer le langage du bin par l'UI.

On pourrait ajouter la fonctionnalité de changer le langage du bin directement via une liste comme pour créer un bin, cela pourrait améliorer l'utilisation sur les mobiles, car quand on ouvre un bin sur téléphone celui si vas s'ouvrir dans le navigateur interne de Discord ce qui nous offre pas la possibilité de modifier l'url la seule façon à ce moment là c'est d'ouvrir, le bin dans le navigateur externe, et cela permettrais d'éviter que l'utilisateur met un langage non supporté par le serveur.

Je trouve qu'il n'y a aucun intérêt à ça, vu que déjà le créateur du bin a choisi le bon langage. Et puis même si jamais tu veux changer pour je ne sais quel raison, c'est pas si chiant que ça d'ouvrir dans le navigateur sur mobile.

Il s'avère que 90% des bins sont créé au format plaintext, donc 90% du temps il faut changer l'extension dans l'URL, je suis d'avis qu'on pourrait simplifier l'expérience utilisateur

90% ?

$ journalctl -u gunicorn@bin.service | grep -o 'New .*' | cut -d ' ' -f2 | sort | uniq -c | sort -nr
     90 txt
     87 text
     41 python
     19 php
      6 javascript
      6 java
      6 html
      6 c
      5 py
      4 plaintext
      4 js
      3 typescript
      2 css
      1 weight
      1 ts
      1 solidity
      1 lisp
      1 JavaScript

64.43% en comptant weight et solidity.
Mais du coup, finalement, pourquoi pas :+1:.

authors: Julien00859 Mesteery enimaloc

repo: readthedocs-fr/bin-server

license: MIT


text:
Search: arrow keys navigation is inconsistent and skips entries

The navigation by arrow keys is not what I would expect, I can't tell what the pattern to movement is actually:
Screencast from 2024-05-21 19-53-57.webm

I believe it's because we're not correctly creating unique IDs for the hits: https://github.com/readthedocs/addons/blob/eae31c8e37d5c62f297486260d6f3a80ec00f705/src/search.js#L263 which is used here: https://github.com/readthedocs/addons/blob/eae31c8e37d5c62f297486260d6f3a80ec00f705/src/search.js#L307
Should be an easy fix.

authors: agjohnson zanderle

repo: readthedocs/addons


text:
Typed enumerations for C++

When generating enumerations for C++, is it possible to generate typed enumerations?
I mean to generate:
enum Color : uint8_t
{
BLUE = 0,
GREEN = 1,
...
}
instead of
enum Color
{
BLUE = (std::uint8_t)0,
GREEN = (std::uint8_t)1,
...
}

Sure. Send a PR and I will look at it.

You mean PR=Pull Request?

Yes

@tmontgomery Does this project require C++11 or higher? Because that is needed for enum classes.
If we do require C++11 or higher we could remove the SBE_NOEXCEPT and SBE_CONSTEXPR macro and the lambda

Sure, that's why it's better to target some common platforms (Ubuntu LTS, Centos, SUSE, whatever is common non-EOL VS) and run CI against them. I'm pretty sure all of them have compilers with enum class support.
Using enum class could improve type safety in the C++ API. It would also be a API breakage.Something to consider for the future.
I will create a separate issue for this.

authors: manuka89 rigtorp tmontgomery

repo: real-logic/simple-binary-encoding

license_source: bigquery


text:
Improved internal offset/pointer usage in generated C# code (retry)

Retry of pull-request regarding issue #692.

Improved internal pointer usage in generated C# code regarding Groups by making it possible to call WrapForEncode and WrapForDecode more than once. This makes it possible to read a message twice which is especially useful for logging the entire message after errors or when unexpected content is found.
Enabled CSharp code generator in the sbe-tool.

Please ensure the build passes all tests before submitting.

I noticed the failing checks. I'll fix them and update the branch

Although this solves issue #693, it breaks reading groups with variable length data in them.
I cannot see an easy solution which solves both.
I'm closing this request.

source: gharchive/pull-request


text:
🛑 Meal Driver is down

In ab818f4, Meal Driver (https://mealdriver.net) was down:

HTTP code: 400
Response time: 67 ms

Resolved: Meal Driver is back up in 9fe2609 after 39 minutes.

repo: realewie/uptime


text:
Package causes import issues due to lack of "assets"

Like other packages, the "~Assets" folder should contain default deployable content with the package, OR remove the installer scripts with no content.
Currently, this is causing an error because there is no content to install and makes Unity fall into a content load loop, constantly trying to install something that is not there.

Was this resolved with the latest PR?

Sadly no @FejZa , Having actual profiles I believed would clear the import issue, however the issue remains with the following error reported in Unity on trying to import the assets with the Package Installer:

DirectoryNotFoundException: Could not find a part of the path 'D:\00-Development\RCT\RCTTest-02\Library\PackageCache\com.realitytoolkit.spatialpersistence.arfoundation@49b6160e8f\Editor\SpatialPersistence_ARFoundationPathFinder.cs\Assets~'.
System.IO.Enumeration.FileSystemEnumerator1[TResult].CreateDirectoryHandle (System.String path, System.Boolean ignoreNotFound) (at <834b2ded5dad441e8c7a4287897d63c7>:0)
System.IO.Enumeration.FileSystemEnumerator1[TResult]..ctor (System.String directory, System.IO.EnumerationOptions options) (at <834b2ded5dad441e8c7a4287897d63c7>:0)
System.IO.Enumeration.FileSystemEnumerable1+DelegateEnumerator[TResult]..ctor (System.IO.Enumeration.FileSystemEnumerable1[TResult] enumerable) (at <834b2ded5dad441e8c7a4287897d63c7>:0)
System.IO.Enumeration.FileSystemEnumerable1[TResult]..ctor (System.String directory, System.IO.Enumeration.FileSystemEnumerable1+FindTransform[TResult] transform, System.IO.EnumerationOptions options) (at <834b2ded5dad441e8c7a4287897d63c7>:0)
System.IO.Enumeration.FileSystemEnumerableFactory.UserFiles (System.String directory, System.String expression, System.IO.EnumerationOptions options) (at <834b2ded5dad441e8c7a4287897d63c7>:0)
System.IO.Directory.InternalEnumeratePaths (System.String path, System.String searchPattern, System.IO.SearchTarget searchTarget, System.IO.EnumerationOptions options) (at <834b2ded5dad441e8c7a4287897d63c7>:0)
System.IO.Directory.GetFiles (System.String path, System.String searchPattern, System.IO.EnumerationOptions enumerationOptions) (at <834b2ded5dad441e8c7a4287897d63c7>:0)
System.IO.Directory.GetFiles (System.String path, System.String searchPattern, System.IO.SearchOption searchOption) (at <834b2ded5dad441e8c7a4287897d63c7>:0)
RealityCollective.Editor.Utilities.UnityFileHelper.GetAllFilesAtPath (System.String assetsRootPath) (at ./Library/PackageCache/com.realitycollective.utilities@1.0.5-pre.3/Editor/Utilities/UnityFileHelper.cs:66)
RealityCollective.ServiceFramework.Editor.Packages.AssetsInstaller.TryInstallAssets (System.Collections.Generic.Dictionary`2[TKey,TValue] installationPaths, System.Boolean regenerateGuids, System.Boolean skipDialog, System.Boolean onlyUnityAssets) (at ./Library/PackageCache/com.realitycollective.service-framework@1.0.3-pre.6/Editor/Packages/AssetsInstaller.cs:116)
RealityCollective.ServiceFramework.Editor.Packages.AssetsInstaller.TryInstallAssets (System.String sourcePath, System.String destinationPath, System.Boolean regenerateGuids, System.Boolean skipDialog, System.Boolean onlyUnityAssets) (at ./Library/PackageCache/com.realitycollective.service-framework@1.0.3-pre.6/Editor/Packages/AssetsInstaller.cs:51)
RealityToolkit.SpatialPersistence.ARFoundation.Editor.SpatialPersistence_ARFoundationPackageInstaller.CheckPackage () (at
./Library/PackageCache/com.realitytoolkit.spatialpersistence.arfoundation@49b6160e8f/Editor/SpatialPersistence_ARFoundationPackageInstaller.cs:43)
UnityEditor.EditorApplication.Internal_CallDelayFunctions () (at <9920ff0c944845d7b9f9a61ef1478edc>:0)

Can you help?

authors: FejZa SimonDarksideJ


text:
Refactor config

Provide config-data via middlewares.

Merged to dev.

repo: realkarych/postamt


text:
Sync common files to relevant repos

Setup a GHA that syncs specific common files to a number of repos.
Sync will happen on each commit to main branch.

@fealebenpae re dedicated repo: I was considering, but just thought discovery wouldn't be high, and this is somewhat related to "common" automation for all repos. But if you feel strongly for it I don't mind a separate repo. But it's also just one folder...

My argument against placing this in ci-actions is that the entire repo gets cloned every time one if our workflows pulls in an action hosted here, so we should try and keep it as light as possible. We could move this in the ci repo instead, which already hosts a bunch of other automations, but seeing as how the files here are very lightweight right now we can just leave it be and reconsider if we ever need to add a bunch more synced files.

@nirinchev @fealebenpae I've added check-changelog and auto-assign workflows.

authors: bmunkholm fealebenpae

repo: realm/ci-actions


text:
Migration issue : 'RLMException', reason: 'Provided schema version 0 is less than last set version 1.'

I am trying add new column in my existing structure by following guide line : https://realm.io/docs/swift/latest/#migrations but app gets crashed as and when i am trying to get default realm object using RLMRealm.defaultRealm()
Migration code:
    func applicationDidFinishLaunching(aNotification: NSNotification) {
        let configuration:RLMRealmConfiguration = RLMRealmConfiguration.defaultConfiguration()
        configuration.schemaVersion = 1
        configuration.migrationBlock = {(migration:RLMMigration, oldSchemaVersion: UInt64) in
            if oldSchemaVersion < 1 {
                //Migration code
            }
        }

        RLMRealmConfiguration.setDefaultConfiguration(configuration)
        let realm = RLMRealm.defaultRealm() //Getting exception on this line
    }

Exception logs:
2015-10-20 00:44:03.162 RealmTest[60656:33271965] *** Terminating app due to uncaught exception 'RLMException', reason: 'Provided schema version 0 is less than last set version 1.'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007fff8e48703c __exceptionPreprocess + 172
    1   libobjc.A.dylib                     0x00007fff8684a76e objc_exception_throw + 43
    2   Realm                               0x000000010017e738 _Z18RLMSetErrorOrThrowP7NSErrorPU15__autoreleasingS0_ + 264
    3   Realm                               0x0000000100158bbe +[RLMRealm realmWithConfiguration:error:] + 5598
    4   Realm                               0x0000000100156d1d +[RLMRealm defaultRealm] + 93
    5   RealmTest                           0x00000001000028bb _TFC9RealmTest7Trainer11saveTrainerfS0_FT_T_ + 75
    6   RealmTest                           0x0000000100004224 _TFC9RealmTest14ViewController13viewDidAppearfS0_FT_T_ + 612
    7   RealmTest                           0x0000000100004352 _TToFC9RealmTest14ViewController13viewDidAppearfS0_FT_T_ + 34

Required details:
ProductName:    Mac OS X
ProductVersion: 10.10.5
BuildVersion:   14F27

/Applications/Xcode7.app/Contents/Developer
Xcode 7.0
Build version 7A220

/usr/bin/pod
0.39.0
Realm (0.96.1)

/bin/bash
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin14)

(not in use here)

/usr/bin/git
git version 2.3.8 (Apple Git-58)

@bipinvaylu It seems you have access to the Realm in the view controller before the configuration, migration block and schema version are set.
Regarding stack traces, the crash occurred in the viewDidAppear method. Please make sure that the configuration object is set before viewDidAppear method is called.

thanks @kishikawakatsumi, will look at this later, currently stuck at #2720.

Hey @bipinvaylu, after we could resolve #2720, any update on this?

Hey @mrackwitz, It's seems working fine now. Issue was realm object was created before migration code execution.  Great thanks for help.

@bipinvaylu How do u solve this problem? I stuck for a long time.

@Hstripe I was facing this issue because of accessing realm object RLMRealm.getDefaultRealm() before executing migration code.
let configuration:RLMRealmConfiguration = RLMRealmConfiguration.defaultConfiguration()
        configuration.schemaVersion = 1 //Increment version when your realm class gets updated
        configuration.migrationBlock = {(migration:RLMMigration, oldSchemaVersion: UInt64) in
              // Migration code (Update Realm table or just delete all tables)
              // I am Deleting table, Realm create new with updated fields
             migration.deleteData(forClassName: Genre.className()) //Genre is Realm class
        }

authors: Hstripe bipinvaylu kishikawakatsumi mrackwitz

repo: realm/realm-cocoa


text:
realm exception:RLMErrorAddressSpaceExhausted

Last Exception Backtrace:
0   CoreFoundation                	0x182976d8c 0x182831000 + 1334668
1   libobjc.A.dylib               	0x181b305ec 0x181b28000 + 34284
2   APPNAME               	0x1006e6a8c RLMSetErrorOrThrow(NSError*, NSError* __autoreleasing*) + 6466188 (RLMUtil.mm:336)
3   APPNAME              	0x1006c3654 RLMRealmTranslateException(NSError* __autoreleasing*) + 6321748 (RLMRealm.mm:316)
4   APPNAME               	0x1006c4958 translateSharedGroupOpenException(RLMRealmConfiguration*, NSError* __autoreleasing*) + 6326616 (RLMRealm.mm:354)
5   APPNAME               	0x1006c46f0 +[RLMRealm realmWithConfiguration:error:] + 6326000 (RLMRealm.mm:403)
6   APPNAME               	0x1006c2b34 +[RLMRealm defaultRealm] + 6318900 (RLMRealm.mm:177)
7   APPNAME               	0x100474f68 -[OCRealmDataManager initRealmCenter:] + 3903336 (OCRealmDataManager.m:173)
8   APPNAME               	0x100474970 -[OCRealmDataManager init] + 3901808 (OCRealmDataManager.m:78)
9   APPNAME               	0x1004748b4 __35+[OCRealmDataManager shareInstance]_block_invoke + 3901620 (OCRealmDataManager.m:68)
Realm framework version: ?
The latest version
Xcode version: ?
9.3
iOS/OSX version: ?
11.4
I have been experiencing such a carsh, can you help me solve it? Thanks a lot.

If we should have a chance to progress on this we would very much appreciate a self-contained reproduction case either as a project, a test-case PR or a Playground example. Thanks for your help!

Closing this issue due to no response. Feel free to reopen if additional information can be provided.

authors: bmunkholm stennie zyx449678686


text:
Deprecated flutter pub run

flutter pub run is deprecated:

update ReadMe files.

While it is deprecated the command is still available. Since we support old versions of Flutter we should update this readme only after we remove the older Flutter version support. Otherwise if you try to use dart command in a Flutter project you will get an error.

Actually no:
❯ ~/Projects/flutter/3.7.12/bin/flutter create not
❯ cd not
❯ ~/Projects/flutter/3.7.12/bin/flutter pub add realm
❯ ~/Projects/flutter/3.7.12/bin/dart run realm generate
Building package executable...
Built realm:realm.
[INFO] Generating build script...
[INFO] Generating build script completed, took 167ms

[INFO] Precompiling build script......
[INFO] Precompiling build script... completed, took 3.0s

[INFO] Initializing inputs
[INFO] Building new asset graph...
[INFO] Building new asset graph completed, took 384ms

[INFO] Checking for unexpected pre-existing outputs....
[INFO] Checking for unexpected pre-existing outputs. completed, took 0ms

[INFO] Running build...
[INFO] Generating SDK summary...
[INFO] 1.0s elapsed, 0/2 actions completed.
[INFO] 2.2s elapsed, 0/2 actions completed.
[INFO] Generating SDK summary completed, took 2.2s

[INFO] 3.2s elapsed, 0/2 actions completed.
[INFO] 7.3s elapsed, 0/2 actions completed.
[INFO] realm:realm_generator on lib/main.dart:[generate (0)] completed, took 334ms
[INFO] realm:realm_generator on test/widget_test.dart:[generate (0)] completed, took 1ms
[INFO] Running build completed, took 7.7s

[INFO] Caching finalized dependency graph...
[INFO] Caching finalized dependency graph completed, took 14ms

[INFO] Succeeded after 7.7s with 0 outputs (4 actions)

@nielsenko There is at least one Flutter version which requires a flutter run command instead of dart run

Did this PR change title and purpose?

Did this PR change title and purpose?

Yes I changed it, but probably I will open another PR only for bumping versions. It is not finished yet. This is in draft.

This does change the readme.md files but most importantly does NOT change our usage of flutter pub run anywhere in the build scripts.
Lets merge this as is and I can change the relevant places in the #1316 since it already changes the build scripts in order to avoid merge conflicts.

@blagoev could you share what should be changed in the build script? I can't find such place in your PR?
If you meant the metrics command, it is still the same in https://github.com/realm/realm-dart/pull/1316:
commandLine flutterExecutablePath, 'pub', 'run', 'realm', 'install', '--target-os-type', 'android', '--flavor', 'flutter'
This one should be fixed.

Lets merge this as is. The rest will be fixed in another PR

authors: blagoev desistefanova nielsenko

repo: realm/realm-dart


text:
Off heap memory usage when building realm dbs increases steadily

How frequently does the bug occur?
Always
Description
Hi all,
I am not sure if this problem is a bug or if I am using the library wrong in some way. However, here is my use case. I create multiple (currently around 15-20) realm databases in a job in my Spring-Boot 3 backend:

Stream csv blobs from azure storage (8mb per file, 40 files per realm db)
Map csv files to RealmObjects
Write data to realm
Close realm, call Realm.compact(config) to reduce numberOfVersions to 1, delete lock files
Zip realm file and persist
Apps can download prefilled realm dbs when data updates occur

Essentially I have two "problems".
First, I noticed that my heap usage increased with each iteration until finally the java process is killed (137, I suppose its oom). I can "mitigate" this a bit by calling System.gc() which is of course is not ideal.
Second, even with the System.gc()  workaround I notice that the RSS of the java process on a linux azure app service grows way beyond my specified max heap. So I guess, there is some issue with off-heap memory? I do not have any expertise with this, but maybe someone has an idea.
Every 1.0s: ps aux --sort=-%mem | head -n 11                                                                                abc: Thu May 11 10:04:18 2023

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root        48 70.8 83.3 9181524 6789168 ?     SNl  08:10  80:24 java -Xms1g -Xmx4g -jar /home/site/wwwroot/b/app.jar --server.port=80

I am not sure how I can really debug this on my end. I did enable the NativeMemoryTracking and generated a report which I will append.
Code:
azureStorage.getPrefixes().forEach { prefix ->
                    val blobs = azureStorage.listBlobsForPrefix(prefix)
                    val realmConfig = realmService.createRealmConfig(prefix)
                    val realm = realmService.createRealm(realmConfig)
                    realmService.writeStaticDataToRealm(realm, staticData1, staticData2, staticData3)
                    blobs.forEach { blobPath ->
                        val csvLines = convertCSVBytesToList(azureStorage.downloadBlobToInputStream(blobPath), CsvProperties.Separators.semicolon).chunked(CSV_CHUNK_SIZE)
                        csvLines.forEach { csvChunk ->
                            val mappedData = factory.mapCsvToBusinessObject(csvChunk)
                            realmService.saveToRealm(realm,  factory.createRealmObjects(mappedData), UpdatePolicy.ALL)
                        }
                    }
                    realmService.saveRealm(realm, realmConfig)
                }

RealmService:
    fun saveToRealm(realm: Realm, realmObjects: List<RealmObject>, updatePolicy: UpdatePolicy = UpdatePolicy.ERROR) {
        realm.writeBlocking { realmObjects.forEach { this.copyToRealm(it, updatePolicy) } }
        //System.gc()
    }

calling this with lots of realmObjects and UpdatePolicy.ALL is probably not very good regarding performance. It does a lot of "unnecessary" updates when inserting already existing RealmObjects. But I do not think that there is currently a better way to do that with kotlin? I saw other sdks have different UpdatePolicies for such usecases.
 fun saveRealm(realm: Realm, realmConfig: RealmConfiguration) {
        realm.close()
        Realm.compactRealm(realmConfig)

        // zip realmfile and save it to gridfs
        // deletes lock file & call Realm.close(config)
        cleanUpFiles(realmConfig)
        //System.gc()
    }

As I said, I am not sure if this is a bug or if my implementation is faulty. Any tips in the right direction would be greatly appreciated!
Stacktrace & log output
➜  ~ Native Memory Tracking:

(Omitting categories weighting less than 1KB)

Total: reserved=6996920KB, committed=2671224KB
       malloc: 114608KB #709425
       mmap:   reserved=6882312KB, committed=2556616KB

-                 Java Heap (reserved=5242880KB, committed=2097152KB)
                            (mmap: reserved=5242880KB, committed=2097152KB)

-                     Class (reserved=2166KB, committed=2166KB)
                            (classes #22459)
                            (  instance classes #21124, array classes #1335)
                            (malloc=2166KB #49758)
                            (  Metadata:   )
                            (    reserved=98304KB, committed=89728KB)
                            (    used=88988KB)
                            (    waste=740KB =0.83%)
                            (  Class space:)
                            (    reserved=1048576KB, committed=14464KB)
                            (    used=13991KB)
                            (    waste=473KB =3.27%)

-                    Thread (reserved=215631KB, committed=215631KB)
                            (thread #130)
                            (stack: reserved=215288KB, committed=215288KB)
                            (malloc=192KB #779)
                            (arena=151KB #258)

-                      Code (reserved=52120KB, committed=31288KB)
                            (malloc=2584KB #15151)
                            (mmap: reserved=49536KB, committed=28704KB)

-                        GC (reserved=261624KB, committed=145176KB)
                            (malloc=33960KB #26950)
                            (mmap: reserved=227664KB, committed=111216KB)

-                  Compiler (reserved=375KB, committed=375KB)
                            (malloc=245KB #1297)
                            (arena=131KB #3)

-                  Internal (reserved=760KB, committed=760KB)
                            (malloc=728KB #5118)
                            (mmap: reserved=32KB, committed=32KB)

-                     Other (reserved=20732KB, committed=20732KB)
                            (malloc=20732KB #55)

-                    Symbol (reserved=25854KB, committed=25854KB)
                            (malloc=22554KB #594758)
                            (arena=3300KB #1)

-    Native Memory Tracking (reserved=11357KB, committed=11357KB)
                            (malloc=272KB #3916)
                            (tracking overhead=11085KB)

-               Arena Chunk (reserved=458KB, committed=458KB)
                            (malloc=458KB)

-                   Tracing (reserved=14570KB, committed=14570KB)
                            (malloc=14538KB #202)
                            (arena=32KB #1)

-                    Module (reserved=517KB, committed=517KB)
                            (malloc=517KB #3377)

-                 Safepoint (reserved=32KB, committed=32KB)
                            (mmap: reserved=32KB, committed=32KB)

-           Synchronization (reserved=393KB, committed=393KB)
                            (malloc=393KB #6796)

-            Serviceability (reserved=3KB, committed=3KB)
                            (malloc=3KB #16)

-                 Metaspace (reserved=98754KB, committed=90178KB)
                            (malloc=450KB #285)
                            (mmap: reserved=98304KB, committed=89728KB)

-      String Deduplication (reserved=1KB, committed=1KB)
                            (malloc=1KB #8)

-           Object Monitors (reserved=117KB, committed=117KB)
                            (malloc=117KB #574)

-                   Unknown (reserved=1048576KB, committed=14464KB)
                            (mmap: reserved=1048576KB, committed=14464KB)

Can you reproduce the bug?
Always
Reproduction Steps
No response
Version
1.8
What Atlas App Services are you using?
Local Database only
Are you using encryption?
No
Platform OS and version(s)
Linux, openjdk 17
Build environment
Spring Boot 3.0.4
Kotlin 1.8.0
Realm-Kotlin 1.8.0

Thanks for the report we are investigating what might be the cause. While we do, would you mind trying to run a test where you generate the data rather than picking it up from a CSV?
We like to validate that the issue is in Realm and not in the CSV processing.

Sorry for the late response, I am currently on vacation (until 23 of May). I had no time to generate comparable data, however it did run some tests. A script records the RSS size of the java app every 10, along with a visual vm session.

Baseline: Download data, map data, but without any realm interaction:
RealmBuild_baseline_nosavingtorealm.zip

With the baseline test you can see that RSS does not exceed the current heap size that far (200-300mb, ActivityMonitor on Mac shows just roughly 30mb diff between Memory and "Real Memory" of the java process.

Download data, map data, write data to realm but no zipping + persisting of realmfile:
RealmBuild_no_static_data_no_zip .zip

With realm interaction (saving mapped objects) the RSS exceeds current heap size by around 1gb

Download data, map data, write data to realm, zip realmfile, persisting realmfile
RealmBuild_with_static_with_zip.zip

Full run shows also more memory usage, with also a big difference of RSS and heap size

Hello again, I was wondering if you could provide your insights on this particular topic? We're quite interested in utilizing realm-kotlin for our project, but at this time, we have reservations about deploying it in a production environment. Although we're not under any pressing time constraints, it would be helpful to know if there's a possibility of addressing these concerns on your end. If that's not feasible, we might need to reconsider our design strategy. Naturally, I don't expect a definitive answer at this point, just seeking your thoughts.

Hi @christianblust
We are still investigating this, but it is a bit tricky to reproduce.
E.g. here is the memory dump of writing 10 realms, each containing 500 objects each containing 1 MB each.

    @Test
    fun memoryLeak() = runBlocking {
        println("Start")
        repeat(10) { noRealms ->
            val configuration =
                RealmConfiguration.Builder(schema = setOf(Sample::class))
                    .name("realm${noRealms}.realm")
                    .directory(tmpDir)
                    .build()
            val realm = Realm.open(configuration)
            var iteration = 0
            repeat(100) {
                realm.write {
                    repeat(5) {
                        copyToRealm(Sample())
                    }
                }
                delay(10.milliseconds)
                println("Iteration ${++iteration}")
            }
            realm.close()
            Realm.compactRealm(configuration)
        }
    }

As you can see, the memory usage is relatively stable.
However, that memory dump is from Android and we know from testing that the GC on Android is much more agressive than on JVM. In general what can be expensive is doing many small writes since that can lead to version pinning (which is normally what blows up the DB size), but judging from your code, you are only doing one write?
The reason GC is important is that we currently depend on it to release certain native resources, so there is a chance that what you are seeing is just a consequence of slower GCs. realm.close() will release the "main" resources, but all objects allocated must still be GC'ed.
For the creating objects case we are looking into adding a insert() method similar to Realm Java. This should be much more suited for this kind of "bulk-insert" workload, however it isn't clear if that is actually the problem you are running into.
Also, a note about your code. If you are doing all inserts in a single write, using compactRealm is not going to help you much, instead it will actually increase your memory usage since we are doing the compaction in a copy of the data before overriding the data. This is the "spikes" you see in my graph.
Also, just to rule out it isn't an accidential memory leak in one of our data structures, is there a chance you can share your model class(es) so we have some idea what your objectgraph and properties look like?

Hello @rorbech, @cmelchior,
I appreciate your detailed response!
The saveToRealm function is invoked at least n times for n csv files. A single database is built using ~40 csv files. To reduce load, I've implemented chunking, so the function is likely called even more times.
I'm open to sharing the model classes. Could we possibly communicate this through a private channel? Currently, I'm utilizing 27 classes that comprise various data structures, including RealmInstant, RealmList, ByteArray, etc.
I would like to point out that I have two classes that look like this:
class QuantityRealmObject() : RealmObject {
    @PrimaryKey
    var id = ""
    var value: Double = 0.0
    var rawUnit: String = ""
    constructor(
        value: Double,
        rawUnit: String,
    ) : this() {
        this.id = "$value$rawUnit"
        this.value = value
        this.rawUnit = rawUnit
    }

    override fun equals(other: Any?): Boolean {
        if (this === other) return true
        if (javaClass != other?.javaClass) return false

        other as QuantityRealmObject

        if (id != other.id) return false
        if (value != other.value) return false
        if (rawUnit != other.rawUnit) return false

        return true
    }

    override fun hashCode(): Int {
        var result = id.hashCode()
        result = 31 * result + value.hashCode()
        result = 31 * result + rawUnit.hashCode()
        return result
    }
}

and
class ConsumptionRealmObject() : RealmObject {
    @PrimaryKey
    var id: String = ""
    var min: QuantityRealmObject? = null
    var max: QuantityRealmObject? = null

    constructor(
        min: QuantityRealmObject?,
        max: QuantityRealmObject?
    ) : this() {
        this.id = "${min?.value}${min?.rawUnit}_${max?.value}${max?.rawUnit}"
        this.min = min
        this.max = max
    }

    override fun equals(other: Any?): Boolean {
        if (this === other) return true
        if (javaClass != other?.javaClass) return false

        other as VerbrauchRealmObject

        if (id != other.id) return false
        if (min != other.min) return false
        if (max != other.max) return false

        return true
    }

    override fun hashCode(): Int {
        var result = id.hashCode()
        result = 31 * result + (min?.hashCode() ?: 0)
        result = 31 * result + (max?.hashCode() ?: 0)
        return result
    }
}

These classes are widely used across many model classes. While parsing csv data, it's possible that several Quantity or Consumption RealmObjects share the same PrimaryKey, due to the limited number of distinct objects. This, however, depends on the data provided in the csv files. Using UpdatePolicy.Error, as expected, triggers an IntegrityException. As a workaround, I've been using UpdatePolicy.ALL, which feels a bit odd, but it seems to work.
Another observation I made using Visual VM is that each database build spawns a "running" thread called "core-notifier". For instance, after a run that built 15 databases, Visual VM shows 15 running (green) core-notifier threads. I'm unsure if this is relevant in any way.

@christianblust Thanks for the feedback. You can share your model classes to realm-help@mongodb.com.
The core-notifier shouldn't hold on to any of the resources in question, so shouldn't be the root of this. But I guess we never know before we can replicate your observations. We are currently not able to close these threads when closing the realm, but we have an issue adding the required hooks in core (https://github.com/realm/realm-core/issues/6429).

Alright! I will get back with my colleagues and send you the files starting next week.
Would it be possible to check if this behaves differently with realm-java? I can't really get it working using the offical documentation and my project setup which is a kotlin, spring boot, gradle (kotlin syntax) backend.

I just sent the model classes to the mentioned mail. As stated in the mail:
I justed tested using EmbeddedRealmObjects instead of the current approach with @PrimaryKey and UpdatePolicy.ALL. Naturally, this results in a larger realm db file. However, I don’t have a “leak” using this approach.
Hope this helps!

Hi @rorbech ,
I've noticed recent PRs addressing JVM leaks and was wondering if these could potentially resolve the issues we've been encountering. Do you have some information on their relevance and possible release timeline? Best, Chris

Hi @christianblust. Yes, we have identified some leaks and have merged fixes for them. The fixes are available in the 1.11.2-SNAPSHOT, so would be nice with some feedback if you see a difference. There is no exact date on the release, but should be within a week or so.

Would love to test! However, I can not get the gradle configuration to work. I have a simple spring boot backend service and no android project. I don't have a "global" and "module" build.gradle file, just one. I also must set the plugin version in the plugin block. I always get the error "plugin version not found". I also tried setting the snapshot repo as plugin repo in the settings.gradle.  But if the final release is not that far and just a week away I will definitely try it and give some feedback.

authors: christianblust clementetb cmelchior rorbech

repo: realm/realm-kotlin


text:
Crash at REALM_ASSERT_DEBUG(v % 8 == 0)

How frequently does the bug occur?
Sometimes
Description
We are using realm in a heavily multithreaded environment.
We upload files using an OperationQueue where 4 operations can run in parrallel.
Upon completion we add the result to realm.
To respect realm's thread isolation we use a realm bound to a background DispatchQueue Realm(configuration: configuration, queue: queue)
All writes are synchronous and happen on the queue which is serial.
However sometimes realm crashes with the attached stacktrace. The crash doesn't always happen at the same time which makes it hard to debug.
Stacktrace & log output
* thread #48, queue = 'com.infomaniak.drive.1085402-420135.realm', stop reason = signal SIGABRT
    frame #0: 0x00000001bb216bbc libsystem_kernel.dylib`__pthread_kill + 8
    frame #1: 0x00000001db4c2854 libsystem_pthread.dylib`pthread_kill + 208
    frame #2: 0x000000018b52d6a4 libsystem_c.dylib`abort + 124
  * frame #3: 0x0000000108df0edc kDriveCore`::please_report_this_issue_in_github_realm_realm_core() at terminate.cpp:50:5
    frame #4: 0x0000000108df1244 kDriveCore`realm::util::terminate_internal(ss=0x000000016fe8e308) at terminate.cpp:123:5
    frame #5: 0x0000000108df1338 kDriveCore`realm::util::terminate(message="Assertion failed: v % 8 == 0", file="/Users/philippe/Library/Developer/Xcode/DerivedData/kDrive-ejxqdqxrytmpfoagaqdsarojisrs/SourcePackages/checkouts/realm-core/src/realm/alloc.hpp", line=427, values=0x000000016fe8e468) at terminate.cpp:140:5
    frame #6: 0x00000001085bc32c kDriveCore`realm::to_ref(v=1531274931) at alloc.hpp:427:5
    frame #7: 0x00000001085d7234 kDriveCore`realm::Array::get_as_ref(this=0x0000000282e508c0, ndx=1) const at array.hpp:749:12
    frame #8: 0x00000001085dedf4 kDriveCore`realm::Array::get_child_ref(this=0x0000000282e508c0, child_ndx=1) const at array.hpp:974:12
    frame #9: 0x00000001085d5b60 kDriveCore`realm::Node::get_ref_from_parent(this=0x000000016fe8e640) const at node.hpp:198:34
    frame #10: 0x0000000108607d58 kDriveCore`realm::Array::init_from_parent(this=0x000000016fe8e640) at array.hpp:123:24
    frame #11: 0x0000000108630c60 kDriveCore`realm::Cluster::insert_row(this=0x000000016fe8eb30, col_key=(value = 10738335744))::$_1::operator()(realm::ColKey) const at cluster.cpp:398:21
    frame #12: 0x0000000108630388 kDriveCore`realm::util::FunctionRef<bool (realm::ColKey)>::FunctionRef<realm::Cluster::insert_row(this=0x000000016fe8eb30, obj=0x000000016fe8eb30, args=(value = 10738335744))::$_1&>(realm::Cluster::insert_row(unsigned long, realm::ObjKey, std::__1::vector<realm::FieldValue, std::__1::allocator<realm::FieldValue> > const&)::$_1&)::'lambda'(void*, realm::ColKey)::operator()(void*, realm::ColKey) const at function_ref.hpp:106:20
    frame #13: 0x0000000108630334 kDriveCore`realm::util::FunctionRef<bool (realm::ColKey)>::FunctionRef<realm::Cluster::insert_row(obj=0x000000016fe8eb30, args=(value = 10738335744))::$_1&>(realm::Cluster::insert_row(unsigned long, realm::ObjKey, std::__1::vector<realm::FieldValue, std::__1::allocator<realm::FieldValue> > const&)::$_1&)::'lambda'(void*, realm::ColKey)::__invoke(void*, realm::ColKey) at function_ref.hpp:105:22
    frame #14: 0x00000001086a5b94 kDriveCore`realm::util::FunctionRef<bool (realm::ColKey)>::operator(this=0x000000016fe8ead8, args=(value = 10738335744))(realm::ColKey) const at function_ref.hpp:119:16
    frame #15: 0x0000000108d4a524 kDriveCore`bool realm::Table::for_each_and_every_column<realm::util::FunctionRef<bool (realm::ColKey)> >(this=0x0000000102cd5e00, func=FunctionRef<bool (realm::ColKey)> @ 0x000000016fe8ead8)>) const at table.hpp:472:17
    frame #16: 0x0000000108d4a490 kDriveCore`realm::TableClusterTree::for_each_and_every_column(this=0x0000000102cd61d0, func=<unavailable>)>) const at table_cluster_tree.cpp:144:14
    frame #17: 0x0000000108627d08 kDriveCore`realm::Cluster::insert_row(this=0x0000000282e508c0, ndx=155, k=(value = 210428035300), init_values=size=0) at cluster.cpp:408:16
    frame #18: 0x000000010862a4e0 kDriveCore`realm::Cluster::insert(this=0x0000000282e508c0, k=(value = 210428035300), init_values=size=0, state=0x000000016fe8ef90) at cluster.cpp:672:9
    frame #19: 0x00000001086544b4 kDriveCore`realm::ClusterTree::insert_fast(this=0x0000000102cd61d0, k=(value = 210428035300), init_values=size=0, state=0x000000016fe8ef90) at cluster_tree.cpp:881:40
    frame #20: 0x0000000108654728 kDriveCore`realm::ClusterTree::insert(this=0x0000000102cd61d0, k=(value = 210428035300), values=size=0) at cluster_tree.cpp:905:5
    frame #21: 0x0000000108d49d24 kDriveCore`realm::TableClusterTree::insert(this=0x0000000102cd61d0, k=(value = 210428035300), values=size=0) at table_cluster_tree.cpp:44:31
    frame #22: 0x0000000108d21a54 kDriveCore`realm::Table::create_linked_object(this=0x0000000102cd5e00, object_id=(m_lo = 821984740, m_hi = 813395755)) at table.cpp:2926:26
    frame #23: 0x000000010877efbc kDriveCore`realm::Obj::create_and_set_linked_object(this=0x000000016fe90210, col_key=(value = 5436604434), is_default=false) at obj.cpp:1543:39
    frame #24: 0x00000001081b1da4 kDriveCore`RLMAccessorContext::create_embedded_object(this=0x000000016fe901f8) at RLMAccessor.mm:887:26
    frame #25: 0x00000001081b50c8 kDriveCore`realm::Object realm::Object::create<objc_object* __strong, RLMAccessorContext>(ctx=0x000000016fe901f8, realm=std::__1::shared_ptr<realm::Realm>::element_type @ 0x000000012479abe8 strong=2 weak=4, object_schema=0x0000000103332a80, value=0x0000000282c59110, policy=(create = true, copy = false, update = true, diff = false), current_obj=(value = -1), out_row=0x0000000282c59118) at object_accessor.hpp:320:23
    frame #26: 0x00000001081b432c kDriveCore`RLMAccessorContext::createObject(this=0x000000016fe901f8, value=0x0000000282c59110, policy=(create = true, copy = false, update = true, diff = false), forceCreate=false, existingKey=(value = -1)) at RLMAccessor.mm:1093:9
    frame #27: 0x00000001081b56ac kDriveCore`realm::Obj RLMAccessorContext::unbox<realm::Obj>(this=0x000000016fe901f8, v=0x0000000282c59110, policy=(create = true, copy = false, update = true, diff = false), key=(value = -1)) at RLMAccessor.mm:1125:12
    frame #28: 0x00000001081d1a3c kDriveCore`realm::(anonymous namespace)::ValueUpdater<objc_object* __strong, RLMAccessorContext>::operator(this=0x000000016fe90340, (null)=0x0000000000000000)(realm::Obj*) at object_accessor.hpp:91:39
    frame #29: 0x00000001081cfe98 kDriveCore`auto realm::switch_on_type<realm::Obj, realm::(anonymous namespace)::ValueUpdater<objc_object* __strong, RLMAccessorContext>&>(type=Object | Nullable, fn=0x000000016fe90340)::ValueUpdater<objc_object* __strong, RLMAccessorContext>&) at property.hpp:241:20
    frame #30: 0x00000001081cf89c kDriveCore`void realm::Object::set_property_value_impl<objc_object* __strong, RLMAccessorContext>(this=0x000000016fe90e18, ctx=0x000000016fe91180, property=0x0000000103393870, value=0x0000000282c59110, policy=(create = true, copy = false, update = true, diff = false), is_default=false) at object_accessor.hpp:173:5
    frame #31: 0x00000001081b5554 kDriveCore`realm::Object realm::Object::create<objc_object* __strong, RLMAccessorContext>(ctx=0x000000016fe91180, realm=std::__1::shared_ptr<realm::Realm>::element_type @ 0x000000012479abe8 strong=2 weak=4, object_schema=0x0000000103332800, value=0x0000000123b8e250, policy=(create = true, copy = false, update = true, diff = false), current_obj=(value = -1), out_row=0x0000000123b8e258) at object_accessor.hpp:355:20
    frame #32: 0x00000001081b432c kDriveCore`RLMAccessorContext::createObject(this=0x000000016fe91180, value=0x0000000123b8e250, policy=(create = true, copy = false, update = true, diff = false), forceCreate=false, existingKey=(value = -1)) at RLMAccessor.mm:1093:9
    frame #33: 0x000000010827e368 kDriveCore`RLMAddObjectToRealm(object=0x0000000123b8e250, realm=0x0000000282013860, updatePolicy=RLMUpdatePolicyUpdateAll) at RLMObjectStore.mm:138:7
    frame #34: 0x000000010854331c kDriveCore`Realm.add(object=0x0000000123b8e250, update=all, self=RealmSwift.Realm @ 0x000000016fe91398) at Realm.swift:432:9
    frame #35: 0x0000000107ac5288 kDriveCore`closure #1 in closure #1 in UploadOperation.uploadCompletion(realm=RealmSwift.Realm @ 0x000000016fe91468, driveFile=0x0000000123b8e250, self=0x0000000129db7660, parent=0x00000001271f8a60) at UploadOperation.swift:286:39
    frame #36: 0x00000001079655c8 kDriveCore`Realm.safeWrite(block=0x0000000107ac7518 kDriveCore`partial apply forwarder for closure #1 () -> () in closure #1 (RealmSwift.Realm) -> () in kDriveCore.UploadOperation.uploadCompletion(data: Swift.Optional<Foundation.Data>, response: Swift.Optional<__C.NSURLResponse>, error: Swift.Optional<Swift.Error>) -> () at <compiler-generated>, self=RealmSwift.Realm @ 0x000000016fe91518) at DriveFileManager.swift:1322:17
    frame #37: 0x0000000107ac4ed8 kDriveCore`closure #1 in UploadOperation.uploadCompletion(realm=RealmSwift.Realm @ 0x000000016fe91728, driveFileManager=0x0000000123681bf0, driveFile=0x0000000123b8e250, self=0x0000000129db7660) at UploadOperation.swift:285:39
    frame #38: 0x000000010795ef84 kDriveCore`closure #1 in BackgroundRealm.execute(block=0x0000000107ac64ec kDriveCore`partial apply forwarder for closure #1 (RealmSwift.Realm) -> () in kDriveCore.UploadOperation.uploadCompletion(data: Swift.Optional<Foundation.Data>, response: Swift.Optional<__C.NSURLResponse>, error: Swift.Optional<Swift.Error>) -> () at <compiler-generated>, self=0x00000002816975a0) at BackgroundRealm.swift:61:13
    frame #39: 0x000000010795ebd4 kDriveCore`thunk for @callee_guaranteed () -> () at <compiler-generated>:0
    frame #40: 0x000000010795ec34 kDriveCore`thunk for @escaping @callee_guaranteed () -> () at <compiler-generated>:0
    frame #41: 0x00000001021a9fc4 libdispatch.dylib`_dispatch_client_callout + 16
    frame #42: 0x00000001021b9790 libdispatch.dylib`_dispatch_lane_barrier_sync_invoke_and_complete + 116
    frame #43: 0x000000010795eedc kDriveCore`BackgroundRealm.execute(block=0x0000000107ac64ec kDriveCore`partial apply forwarder for closure #1 (RealmSwift.Realm) -> () in kDriveCore.UploadOperation.uploadCompletion(data: Swift.Optional<Foundation.Data>, response: Swift.Optional<__C.NSURLResponse>, error: Swift.Optional<Swift.Error>) -> () at <compiler-generated>, self=0x00000002816975a0) at BackgroundRealm.swift:60:15
    frame #44: 0x0000000107ac3e80 kDriveCore`UploadOperation.uploadCompletion(data=797 bytes, response=0x00000002817e3780, error=nil, self=0x0000000129db7660) at UploadOperation.swift:281:84
    frame #45: 0x0000000107ac1a7c kDriveCore`implicit closure #4 in implicit closure #3 in UploadOperation.main(data=797 bytes, response=0x00000002817e3780, error=nil, self=0x0000000129db7660) at UploadOperation.swift:192:96
    frame #46: 0x0000000107aacb68 kDriveCore`thunk for @escaping @callee_guaranteed (@guaranteed Data?, @guaranteed NSURLResponse?, @guaranteed Error?) -> () at <compiler-generated>:0
    frame #47: 0x00000001815d1e64 CFNetwork`___lldb_unnamed_symbol533$$CFNetwork + 524
    frame #48: 0x00000001815e243c CFNetwork`___lldb_unnamed_symbol758$$CFNetwork + 188
    frame #49: 0x00000001021a86fc libdispatch.dylib`_dispatch_call_block_and_release + 24
    frame #50: 0x00000001021a9fc4 libdispatch.dylib`_dispatch_client_callout + 16
    frame #51: 0x00000001021b1150 libdispatch.dylib`_dispatch_lane_serial_drain + 684
    frame #52: 0x00000001021b1e10 libdispatch.dylib`_dispatch_lane_invoke + 484
    frame #53: 0x00000001021bd63c libdispatch.dylib`_dispatch_workloop_worker_thread + 852
    frame #54: 0x00000001db4b6e10 libsystem_pthread.dylib`_pthread_wqthread + 284
* thread #48, queue = 'com.infomaniak.drive.1085402-420135.realm', stop reason = signal SIGABRT
    frame #0: 0x00000001bb216bbc libsystem_kernel.dylib`__pthread_kill + 8
    frame #1: 0x00000001db4c2854 libsystem_pthread.dylib`pthread_kill + 208
    frame #2: 0x000000018b52d6a4 libsystem_c.dylib`abort + 124
  * frame #3: 0x0000000108df0edc kDriveCore`::please_report_this_issue_in_github_realm_realm_core() at terminate.cpp:50:5
    frame #4: 0x0000000108df1244 kDriveCore`realm::util::terminate_internal(ss=0x000000016fe8e308) at terminate.cpp:123:5
    frame #5: 0x0000000108df1338 kDriveCore`realm::util::terminate(message="Assertion failed: v % 8 == 0", file="/Users/philippe/Library/Developer/Xcode/DerivedData/kDrive-ejxqdqxrytmpfoagaqdsarojisrs/SourcePackages/checkouts/realm-core/src/realm/alloc.hpp", line=427, values=0x000000016fe8e468) at terminate.cpp:140:5
    frame #6: 0x00000001085bc32c kDriveCore`realm::to_ref(v=1531274931) at alloc.hpp:427:5
    frame #7: 0x00000001085d7234 kDriveCore`realm::Array::get_as_ref(this=0x0000000282e508c0, ndx=1) const at array.hpp:749:12
    frame #8: 0x00000001085dedf4 kDriveCore`realm::Array::get_child_ref(this=0x0000000282e508c0, child_ndx=1) const at array.hpp:974:12
    frame #9: 0x00000001085d5b60 kDriveCore`realm::Node::get_ref_from_parent(this=0x000000016fe8e640) const at node.hpp:198:34
    frame #10: 0x0000000108607d58 kDriveCore`realm::Array::init_from_parent(this=0x000000016fe8e640) at array.hpp:123:24
    frame #11: 0x0000000108630c60 kDriveCore`realm::Cluster::insert_row(this=0x000000016fe8eb30, col_key=(value = 10738335744))::$_1::operator()(realm::ColKey) const at cluster.cpp:398:21
    frame #12: 0x0000000108630388 kDriveCore`realm::util::FunctionRef<bool (realm::ColKey)>::FunctionRef<realm::Cluster::insert_row(this=0x000000016fe8eb30, obj=0x000000016fe8eb30, args=(value = 10738335744))::$_1&>(realm::Cluster::insert_row(unsigned long, realm::ObjKey, std::__1::vector<realm::FieldValue, std::__1::allocator<realm::FieldValue> > const&)::$_1&)::'lambda'(void*, realm::ColKey)::operator()(void*, realm::ColKey) const at function_ref.hpp:106:20
    frame #13: 0x0000000108630334 kDriveCore`realm::util::FunctionRef<bool (realm::ColKey)>::FunctionRef<realm::Cluster::insert_row(obj=0x000000016fe8eb30, args=(value = 10738335744))::$_1&>(realm::Cluster::insert_row(unsigned long, realm::ObjKey, std::__1::vector<realm::FieldValue, std::__1::allocator<realm::FieldValue> > const&)::$_1&)::'lambda'(void*, realm::ColKey)::__invoke(void*, realm::ColKey) at function_ref.hpp:105:22
    frame #14: 0x00000001086a5b94 kDriveCore`realm::util::FunctionRef<bool (realm::ColKey)>::operator(this=0x000000016fe8ead8, args=(value = 10738335744))(realm::ColKey) const at function_ref.hpp:119:16
    frame #15: 0x0000000108d4a524 kDriveCore`bool realm::Table::for_each_and_every_column<realm::util::FunctionRef<bool (realm::ColKey)> >(this=0x0000000102cd5e00, func=FunctionRef<bool (realm::ColKey)> @ 0x000000016fe8ead8)>) const at table.hpp:472:17
    frame #16: 0x0000000108d4a490 kDriveCore`realm::TableClusterTree::for_each_and_every_column(this=0x0000000102cd61d0, func=<unavailable>)>) const at table_cluster_tree.cpp:144:14
    frame #17: 0x0000000108627d08 kDriveCore`realm::Cluster::insert_row(this=0x0000000282e508c0, ndx=155, k=(value = 210428035300), init_values=size=0) at cluster.cpp:408:16
    frame #18: 0x000000010862a4e0 kDriveCore`realm::Cluster::insert(this=0x0000000282e508c0, k=(value = 210428035300), init_values=size=0, state=0x000000016fe8ef90) at cluster.cpp:672:9
    frame #19: 0x00000001086544b4 kDriveCore`realm::ClusterTree::insert_fast(this=0x0000000102cd61d0, k=(value = 210428035300), init_values=size=0, state=0x000000016fe8ef90) at cluster_tree.cpp:881:40
    frame #20: 0x0000000108654728 kDriveCore`realm::ClusterTree::insert(this=0x0000000102cd61d0, k=(value = 210428035300), values=size=0) at cluster_tree.cpp:905:5
    frame #21: 0x0000000108d49d24 kDriveCore`realm::TableClusterTree::insert(this=0x0000000102cd61d0, k=(value = 210428035300), values=size=0) at table_cluster_tree.cpp:44:31
    frame #22: 0x0000000108d21a54 kDriveCore`realm::Table::create_linked_object(this=0x0000000102cd5e00, object_id=(m_lo = 821984740, m_hi = 813395755)) at table.cpp:2926:26
    frame #23: 0x000000010877efbc kDriveCore`realm::Obj::create_and_set_linked_object(this=0x000000016fe90210, col_key=(value = 5436604434), is_default=false) at obj.cpp:1543:39
    frame #24: 0x00000001081b1da4 kDriveCore`RLMAccessorContext::create_embedded_object(this=0x000000016fe901f8) at RLMAccessor.mm:887:26
    frame #25: 0x00000001081b50c8 kDriveCore`realm::Object realm::Object::create<objc_object* __strong, RLMAccessorContext>(ctx=0x000000016fe901f8, realm=std::__1::shared_ptr<realm::Realm>::element_type @ 0x000000012479abe8 strong=2 weak=4, object_schema=0x0000000103332a80, value=0x0000000282c59110, policy=(create = true, copy = false, update = true, diff = false), current_obj=(value = -1), out_row=0x0000000282c59118) at object_accessor.hpp:320:23
    frame #26: 0x00000001081b432c kDriveCore`RLMAccessorContext::createObject(this=0x000000016fe901f8, value=0x0000000282c59110, policy=(create = true, copy = false, update = true, diff = false), forceCreate=false, existingKey=(value = -1)) at RLMAccessor.mm:1093:9
    frame #27: 0x00000001081b56ac kDriveCore`realm::Obj RLMAccessorContext::unbox<realm::Obj>(this=0x000000016fe901f8, v=0x0000000282c59110, policy=(create = true, copy = false, update = true, diff = false), key=(value = -1)) at RLMAccessor.mm:1125:12
    frame #28: 0x00000001081d1a3c kDriveCore`realm::(anonymous namespace)::ValueUpdater<objc_object* __strong, RLMAccessorContext>::operator(this=0x000000016fe90340, (null)=0x0000000000000000)(realm::Obj*) at object_accessor.hpp:91:39
    frame #29: 0x00000001081cfe98 kDriveCore`auto realm::switch_on_type<realm::Obj, realm::(anonymous namespace)::ValueUpdater<objc_object* __strong, RLMAccessorContext>&>(type=Object | Nullable, fn=0x000000016fe90340)::ValueUpdater<objc_object* __strong, RLMAccessorContext>&) at property.hpp:241:20
    frame #30: 0x00000001081cf89c kDriveCore`void realm::Object::set_property_value_impl<objc_object* __strong, RLMAccessorContext>(this=0x000000016fe90e18, ctx=0x000000016fe91180, property=0x0000000103393870, value=0x0000000282c59110, policy=(create = true, copy = false, update = true, diff = false), is_default=false) at object_accessor.hpp:173:5
    frame #31: 0x00000001081b5554 kDriveCore`realm::Object realm::Object::create<objc_object* __strong, RLMAccessorContext>(ctx=0x000000016fe91180, realm=std::__1::shared_ptr<realm::Realm>::element_type @ 0x000000012479abe8 strong=2 weak=4, object_schema=0x0000000103332800, value=0x0000000123b8e250, policy=(create = true, copy = false, update = true, diff = false), current_obj=(value = -1), out_row=0x0000000123b8e258) at object_accessor.hpp:355:20
    frame #32: 0x00000001081b432c kDriveCore`RLMAccessorContext::createObject(this=0x000000016fe91180, value=0x0000000123b8e250, policy=(create = true, copy = false, update = true, diff = false), forceCreate=false, existingKey=(value = -1)) at RLMAccessor.mm:1093:9
    frame #33: 0x000000010827e368 kDriveCore`RLMAddObjectToRealm(object=0x0000000123b8e250, realm=0x0000000282013860, updatePolicy=RLMUpdatePolicyUpdateAll) at RLMObjectStore.mm:138:7
    frame #34: 0x000000010854331c kDriveCore`Realm.add(object=0x0000000123b8e250, update=all, self=RealmSwift.Realm @ 0x000000016fe91398) at Realm.swift:432:9
    frame #35: 0x0000000107ac5288 kDriveCore`closure #1 in closure #1 in UploadOperation.uploadCompletion(realm=RealmSwift.Realm @ 0x000000016fe91468, driveFile=0x0000000123b8e250, self=0x0000000129db7660, parent=0x00000001271f8a60) at UploadOperation.swift:286:39
    frame #36: 0x00000001079655c8 kDriveCore`Realm.safeWrite(block=0x0000000107ac7518 kDriveCore`partial apply forwarder for closure #1 () -> () in closure #1 (RealmSwift.Realm) -> () in kDriveCore.UploadOperation.uploadCompletion(data: Swift.Optional<Foundation.Data>, response: Swift.Optional<__C.NSURLResponse>, error: Swift.Optional<Swift.Error>) -> () at <compiler-generated>, self=RealmSwift.Realm @ 0x000000016fe91518) at DriveFileManager.swift:1322:17
    frame #37: 0x0000000107ac4ed8 kDriveCore`closure #1 in UploadOperation.uploadCompletion(realm=RealmSwift.Realm @ 0x000000016fe91728, driveFileManager=0x0000000123681bf0, driveFile=0x0000000123b8e250, self=0x0000000129db7660) at UploadOperation.swift:285:39
    frame #38: 0x000000010795ef84 kDriveCore`closure #1 in BackgroundRealm.execute(block=0x0000000107ac64ec kDriveCore`partial apply forwarder for closure #1 (RealmSwift.Realm) -> () in kDriveCore.UploadOperation.uploadCompletion(data: Swift.Optional<Foundation.Data>, response: Swift.Optional<__C.NSURLResponse>, error: Swift.Optional<Swift.Error>) -> () at <compiler-generated>, self=0x00000002816975a0) at BackgroundRealm.swift:61:13
    frame #39: 0x000000010795ebd4 kDriveCore`thunk for @callee_guaranteed () -> () at <compiler-generated>:0
    frame #40: 0x000000010795ec34 kDriveCore`thunk for @escaping @callee_guaranteed () -> () at <compiler-generated>:0
    frame #41: 0x00000001021a9fc4 libdispatch.dylib`_dispatch_client_callout + 16
    frame #42: 0x00000001021b9790 libdispatch.dylib`_dispatch_lane_barrier_sync_invoke_and_complete + 116
    frame #43: 0x000000010795eedc kDriveCore`BackgroundRealm.execute(block=0x0000000107ac64ec kDriveCore`partial apply forwarder for closure #1 (RealmSwift.Realm) -> () in kDriveCore.UploadOperation.uploadCompletion(data: Swift.Optional<Foundation.Data>, response: Swift.Optional<__C.NSURLResponse>, error: Swift.Optional<Swift.Error>) -> () at <compiler-generated>, self=0x00000002816975a0) at BackgroundRealm.swift:60:15
    frame #44: 0x0000000107ac3e80 kDriveCore`UploadOperation.uploadCompletion(data=797 bytes, response=0x00000002817e3780, error=nil, self=0x0000000129db7660) at UploadOperation.swift:281:84
    frame #45: 0x0000000107ac1a7c kDriveCore`implicit closure #4 in implicit closure #3 in UploadOperation.main(data=797 bytes, response=0x00000002817e3780, error=nil, self=0x0000000129db7660) at UploadOperation.swift:192:96
    frame #46: 0x0000000107aacb68 kDriveCore`thunk for @escaping @callee_guaranteed (@guaranteed Data?, @guaranteed NSURLResponse?, @guaranteed Error?) -> () at <compiler-generated>:0
    frame #47: 0x00000001815d1e64 CFNetwork`___lldb_unnamed_symbol533$$CFNetwork + 524
    frame #48: 0x00000001815e243c CFNetwork`___lldb_unnamed_symbol758$$CFNetwork + 188
    frame #49: 0x00000001021a86fc libdispatch.dylib`_dispatch_call_block_and_release + 24
    frame #50: 0x00000001021a9fc4 libdispatch.dylib`_dispatch_client_callout + 16
    frame #51: 0x00000001021b1150 libdispatch.dylib`_dispatch_lane_serial_drain + 684
    frame #52: 0x00000001021b1e10 libdispatch.dylib`_dispatch_lane_invoke + 484
    frame #53: 0x00000001021bd63c libdispatch.dylib`_dispatch_workloop_worker_thread + 852
    frame #54: 0x00000001db4b6e10 libsystem_pthread.dylib`_pthread_wqthread + 284

Can you reproduce the bug?
Not yet
Reproduction Steps
I cannot reproduce in a external project.
Version
10.25
What SDK flavour are you using?
Local Database only
Are you using encryption?
No, not using encryption
Platform OS and version(s)
iOS 15.4
Build environment
Xcode version: 13.3
Dependency manager and version: SPM

@PhilippeWeidmann thanks for submitting the issue. From what you wrote above the threading policy sounds about right.
Just to help us debug the issue, can you share info on Realm configuration, database schema and the code you're using to perform the writes.
@jbreams might be the case for core.

I also think it's an issue for core but the issue template on the core repo told me to go here 😬
The code of the app is quite complex but it looks like this:
We have a BackgroundRealm class:
public class BackgroundRealm {
    private static var instances: [String: BackgroundRealm] = [:]

    private let realm: Realm
    private let queue: DispatchQueue

    public class func getQueue(for configuration: Realm.Configuration) -> BackgroundRealm {
        guard let fileURL = configuration.fileURL else {
            fatalError("Realm configurations without file URL not supported")
        }

        if let instance = instances[fileURL.absoluteString] {
            return instance
        } else {
            let queue = DispatchQueue(label: "com.infomaniak.drive.\(fileURL.lastPathComponent)", autoreleaseFrequency: .workItem)
            var realm: Realm!
            queue.sync {
                do {
                    realm = try Realm(configuration: configuration, queue: queue)
                } catch {
                    // We can't recover from this error but at least we report it correctly on Sentry
                    Logging.reportRealmOpeningError(error, realmConfiguration: configuration)
                }
            }
            let instance = BackgroundRealm(realm: realm, queue: queue)
            instances[fileURL.absoluteString] = instance
            return instance
        }
    }

    private init(realm: Realm, queue: DispatchQueue) {
        self.realm = realm
        self.queue = queue
    }

    public func execute(_ block: (Realm) -> Void) {
        queue.sync {
            block(realm)
        }
    }
}

We write data in a class that extends Operation this operation is added to an OperationQueue the main writing to realm logic goes like this:
BackgroundRealm.getQueue(for: driveFileManager.realmConfiguration).execute { realm in
                    if driveFileManager.getCachedFile(id: driveFile.id, freeze: false, using: realm) != nil || file.relativePath.isEmpty {
                        let parent = driveFileManager.getCachedFile(id: file.parentDirectoryId, freeze: false, using: realm)
                        try? realm.write {
                            realm.add(driveFile, update: .all)
                            if file.relativePath.isEmpty {
                                parent?.children.insert(driveFile)
                            }
                        }
                        result.driveFile = File(value: driveFile)
                    }
                }

This could be an issue with multiple threads trying to access BackgroundRealm.instances and so you may need to implement some sort of structured concurrency or use actor's

Thanks, we will investiguate concurrent access on BackgroundRealm.instances and reopen the issue if we find something.

repo: realm/realm-swift


text:
Generic Model using type.classname() depends on target name (iOS)

How frequently does the bug occur?
All the time
Description
We found that there is an unexpected behaviour when using a generic model type with realmDB via Swift on iOS. Using this generic model class across two targets fails in unexpected ways seemingly because realm does not correctly recognize the class across targets.
Our code is using realm.objects(Model.self) to access all objects of one type. Internally that method calls RLMGetObjects(rlmRealm, type.className(), nil) and here type.className() seems to be the cause of the issue.
For non-generic types its just the human readable type name: For class Model it'd be Model. But for generic types like Model<GenericType> .className() yield something similar to: _TeZJ6TargetName8ModelCS_13GenericType_ and realmDB fails to fetch the data saved with a different target name as this target name is part of the stringified className.
Stacktrace & log output
No response
Can you reproduce the bug?
Yes, always
Reproduction Steps
No response
Version
10.29.0
What SDK flavour are you using?
MongoDB Realm (i.e. Sync, auth, functions)
Are you using encryption?
Yes, using encryption
Platform OS and version(s)
RealmSwift 10.29.0
Build environment
Xcode 14.1,

Hi @don-hue I'm changing the tag to a feature enhancement. We'll discuss it with the team if this viable.
Also Can we know the specific use case for this?, maybe there is another feature that can be used in your case.

Hi @dianaafanador3 ,
thanks for the response.
We encountered this behaviour as we wanted to upgrade our current app, but still wanted to use the stored data.
The upgraded version has two different targets but the same bundle id.

I think this has more to do with the class been generic that been in different targets. We support shared realm between extension and different Apps, so different targets should not be an issue.

well, i guess it is a special usecase to have generic types as well as the need to access the data from different targets with the same bundle id.

Closing this as there is already an open request for this feature. https://github.com/realm/realm-swift/issues/3635


text:
Add PlayerPrefs tutorial.

This PR adds the first of the persistence comparison tutorial: PlayerPrefs
All six parts of this series will eventually live in the persistence-comparison branch and use the same example game.
edit:
Additional topics like object relationships, performance and migrations are currently planned to be covered in the final part of the comparison where we compare the approaches instead of covering individually in each part.

I removed the parts that will only be used by future tutorials. I will add them back when the article itself will actually be included.

repo: realm/unity-examples


text:
Tackle bot attacks by preventing them to gain invite link

With the recent increase in bot/spam attacks to the telegram group, there is no way we can secure the group.
One idea might be instead of giving the invite link let the user deal with PyDelhi bot first.
A new user clicks the join link greeted by PyDelhi bot, then the bot will ask a very easy question to the user which then pass an invite link with inline button, which is default hiding link behind the text.
For example, you give your user a link like t.me/bot?start=invite, and when your bot received /start invite_link, which ask a question in and send a message with an inline button with URL parameter.
I know this would be a step backward in terms of UX but worth it.

We're removing invite link altogether for now until we reach a solution. Ref: #13

authors: aaqaishtyaq realslimshanky

repo: realslimshanky/PyDelhi-Bot


text:
Smart-Marker: cursor stops AFTER the marker. Not ON the marker

Reapere 7.15
SWS 2.12.1
by using the smart-markers to investigate an issue an user highlighted, I noticed that
if I use smartmarkers,the cursor executes them AFTER (well after) the marker and not ON the marker
Here the !1008 (Pause). Note that the cursor came to the stopAFTER the marker and not ON the marker
Underneath another screenshot.
I set the marker up with the action 10157 it means "insert marker"
When the cursor passed, created the marker 4 ... see the distance ...

Action makers are not sample accurate. SWS checks 30 times per second (nominal, can be slower!) if playback crossed an action marker.
There is no way for a REAPER extension or ReaScript to schedule something to occur at an exact time position.

Action makers are not sample accurate. SWS checks 30 times per second (nominal, can be slower!) if playback crossed an action marker.
There is no way for a REAPER extension or ReaScript to schedule something to occur at an exact time position.

SWS 2.12.1

By the way this version is 3 years out of date. The latest is 2.14 which is available from ReaPack or here.

Ok so we can't get better but the difference is very small (negligible) then.

Action makers are not sample accurate. SWS checks 30 times per second (nominal, can be slower!) if playback crossed an action marker.
There is no way for a REAPER extension or ReaScript to schedule something to occur at an exact time position.

SWS 2.12.1

By the way this version is 3 years out of date. The latest is 2.14 which is available from ReaPack or here.

Another thing: I did install SWS via ReaPack when it was available this feature, to try it. I update ReaPack several times in these few dasy: Why didn't it update also SWS?

Why didn't it update also SWS?

Only v2.14 is in ReaPack, so if you installed it from there (ReaPack > Browse packages > SWS > Install), you already got 2.14.

Its a shame this can't be fixed. I had a string of videos in Reaper using the pause markers but as it went down the timeline it gets more out of sync. Oh and I was using it also to control FLstudio which was controlling DMX lighting. The first three videos would play perfect the lights we in sync but as we got to the 4th video and on, it became more out of sync...sadly. Now Flstudio has pause markers, they do stop right on the money but they also will occasionally skip the marker not good for a live situation.  I ended up removing the pause markers from my set. Not what I wanted to do but was my only choice as of now.

authors: ZipSnipe cfillion tormyvancool

repo: reaper-oss/sws


text:
Region Playlist: Action to skip to previous/next region

Hey guys.
Is there a way as an action to skip to the next region in a region playlist immediately?  Right now I only see a smooth seek option.
Would be awesome to be able to stop/goto next(prev)/play etc from a midi cc for live use.
Thanks!

Is this the kind of behaviour you wish if you disable "Smooth seek (seek immediately if disabled)" in the Region Playlist Options menu (right-click the playlist)?
If so you could set/unset that option by action (or even compose a custom action or script which does that when switching to the next/previous region).
I'm going to make this option able to set by 3 actions

"Region Playlist - Options - Disable smooth seek"
"Region Playlist - Options - Enable smooth seek"
"Region Playlist - Options - Toggle smooth seek"

after I found out how to correctly contribute to SWS.

Offtopic @ SWS guys:
As this is 99.9% JeffOS work and never contributed (but maybe will), I’m feeling uncomfortable to add my own folders/files to the SWS structure.
Do I really need this? If so I would go the same route as Snooks here.

@veto-gh (sorry to hijack your FR thread, @ksawaia):
The folders "by contributor" is, for lack of a better word, gross.  The whole point of SWS is to be community focused, open source, etc.  If you'd like to help out veto I wholeheartedly welcome you to hack away at the existing codebase instead of adding yet another appendage to it.

Welcome to SWS veto. :)

Cool, thank you Tim. As far as I understand there’s nothing more to do than to update the whatsnew?
(see my pull request here)
Maybe I'll reconsider adding my own files/folders if/when I have something more substantially to add.
Thank you for the welcome Nofish :)
@ksawaia:
Sorry for all the offtopic.
If you're still interested I've also added 2 new actions which could be useful:

SWS/S&M: Region Playlist - Play next region (based on current playing region)
SWS/S&M: Region Playlist - Play previous region (based on current playing region)

authors: ksawaia nofishonfriday swstim veto-gh


text:
ReScript Apollo Client?

Should we get reason-apollo-client to stable and then switch to res-apollo-client?

Is res the preferred prefix or rescript? Anyway I agree we should probably switch.

I personally like rescript- but seems like the momentum is for res- and not like I care that much: https://forum.rescript-lang.org/t/libraries-naming-convention/298

Ah ok! Sounds like it is res- indeed!

https://forum.rescript-lang.org/t/naming-standard-for-new-binding-projects/572/5 🤨

😂 Well, maybe it's better that we don't have any convention and people just tag the repository. If we go with rescript- it would solve a dilemma I was having of how to refer to the library. Would we still say "ReScript Apollo Client" and the package was res-apollo-client? Or would we now just always refer to it as res-apollo-client?

I like rescript for the reason you mentioned above. To me, it doesn't make much sense to shorten the package name itself because you hardly ever type it - there's not much need for an abbreviation IMO. And then the package name === what you actually call it.

Would rescript-apollo-client compatible with Reason people who don't want to switch to Rescript?

Yes, it's always compatible as it runs on the same AST.

We're now fully transitioned to rescript-apollo-client

authors: jeddeloh jfrolich kgoggin shinzui


text:
not caching in asynchronous multiprocessing

Requests doesn't appear to be inheriting a previously applied cache inside asynchronous multiprocessing  modules such as ray and multiprocessing.
Example error:
requests_cache.install_cache('my_cache')

@ray.remote
def get_the_thing_from_the_place(url):
    r = requests.get(url)
    if not r.from_cache:
        logging.warn(f"not from cache: {url}")

produces the error:
AttributeError: 'Response' object has no attribute 'from_cache'

when called from something like
results.append(get_history.remote(myurl))

The error goes away when you install the cache inside the remote function, but this is very expensive and defeats the purpose of parallelizing.
Any ideas on how to ensure a previously installed cache is available to requests inside asynchronous processes? The only solution I've found to this is to parallelize using celery workers (which keep a process running with the cache intact.) but ray and other parallelization modules are much more efficient that celery in many applications.

@rtphokie This is a year and a half later, but are you still using requests-cache, and are you still running into this issue?
I don't have experience with ray in particular, but with multiprocessing in general, you're right that the global patching method (install_cache()) just isn't going to work across parallel processes. The best place to start would be to create a requests_cache.CachedSession and pass that as a parameter to each of your processes/tasks/workers.
Let me know if you try that approach, and if you run into more issues I can try to help work through them.

I still actively use requests_cache, but only for single threaded projects
since its not really thread safe, at least using the global patching method
as you mention.  I've not tried the CachedSession method but will next time
I spin up a new multithreaded project.
Thanks for reaching out,
Tony
On Fri, Mar 19, 2021 at 1:13 PM Jordan Cook @.***>
wrote:

@rtphokie https://github.com/rtphokie This is a year and a half later,
but are you still using requests-cache, and are you still running into this
issue?
I don't have experience with ray in particular, but with multiprocessing
in general, you're right that the global patching method (install_cache())
just isn't going to work across parallel processes. The best place to start
would be to create a requests_cache.CachedSession and pass that as a
parameter to each of your processes/tasks/workers.
Let me know if you try that approach, and if you run into more issues I
can try to help work through them.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/reclosedev/requests-cache/issues/143#issuecomment-802985413,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAEGSEJBE3WNI7XSDFTOTPLTEOA4LANCNFSM4IUT577Q
.

There are some recent improvements that might be relevant to thread-safety (not yet released, but will be in the near future), and it would be good to get some multithreaded/multiprocess examples added to the docs. If you would be willing to test out the current master branch sometime, that would be really helpful! Or you could wait for the next release, if you prefer.

FYI, the changes mentioned above are now in the latest stable release (0.6.x), and the documentation explicitly mentions the functions that are not thread-safe (for example, patching and CachedSession.cache_disabled()). There are also automated tests for thread safety.
It's possible that there are still be some cases that the docs and tests don't yet cover, though, and I still need to add multithreaded examples to the docs.

authors: JWCook rtphokie

repo: reclosedev/requests-cache


text:
Doesnt work at chess.com

The bot goes out of sync after few moves, dunno why, it worked well till now maybe chess.com changed something.
Thanks

Ok, I will check it.

Now it works again, i've noticed that sometimes it got confused with the king castle, especially with 0-0-0 or long castle.

I already did it for lichess, and as I see - it works properly at both sites.

Duplicate #28. Closed.

authors: enkynakamura jfkz

repo: recoders/chessbot

license: mit


text:
Add RemoveEmptyTableAttributeRector

ref #156

@TomasVotruba @samsonasik I need help here.. I don't know how to remove the AttributeGroup 😕

You should remove from the node, eg: Class_ node, not from the AttributeGroup, so loop the data:
        foreach ($node->attrGroups as $attrGroup) {
            foreach ($attrGroup->attrs as $attr) {
                foreach ($attr->args as $arg) {
                     // check empty...
                }
            }
        }

Very helpful, thank you @samsonasik ! Didn't know attribute groups of a class were accessible from the Class_ node :)

@samsonasik running vendor/bin/rector add changes not related to this PR, should I really add them here?
The CI issue doesn't seem to be related to CS: https://github.com/rectorphp/rector-doctrine/actions/runs/4591564833/jobs/8107924067?pr=158#step:7:33

You can check previous check https://github.com/rectorphp/rector-doctrine/actions/runs/4591564833/jobs/8107924067?pr=158#step:6:1

Added a commit to apply CS fixes on unrelated code

Thank you @samsonasik for your guidance and your patience!

Thank you :clap:

authors: TomasVotruba samsonasik yguedidi

repo: rectorphp/rector-doctrine


text:
The matplotlib gem is required to execute sample code but not noted.

Following two gems are required to execute sample code that is written in Usage section of README.md.
gem 'numo-narray'
gem 'matplotlib'

The numo-narray gem  might be required because of this issue.
https://github.com/red-data-tools/charty/issues/51
Since this is sample code, I expected that all the required gems would be noted near the code.
How about add a note of required gem near the sample code?
Or, if the charty gem always requires the matplotlib gem to draw graphs, how about include the matplotlib gem as a dependent gem?
Environment
$ uname -a
Darwin xxxxMacBook-Pro.local 18.5.0 Darwin Kernel Version 18.5.0: Mon Mar 11 20:40:32 PDT 2019; root:xnu-4903.251.3~3/RELEASE_X86_64 x86_64

$ ruby --version
ruby 2.6.2p47 (2019-03-13 revision 67232) [x86_64-darwin18]

Executed sample code
$ cat sample_1.rb
require 'bundler/setup'
require 'charty'

charty = Charty::Plotter.new(:pyplot)

bar = charty.bar do
  series [0,1,2,3,4], [10,40,20,90,70], label: "sample1"
  series [0,1,2,3,4], [90,80,70,60,50], label: "sample2"
  series [0,1,2,3,4,5,6,7,8], [50,60,20,30,10, 90, 0, 100, 50], label: "sample3"
  range x: 0..10, y: 1..100
  xlabel 'foo'
  ylabel 'bar'
  title 'bar plot'
end
bar.render("sample_images/bar_pyplot.png")

@teslur Thank you for your feedback.
The version 0.2.3 I've released now doesn't require numo-narray.
Please use it.

authors: mrkn teslur

repo: red-data-tools/charty