profile
viewpoint

PR opened realm/realm-core

Reviewers
Introduce and use FunctionRef where it is safe T-Internal

FunctionRef is a simple type-erased function wrapper which holds a pointer to the wrapped thing rather than copying it.

This ended up not having any runtime performance benefits (at least with libc++) because in practice most of the objects wrapped in std::functions are small enough to fit in the small-function buffer and not need an extra heap allocation. However, it does knock 15% off the size of the library due to how much simpler it is than the std::function machinery and helps compile times a bit too.

_ Compile Time Library Size Test Executable Size Realm.framework
Before 710s 7385 KB 18907 KB 18513 KB
After 663s 6293 KB 18305 KB 17283 KB
Change -6.6% -14.8% -602 KB -1230 KB
Core 5 730s 5998 KB 20664 KB 8839 KB
+181 -92

0 comment

17 changed files

pr created time in 2 hours

create barnchrealm/realm-core

branch : tg/function-ref

created branch time in 2 hours

PR opened realm/realm-core

Reviewers
Improve performance of looking up table entries by index T-Enhancement

Creating a Cluster isn't particularly slow, but in the hot loop in ClusterNodeInner::get() it still ended up being most of the run time. The benchmark results of this change are:

Req runs:   10  IterateTableByIndexNoPrimaryKey (MemOnly, EncryptionOff):     min  84.32ms (-53.58%)           max  87.02ms (-53.27%)           med  84.90ms (-53.90%)           avg  85.18ms (-53.65%)           stddev  1.01ms (-44.11%)      
Req runs:   10  IterateTableByIndexIntPrimaryKey (MemOnly, EncryptionOff):     min  69.98ms (-58.83%)           max  73.74ms (-57.01%)           med  71.84ms (-57.87%)           avg  71.42ms (-58.13%)           stddev  1.10ms (+114.74%)     
Req runs:   10  IterateTableByIndexStringPrimaryKey (MemOnly, EncryptionOff):     min 110.29ms (-47.42%)           max 111.85ms (-47.22%)           med 110.76ms (-47.43%)           avg 110.85ms (-47.38%)           stddev   486us (-27.48%)      

This is enough to make the aggressively bad Cocoa perf test (which does [IntObject.allObjects objectAtIndex:i] and so defeats optimizations around using an iterator) no longer significantly regress compared to core 5.

+96 -12

0 comment

5 changed files

pr created time in 2 hours

issue commentrealm/realm-dotnet

Unity Support

@nirinchev

Yes, there is - we are in the process of migrating our assemblies to .NET standard. Then, Unity will need to add support for that (which they promised they'll do).

What they promised they'll do is fulfilled. What's the status on this? Is there a person who is actively looking into this? I'll have to figure out if I'll adopt Realm.

The current problem is that Realm.dll use P/Invoke calls to realm-wrapper.dll and it makes Unity to freeze when trying to unload realm-wrapper.dll.

A bright side is that it runs fine for the first run, and reading (not writing) from realm doesn't seem to call realm-wrapper.dll and it doesn't cause the freeze.

Until Realm supports Unity officially, I have to figure out a workaround. I think there are two workarounds.

  1. Is there a way to disable the automatic sync? I would like to find out if there is a way to manually sync. I'm aware that when I do the manual sync, I need to restart Unity.

  2. Just use a local realm file for Unity and create a separate daemon that syncs between the local realm file and the realm server. Is it possible to make such a daemon that can sync only changed objects?

I guess I prefer workaround #2, but I would like to know the answer to #1.

Please help make this possible. I'm sure there are tons of Unity users dying to use Realm.

Thanks.

kristiandupont

comment created time in 2 hours

create barnchrealm/realm-core

branch : tg/table-index

created branch time in 2 hours

PR opened realm/realm-core

Reviewers
Js/merge 5.23.5 T-Internal

Updates core-6 branch with 5.23.4 and 5.23.5 releases.

+235 -102

0 comment

17 changed files

pr created time in 3 hours

create barnchrealm/realm-core

branch : js/merge-5.23.5

created branch time in 3 hours

pull request commentrealm/SwiftLint

Use the best run when deciding which branch is performing better

<!-- 0 Errors 0 Warnings 12 Messages: Linting Aerial with this PR to... 0 Markdowns --> <table> <thead> <tr> <th width="50"></th> <th width="100%" data-danger-table="true" data-kind="Message"> 12 Messages </th> </tr> </thead> <tbody> <tr> <td>:book:</td> <td data-sticky="false">Linting Aerial with this PR took 2.75s vs 2.74s on master (0% slower)</td> </tr> <tr> <td>:book:</td> <td data-sticky="false">Linting Alamofire with this PR took 5.54s vs 5.43s on master (2% slower)</td> </tr> <tr> <td>:book:</td> <td data-sticky="false">Linting Firefox with this PR took 14.22s vs 13.9s on master (2% slower)</td> </tr> <tr> <td>:book:</td> <td data-sticky="false">Linting Kickstarter with this PR took 33.12s vs 28.97s on master (14% slower)</td> </tr> <tr> <td>:book:</td> <td data-sticky="false">Linting Moya with this PR took 2.81s vs 2.49s on master (12% slower)</td> </tr> <tr> <td>:book:</td> <td data-sticky="false">Linting Nimble with this PR took 2.68s vs 2.31s on master (16% slower)</td> </tr> <tr> <td>:book:</td> <td data-sticky="false">Linting Quick with this PR took 1.01s vs 0.94s on master (7% slower)</td> </tr> <tr> <td>:book:</td> <td data-sticky="false">Linting Realm with this PR took 5.28s vs 4.52s on master (16% slower)</td> </tr> <tr> <td>:book:</td> <td data-sticky="false">Linting SourceKitten with this PR took 1.89s vs 1.61s on master (17% slower)</td> </tr> <tr> <td>:book:</td> <td data-sticky="false">Linting Sourcery with this PR took 5.41s vs 4.9s on master (10% slower)</td> </tr> <tr> <td>:book:</td> <td data-sticky="false">Linting Swift with this PR took 36.83s vs 37.04s on master (0% faster)</td> </tr> <tr> <td>:book:</td> <td data-sticky="false">Linting WordPress with this PR took 31.86s vs 31.77s on master (0% slower)</td> </tr> </tbody> </table>

<p align="right" data-meta="generated_by_danger"> Generated by :no_entry_sign: <a href="https://danger.systems/">Danger</a> </p>

PaulTaykalo

comment created time in 4 hours

startedrealm/SwiftLint

started time in 5 hours

delete branch realm/realm-core

delete branch : js/query-equals-fix

delete time in 6 hours

delete branch realm/realm-core

delete branch : js/query-inclusions-faster

delete time in 6 hours

delete branch realm/realm-core

delete branch : js/performance_update

delete time in 6 hours

PR closed realm/realm-core

Regenerate some benchmarks WIP T-Internal

Looks like we lost the benchmarks cache for v10, so this is just triggering CI to recreate those.

+19 -15

2 comments

3 changed files

ironage

pr closed time in 6 hours

fork victorpanitz/SwiftLint

A tool to enforce Swift style and conventions.

https://realm.io

fork in 7 hours

fork laurielaptop/realm-loginkit

A generic interface for logging in to Realm Mobile Platform apps

fork in 8 hours

startedrealm/realm-cocoa

started time in 8 hours

pull request commentrealm/realm-cocoa

SwiftUI + Combine Support

Yep @tgoyne, I'm going with that solution for now. I just posted a follow up answer to that post with a wrapper function I wrote. Thanks a lot for the advice there.

jsflax

comment created time in 9 hours

pull request commentrealm/realm-cocoa

SwiftUI + Combine Support

AFAIK the workaround I suggested in the linked SO question handles deletions correctly, and if it does not always work I would like to know what cases still need something else.

jsflax

comment created time in 9 hours

startedrealm/SwiftLint

started time in 9 hours

issue commentrealm/realm-js

Missing Realm constructor. Did you run "react-native link realm"?

@kneth, so let us know, the developers are waiting for their projects to be developed and so on.

Yieron

comment created time in 10 hours

issue commentrealm/SwiftLint

Rule Request: Properly formatted TODO comments

I personally think that having another rule is easier for users as it gives them more choices (which rule to enable/disable, allow them to disable locally, etc)

sindresorhus

comment created time in 10 hours

startedrealm/SwiftLint

started time in 10 hours

issue closedrealm/SwiftLint

Todo rule does not match variations in to do grammar

New Issue Checklist

Describe the bug

If you enter a to do item as // todo or //to do: then Swiftlint does not count it because the prefix is lowercase or separated into two words.

closed time in 10 hours

iliaskarim

issue commentrealm/SwiftLint

Rule Request: Properly formatted TODO comments

@marcelofabri Should markrule be expanded to also account for todo's and renamed? That seems to make more sense than having a todorule, markrule, and todoformatting rule, for instance.

sindresorhus

comment created time in 10 hours

fork alpamys-qanybet/realm-js

Realm is a mobile database: an alternative to SQLite & key-value stores

https://realm.io

fork in 11 hours

issue commentrealm/SwiftLint

Todo rule does not match variations in to do grammar

This is by design as Xcode only recognizes // TODO: x

Screen Shot 2019-10-16 at 9 59 00 AM

iliaskarim

comment created time in 11 hours

pull request commentrealm/realm-cocoa

SwiftUI + Combine Support

@plivesey The current workaround is to create a view model that wraps your RealmObject and map your realm list to a standard Array:

class Dog : RealmObject {
    dynamic var name: String
}

class DogViewModel {
    let name: String

    init(_ dog: Dog) {
        self.name = dog.name
    }
}

We understand that this is not ideal and our current project addresses the deletion issue.

jsflax

comment created time in 12 hours

pull request commentrealm/realm-cocoa

SwiftUI + Combine Support

Any updates on this/any ETA? I'm looking to launch soon, but the crash on delete is a blocker. Does this PR fix that problem or have you worked out a workaround yet that I could implement on my side?

Thanks for all the work here 🙏 . If it's useful to have a real app to test this in, I'd be happy to help.

jsflax

comment created time in 12 hours

startedrealm/realm-js

started time in 12 hours

issue commentrealm/realm-js

Realm.List inherited functions seem missing in jest test

@kneth, I don't think this issue is specific to jest per-se though it is very much related to how jest uses vm.runInNewContext(). It appears that Realm.List instances do not have their prototype installed correctly when Realm is loaded from a separate context and are missing the properties from Realm.Collection.prototype.

const assert = require('assert');
const vm = require('vm');

function main() {
  const code = `
const Realm = require('realm');

const realm = new Realm({
  schema: [
    {
      name: 'PersonList',
      properties: {
        list: 'PersonObject[]',
      },
    },
    {
      name: 'PersonObject',
      properties: {
        name: 'string',
        age: 'double',
      },
    },
  ],
  deleteRealmIfMigrationNeeded: true,
});

realm.write(() => realm.deleteAll());

let object;
realm.write(() => {
  object = realm.create('PersonList', {list: [
    {name: 'Ari', age: 10},
    {name: 'Tim', age: 11},
    {name: 'Bjarne', age: 12},
  ]});
});

const methods = [];
let current = object.list;
do {
  methods.push(
    ...Object.getOwnPropertyNames(current).filter(prop => typeof object.list[prop] === 'function'));
} while ((current = Object.getPrototypeOf(current)));

realm.close();

new Set(methods);
`;

  const methodsInNewContext = vm.runInNewContext(code, {console, require});

  global.require = require;
  const methodsInThisContext = vm.runInThisContext(code);

  const difference = Array.from(
      new Set(
          [...methodsInThisContext].filter(x => !methodsInNewContext.has(x)))).sort();

  assert.deepStrictEqual(difference, []);
}

main();
AssertionError [ERR_ASSERTION]: Input A expected to strictly deep-equal input B:
+ expected - actual

- [
-   'concat',
-   'entries',
-   'every',
-   'filter',
-   'find',
-   'findIndex',
-   'forEach',
-   'join',
-   'keys',
-   'lastIndexOf',
-   'map',
-   'reduce',
-   'reduceRight',
-   'slice',
-   'some',
-   'values'
- ]
+ []
peteroid

comment created time in 13 hours

push eventrealm/realm-core

Jørgen Edelbo

commit sha 84f0b12ea477f93af185c397e353c2f6b394481d

Add ConstObj::get_object_id() Change-Id: If858d07c61c050a66463cbeb5e68e9d20661e4b9

view details

push time in 13 hours

push eventrealm/realm-core

Jørgen Edelbo

commit sha 9faffd09632f5c7121355f67a6616b5d06381878

Modify assert in Query::and_query In Core-5 you could get away with just comparing the pointers to the linklist as the accessor object would be cached and reused. This is not the case on Core-6 so now we just ensure that the tho lists are referring to the same column in the same object. Change-Id: I0294217a35f3570bc8c3077ff0d6a259996633e7

view details

Jørgen Edelbo

commit sha 3c75a001491b3f0d90cdf25eb4138caa7d151c53

Fix opening a file with the size being a multiplum of 64MB Change-Id: I4837639748c549f1c7bdabf430173962df843607

view details

Jørgen Edelbo

commit sha 5e55c567c75691877d1dcf820a8839ec699ee378

Add ConstObj::get_object_id() Change-Id: If858d07c61c050a66463cbeb5e68e9d20661e4b9

view details

push time in 13 hours

issue openedrealm/SwiftLint

Todo rule does not match variations in to do grammar

New Issue Checklist

Describe the bug

If you enter a to do item as // todo or //to do: then Swiftlint does not count it because the prefix is lowercase or separated into two words.

created time in 13 hours

issue commentrealm/realm-cocoa

Crash on write

Hey - looks like you forgot to add a T-* label - could you please add one (if you have access to add labels)?

liakhandrii

comment created time in 13 hours

issue commentrealm/realm-cocoa

Crash on write

I discovered this is related to #6268

liakhandrii

comment created time in 13 hours

issue closedrealm/realm-cocoa

Crash on write

<!---

Questions: If you have questions about HOW TO USE Realm, ask on StackOverflow, or in our Swift Forum or Obj-C Forum.

Feature Request: Just fill in the first two sections below.

Bugs: To help you as fast as possible with an issue please describe your issue and the steps you have taken to reproduce it in as many details as possible.

-->

Goals

Write an object to Realm.

Expected Results

Object is saved and the app continues working.

Actual Results

The app crashes with this stack trace:

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Application Specific Information:
abort() called

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	0x00007fff6d7c547a __pthread_kill + 10
1   libsystem_pthread.dylib       	0x00007fff6d882707 pthread_kill + 384
2   libsystem_c.dylib             	0x00007fff6d74da08 abort + 120
3   org.cocoapods.Realm           	0x000000010b847099 please_report_this_error_to_help_at_realm_dot_io + 9
4   org.cocoapods.Realm           	0x000000010b84735c realm::util::terminate_internal(std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) + 140
5   org.cocoapods.Realm           	0x000000010b847516 realm::util::terminate(char const*, char const*, long, std::initializer_list<realm::util::Printable>&&) + 390
6   org.cocoapods.Realm           	0x000000010b6be1da void realm::util::terminate<unsigned long long, int>(char const*, char const*, long, unsigned long long, int) + 58
7   org.cocoapods.Realm           	0x000000010b909fac realm::sync::TableInfoCache::get_table_info(unsigned long) const + 2092
8   org.cocoapods.Realm           	0x000000010b90aafb realm::sync::create_object_with_primary_key(realm::sync::TableInfoCache const&, realm::Table&, realm::util::Optional<long long>) + 43
9   org.cocoapods.Realm           	0x000000010b547738 realm::Object realm::Object::create<objc_object* __strong, RLMAccessorContext>(RLMAccessorContext&, std::__1::shared_ptr<realm::Realm> const&, realm::ObjectSchema const&, objc_object* __strong, bool, bool, unsigned long, realm::BasicRow<realm::Table>*) + 504
10  org.cocoapods.Realm           	0x000000010b54742b RLMAddObjectToRealm + 409
11  andriiliakh.Instant-Translate 	0x000000010af89639 partial apply for closure #3 in HistoryManager.addRecordToHistory(_:json:newServerId:) + 25
12  org.cocoapods.RealmSwift      	0x000000010bdc9328 Realm.write(withoutNotifying:_:) + 56
13  andriiliakh.Instant-Translate 	0x000000010af85163 HistoryManager.addRecordToHistory(_:json:newServerId:) + 6691
14  andriiliakh.Instant-Translate 	0x000000010af8372c HistoryManager.addRecordToHistory(json:) + 172
15  andriiliakh.Instant-Translate 	0x000000010af3fb2e closure #3 in closure #1 in TranslateViewController.translate(autoswap:) + 654
16  andriiliakh.Instant-Translate 	0x000000010aecd7c9 thunk for @escaping @callee_guaranteed () -> () + 25
17  libdispatch.dylib             	0x00007fff6d625553 _dispatch_call_block_and_release + 12
18  libdispatch.dylib             	0x00007fff6d6264de _dispatch_client_callout + 8
19  libdispatch.dylib             	0x00007fff6d631bd3 _dispatch_main_queue_callback_4CF + 1105
20  com.apple.CoreFoundation      	0x00007fff36378290 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
21  com.apple.CoreFoundation      	0x00007fff363779da __CFRunLoopRun + 2370
22  com.apple.CoreFoundation      	0x00007fff36376e13 CFRunLoopRunSpecific + 499
23  com.apple.HIToolbox           	0x00007fff34f03b2d RunCurrentEventLoopInMode + 292
24  com.apple.HIToolbox           	0x00007fff34f0386d ReceiveNextEventCommon + 600
25  com.apple.HIToolbox           	0x00007fff34f035f7 _BlockUntilNextEventMatchingListInModeWithFilter + 64
26  com.apple.AppKit              	0x00007fff33599ac4 _DPSNextEvent + 990
27  com.apple.AppKit              	0x00007fff33598834 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1352
28  com.apple.AppKit              	0x00007fff33592fd4 -[NSApplication run] + 658
29  com.apple.AppKit              	0x00007fff33584e7d NSApplicationMain + 777
30  andriiliakh.Instant-Translate 	0x000000010aeb4ef9 main + 9
31  libdyld.dylib                 	0x00007fff6d676405 start + 1

Steps to Reproduce

Unknown, happens on a small number of devices. I can't reproduce it on any of ~20 machines I tried.

Code Sample

let newRecord = HistoryRecord()
        
newRecord.timestamp = timestamp
newRecord.sourceLanguage = from
newRecord.targetLanguage = to
newRecord.json = json.rawString() ?? ""
newRecord.serverId = newServerId ?? serverId ?? 0
        
newRecord.text = text
        
do {
    try realm.write {
        realm.add(newRecord)
    }
} catch let error {
    NSLog("\(error)")
}

Model:

class HistoryRecord: Object {
    
    @objc dynamic var json = ""
    @objc dynamic var sourceLanguage = ""
    @objc dynamic var targetLanguage = ""
    @objc dynamic var text = ""
    @objc dynamic var timestamp: Int64 = 0
    @objc dynamic var needsUpdate = false
    @objc dynamic var serverId: Int = 0
    @objc dynamic var isDeleted: Bool = false
    
    override class func primaryKey() -> String? {
        return "timestamp"
    }
}

Version of Realm and Tooling

<!--- In the CONTRIBUTING guidelines, you will find a script, which will help determining some of these versions. --> Realm framework version: 3.19.0

Realm Object Server version: -

Xcode version: 11.1 / 10

iOS/OSX version: 10.15 / 10.14

Dependency manager + version: CocoaPods 1.7.5

closed time in 13 hours

liakhandrii

push eventrealm/realm-core

Jørgen Edelbo

commit sha 9a13bda11b7d15a53d3f30c8aade5b22f3c08b97

Fix opening a file with the size being a multiplum of 64MB Change-Id: I4837639748c549f1c7bdabf430173962df843607

view details

Jørgen Edelbo

commit sha be0c05bd4ec016ac37840399d3f72b1cd466f9b2

Add ConstObj::get_object_id() Change-Id: If858d07c61c050a66463cbeb5e68e9d20661e4b9

view details

push time in 14 hours

startedrealm/realm-js

started time in 14 hours

push eventrealm/realm-core

Jørgen Edelbo

commit sha 81696eefac50cab71d8bf2d206f157c17ad07787

Fix opening a file with the size being a multiplum of 64MB Change-Id: I4837639748c549f1c7bdabf430173962df843607

view details

push time in 15 hours

fork mohamed7420/realm-cocoa

Realm is a mobile database: a replacement for Core Data & SQLite

https://realm.io

fork in 15 hours

issue commentrealm/realm-js

Realm.List inherited functions seem missing in jest test

See also https://github.com/facebook/jest/issues/4603

peteroid

comment created time in 16 hours

issue commentrealm/SwiftLint

Crash in NoSpaceInMethodCallRule

thanks @marcelofabri

macdrevx

comment created time in 16 hours

pull request commentrealm/realm-core

Modify assert in Query::and_query

Hey - looks like you forgot to add a T-* label - could you please add one (if you have access to add labels)?

jedelbo

comment created time in 16 hours

PR opened realm/realm-core

Modify assert in Query::and_query

In Core-5 you could get away with just comparing the pointers to the linklist as the accessor object would be cached and reused. This is not the case on Core-6 so now we just ensure that the tho lists are referring to the same column in the same object.

+33 -1

0 comment

3 changed files

pr created time in 16 hours

push eventrealm/realm-core

Jørgen Edelbo

commit sha 7eee9c4e98f7929e766298320132490c4021d5d6

Modify assert in Query::and_query In Core-5 you could get away with just comparing the pointers to the linklist as the accessor object would be cached and reused. This is not the case on Core-6 so now we just ensure that the tho lists are referring to the same column in the same object. Change-Id: I0294217a35f3570bc8c3077ff0d6a259996633e7

view details

push time in 16 hours

create barnchrealm/realm-core

branch : je/fix

created branch time in 16 hours

issue closedrealm/realm-core

Core-6: DB::close_internal will crash if replication object is dead

In Core-6 you can have the situation that a DB object outlives the replication object that was used to construct it. If this happens, the program will core dump as a virtual function is called on the now deceased object.

closed time in 17 hours

jedelbo

issue openedrealm/realm-cocoa

Crash on write

<!---

Questions: If you have questions about HOW TO USE Realm, ask on StackOverflow, or in our Swift Forum or Obj-C Forum.

Feature Request: Just fill in the first two sections below.

Bugs: To help you as fast as possible with an issue please describe your issue and the steps you have taken to reproduce it in as many details as possible.

-->

Goals

Write an object to Realm.

Expected Results

Object is saved and the app continues working.

Actual Results

The app crashes with this stack trace:

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Application Specific Information:
abort() called

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	0x00007fff6d7c547a __pthread_kill + 10
1   libsystem_pthread.dylib       	0x00007fff6d882707 pthread_kill + 384
2   libsystem_c.dylib             	0x00007fff6d74da08 abort + 120
3   org.cocoapods.Realm           	0x000000010b847099 please_report_this_error_to_help_at_realm_dot_io + 9
4   org.cocoapods.Realm           	0x000000010b84735c realm::util::terminate_internal(std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) + 140
5   org.cocoapods.Realm           	0x000000010b847516 realm::util::terminate(char const*, char const*, long, std::initializer_list<realm::util::Printable>&&) + 390
6   org.cocoapods.Realm           	0x000000010b6be1da void realm::util::terminate<unsigned long long, int>(char const*, char const*, long, unsigned long long, int) + 58
7   org.cocoapods.Realm           	0x000000010b909fac realm::sync::TableInfoCache::get_table_info(unsigned long) const + 2092
8   org.cocoapods.Realm           	0x000000010b90aafb realm::sync::create_object_with_primary_key(realm::sync::TableInfoCache const&, realm::Table&, realm::util::Optional<long long>) + 43
9   org.cocoapods.Realm           	0x000000010b547738 realm::Object realm::Object::create<objc_object* __strong, RLMAccessorContext>(RLMAccessorContext&, std::__1::shared_ptr<realm::Realm> const&, realm::ObjectSchema const&, objc_object* __strong, bool, bool, unsigned long, realm::BasicRow<realm::Table>*) + 504
10  org.cocoapods.Realm           	0x000000010b54742b RLMAddObjectToRealm + 409
11  andriiliakh.Instant-Translate 	0x000000010af89639 partial apply for closure #3 in HistoryManager.addRecordToHistory(_:json:newServerId:) + 25
12  org.cocoapods.RealmSwift      	0x000000010bdc9328 Realm.write(withoutNotifying:_:) + 56
13  andriiliakh.Instant-Translate 	0x000000010af85163 HistoryManager.addRecordToHistory(_:json:newServerId:) + 6691
14  andriiliakh.Instant-Translate 	0x000000010af8372c HistoryManager.addRecordToHistory(json:) + 172
15  andriiliakh.Instant-Translate 	0x000000010af3fb2e closure #3 in closure #1 in TranslateViewController.translate(autoswap:) + 654
16  andriiliakh.Instant-Translate 	0x000000010aecd7c9 thunk for @escaping @callee_guaranteed () -> () + 25
17  libdispatch.dylib             	0x00007fff6d625553 _dispatch_call_block_and_release + 12
18  libdispatch.dylib             	0x00007fff6d6264de _dispatch_client_callout + 8
19  libdispatch.dylib             	0x00007fff6d631bd3 _dispatch_main_queue_callback_4CF + 1105
20  com.apple.CoreFoundation      	0x00007fff36378290 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
21  com.apple.CoreFoundation      	0x00007fff363779da __CFRunLoopRun + 2370
22  com.apple.CoreFoundation      	0x00007fff36376e13 CFRunLoopRunSpecific + 499
23  com.apple.HIToolbox           	0x00007fff34f03b2d RunCurrentEventLoopInMode + 292
24  com.apple.HIToolbox           	0x00007fff34f0386d ReceiveNextEventCommon + 600
25  com.apple.HIToolbox           	0x00007fff34f035f7 _BlockUntilNextEventMatchingListInModeWithFilter + 64
26  com.apple.AppKit              	0x00007fff33599ac4 _DPSNextEvent + 990
27  com.apple.AppKit              	0x00007fff33598834 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1352
28  com.apple.AppKit              	0x00007fff33592fd4 -[NSApplication run] + 658
29  com.apple.AppKit              	0x00007fff33584e7d NSApplicationMain + 777
30  andriiliakh.Instant-Translate 	0x000000010aeb4ef9 main + 9
31  libdyld.dylib                 	0x00007fff6d676405 start + 1

Steps to Reproduce

Unknown, happens on a small number of devices. I can't reproduce it on any of ~20 machines I tried.

Code Sample

let newRecord = HistoryRecord()
        
newRecord.timestamp = timestamp
newRecord.sourceLanguage = from
newRecord.targetLanguage = to
newRecord.json = json.rawString() ?? ""
newRecord.serverId = newServerId ?? serverId ?? 0
        
newRecord.text = text
        
do {
    try realm.write {
        realm.add(newRecord)
    }
} catch let error {
    NSLog("\(error)")
}

Model:

class HistoryRecord: Object {
    
    @objc dynamic var json = ""
    @objc dynamic var sourceLanguage = ""
    @objc dynamic var targetLanguage = ""
    @objc dynamic var text = ""
    @objc dynamic var timestamp: Int64 = 0
    @objc dynamic var needsUpdate = false
    @objc dynamic var serverId: Int = 0
    @objc dynamic var isDeleted: Bool = false
    
    override class func primaryKey() -> String? {
        return "timestamp"
    }
}

Version of Realm and Tooling

<!--- In the CONTRIBUTING guidelines, you will find a script, which will help determining some of these versions. --> Realm framework version: 3.19.0

Realm Object Server version: -

Xcode version: 11.1 / 10

iOS/OSX version: 10.15 / 10.14

Dependency manager + version: CocoaPods 1.7.5

created time in 17 hours

delete branch realm/realm-core

delete branch : je/fix-db-issue

delete time in 17 hours

push eventrealm/realm-core

Jørgen Edelbo

commit sha 5a38b6c34e660e0a2b3bcfa9a79dde5d99b6482a

Fix issue with DB outliving Replication object Change-Id: Ifd0dfc6c39edbcd3d0299da43210e54880d5da44

view details

push time in 17 hours

PR merged realm/realm-core

Fix issue with DB outliving Replication object T-Bug-Crash

Change-Id: Ifd0dfc6c39edbcd3d0299da43210e54880d5da44

+30 -9

0 comment

2 changed files

jedelbo

pr closed time in 17 hours

startedrealm/jazzy

started time in 17 hours

issue commentrealm/realm-cocoa

Assertion failed: previous <= m_schema_transaction_version_max

I'm seeing this crash on versions 3.18.0 and 3.19.0 after migrating to Xcode 11 from version 3.16.0. I can replicate this when running unit tests from a clean simulator (which becomes an problem on CI). As a solution I ended up upgrading from version 3.16.0 to 3.17.3.

fishfisher

comment created time in 17 hours

push eventrealm/realm-js

Kenneth Geisshirt

commit sha b1871017b633c80f71cee45c30cb4bcdbaa14c03

Explaning opening behavior a bit better (#2558) * Explaning opening behavior a bit better Co-Authored-By: Christian Melchior <christian@ilios.dk>

view details

push time in 17 hours

delete branch realm/realm-js

delete branch : kneth/fix-async-open-doc

delete time in 17 hours

PR merged realm/realm-js

Explaning opening behavior a bit better T-Doc
+18 -7

0 comment

1 changed file

kneth

pr closed time in 17 hours

startedrealm/realm-js

started time in 19 hours

issue openedrealm/realm-cocoa

App Extension - Memory -

Hi, we use real for our app extension but realm require too memory, we have introduce the objectTypes in config but do not change.

Exists a system for limit the memory for realm ?

Thanks

Schermata 2019-10-15 alle 14 47 25

created time in 19 hours

startedrealm/realm-graphql

started time in 19 hours

startedrealm/SwiftLint

started time in 20 hours

push eventrealm/realm-core

Thomas Goyne

commit sha 458b712a24a6ee359b3e7fdbddc2953ae03cbca4

Generate debug symbols for MinSizeDebug builds

view details

Thomas Goyne

commit sha da6332798e60a403b39ca2b1c011f76323572d98

Preserve subcolumn attributes (i.e. nullability) when migrating to lists

view details

Jørgen Edelbo

commit sha 7a80a8691bd22a208d7d9e2afe5ebe93fb8ba27c

Merge pull request #3420 from realm/tg/migrate-nullable-list Preserve the nullable attribute when migrating subtables to lists

view details

push time in 20 hours

delete branch realm/realm-core

delete branch : tg/migrate-nullable-list

delete time in 20 hours

fork brunodossantosrocha1510/SwiftLint

A tool to enforce Swift style and conventions.

https://realm.io

fork in 20 hours

push eventrealm/realm-core

Jørgen Edelbo

commit sha 86cc13cb0868a5a914aa2cb1967d5e0d561e1951

Fix issue with DB outliving Replication object Change-Id: Ifd0dfc6c39edbcd3d0299da43210e54880d5da44

view details

push time in 20 hours

issue commentrealm/realm-graphql

Add ability to append elements to an array

Currently when we want to edit an array by adding an element we need to create a mutation with the full list of existing elements plus the new one, am I correct?

Hey, just a question , have you done the above mentioned method with Entities instead of scalar types. Example -> ConversationEntity consists a list of MessageEntities. To add a new messageentity in conversationEntity i am mutating a new message entity and in the backend a listner attached to messageentities is attaching the message to the conversationEntity.

Can i mutate directly to conversationEntity so there is no need for a listner?

Regards.

pierre-moire

comment created time in 20 hours

fork 417-72KI/SwiftLint

A tool to enforce Swift style and conventions.

https://realm.io

fork in 21 hours

push eventrealm/realm-js

push time in 21 hours

startedrealm/realm-js

started time in 21 hours

issue commentrealm/realm-java

Error:Execution failed for task

For macOS, following @Mahdihp's suggestion, do this in terminal: rm -rf ~/Library/Android/sdk/ndk-bundle

worked for me

Mahdihp

comment created time in 21 hours

startedrealm/realm-cocoa

started time in a day

issue closedrealm/SwiftLint

Crash in NoSpaceInMethodCallRule

New Issue Checklist

Describe the bug

Crash in NoSpaceInMethodCallRule

Complete output when running SwiftLint, including the stack trace and command used
$ swiftlint lint

Environment

  • SwiftLint version (run swiftlint version to be sure)? 0.35.0
  • Installation method used (Homebrew, CocoaPods, building from source, etc)? Homebrew
  • Paste your configuration file:

https://github.com/GEOSwift/GEOSwift/blob/misc-updates/.swiftlint.yml https://github.com/GEOSwift/GEOSwift/blob/misc-updates/GEOSwiftTests/.swiftlint.yml

  • Which Xcode version are you using (check xcode-select -p)? Xcode 11.1

Steps to reproduce

  • Clone https://github.com/GEOSwift/GEOSwift.git
  • checkout branch misc-updates
  • Run $ swiftlint lint in the repo root

closed time in a day

macdrevx

issue commentrealm/SwiftLint

Crash in NoSpaceInMethodCallRule

Duplicate of #2793

macdrevx

comment created time in a day

startedrealm/SwiftLint

started time in a day

fork zyunique/realm-cocoa

Realm is a mobile database: a replacement for Core Data & SQLite

https://realm.io

fork in a day

startedrealm/SwiftLint

started time in a day

startedrealm/realm-js

started time in a day

issue commentrealm/SwiftLint

"illegal hardware instruction"

Similar crash happens under $ swiftlint autocorrect

macdrevx

comment created time in a day

issue openedrealm/SwiftLint

"illegal hardware instruction"

New Issue Checklist

Describe the bug

Crash in NoSpaceInMethodCallRule

Complete output when running SwiftLint, including the stack trace and command used
$ swiftlint lint

Environment

  • SwiftLint version (run swiftlint version to be sure)? 0.35.0
  • Installation method used (Homebrew, CocoaPods, building from source, etc)? Homebrew
  • Paste your configuration file:

https://github.com/GEOSwift/GEOSwift/blob/misc-updates/.swiftlint.yml https://github.com/GEOSwift/GEOSwift/blob/misc-updates/GEOSwiftTests/.swiftlint.yml

  • Which Xcode version are you using (check xcode-select -p)? Xcode 11.1

Steps to reproduce

  • Clone https://github.com/GEOSwift/GEOSwift.git
  • checkout branch misc-updates
  • Run $ swiftlint lint in the repo root

created time in a day

startedrealm/realm-cocoa

started time in a day

startedrealm/realm-java

started time in a day

delete branch realm/realm-object-store

delete branch : jas/benchmarks

delete time in a day

push eventrealm/realm-object-store

James Stone

commit sha 30fc0f25b8620b5b9cd77df64b44c6f2fa6ddb6e

Add some basic benchmarks (#860) * Added some basic benchmarks * Do not compile benchmarks by default

view details

push time in a day

PR merged realm/realm-object-store

Add some basic benchmarks T-Internal

This is mostly to set up the benchmarking framework with some examples.

Although Catch2 supports intermixing benchmarks and unit tests, I chose to separate out the benchmarks into a different target. This separation means no increase in compile times for the unit tests, and no mixed output between tests and benchmarks.

The benchmark documentation is here

+461 -0

0 comment

5 changed files

ironage

pr closed time in a day

delete branch realm/realm-object-store

delete branch : jas/upgrade-catch2

delete time in a day

push eventrealm/realm-object-store

James Stone

commit sha 22e91e2b2d15c354779d53a389ae2a0ed076161c

Upgrade Catch2 to 2.10.0 (#861)

view details

push time in a day

PR merged realm/realm-object-store

Upgrade Catch2 to 2.10.0 T-Internal

Catch2 was released this weekend with a workaround for old compilers (aka our ancient android ndk r10e) missing support for std::nextafter by using a config CATCH_CONFIG_GLOBAL_NEXTAFTER. The release just means we no longer have to manually generate the header file.

Release notes.

+1 -2

0 comment

2 changed files

ironage

pr closed time in a day

push eventrealm/realm-object-store

Thomas Goyne

commit sha 2ba4e52d1f234a39cdf73eb743cd59e6b906da77

Implement index_of on sorted/distinct List

view details

push time in a day

push eventrealm/realm-cocoa

Thomas Goyne

commit sha faedb61d287f0cc32c1a92cdde72cd73b2f17977

Update to core 6

view details

push time in a day

push eventrealm/realm-object-store

James Stone

commit sha 042cfd155c7d812e4de9197a8c36cbe0cb7562a9

Do not compile benchmarks by default

view details

push time in a day

startedrealm/realm-cocoa

started time in a day

PR opened realm/realm-object-store

Reviewers
Upgrade Catch2 to 2.10.0 T-Internal

Catch2 was released this weekend with a workaround for old compilers (aka our ancient android ndk r10e) missing support for std::nextafter by using a config CATCH_CONFIG_GLOBAL_NEXTAFTER. The release just means we no longer have to manually generate the header file.

Release notes.

+1 -2

0 comment

2 changed files

pr created time in a day

create barnchrealm/realm-object-store

branch : jas/upgrade-catch2

created branch time in a day

PR opened realm/realm-object-store

Reviewers
Add some basic benchmarks T-Internal

This is mostly to set up the benchmarking framework with some examples.

Although Catch2 supports intermixing benchmarks and unit tests, I chose to separate out the benchmarks into a different target. This separation means no increase in compile times for the unit tests, and no mixed output between tests and benchmarks.

The benchmark documentation is here

+458 -0

0 comment

5 changed files

pr created time in a day

create barnchrealm/realm-object-store

branch : jas/benchmarks

created branch time in a day

startedrealm/SwiftLint

started time in a day

startedrealm/realm-java

started time in a day

issue commentrealm/realm-js

NetworkError: Failed to execute 'send' on 'XMLhttpRequest'...

Yeah, but actually resolved with: adb kill-server && adb root && adb reverse tcp:8081 tcp:8081 && adb forward tcp:8082 tcp:8082 && adb forward tcp:8083 tcp:8083

And also: https://github.com/realm/realm-js/issues/578#issuecomment-314481708 But localhost:8083, instead of localhost:8082

BravenxX

comment created time in a day

more