Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error handling (Jesper) #25

Closed
wants to merge 39 commits into from
Closed

Error handling (Jesper) #25

wants to merge 39 commits into from

Conversation

kspangsege
Copy link
Contributor

No description provided.

jjepsen and others added 30 commits October 15, 2013 17:06
see doc/error_handling for details.
note: don't forget to remove NSLog in group_shared_objc.mm
- Implements new error handling stragtegy for setters.
- Many duplicate methods (w. NSError) have been removed.
- Removes a unit test, which is no longer fitting.-
- Updated signature naming for table setters and getters.
See code comments for more information.
Tested via the example.
Unit tests do not test errors/exceptions yet.
Note: iPhone example and Doc examples are not yet updated accordingly.

Unit tests are passing.
Conflicts:
	doc/ref/examples/ex_objc_group_intro.m
	doc/ref/examples/ex_objc_sharedgroup_intro.m
	doc/ref/examples/ex_objc_table_dynamic_intro.m
	doc/ref/examples/ex_objc_table_typed_intro.m
	doc/ref/examples/ex_objc_table_typed_intro_with_many_comments.m
	src/tightdb/objc/cursor_objc.mm
	src/tightdb/objc/group_objc.mm
	src/tightdb/objc/group_shared_objc.mm
	src/tightdb/objc/helper_macros.h
	src/tightdb/objc/table.h
	src/tightdb/objc/table_objc.mm
	src/tightdb/objc/test/err_handling.mm
	src/tightdb/objc/test/get_subtable.m
	src/tightdb/objc/test/group_misc_2.m
	src/tightdb/objc/test/query.m
	src/tightdb/objc/test/shared_group.m
	src/tightdb/objc/test/table_delete_all.m
	src/tightdb/objc/tightdb.h
	src/tightdb/objc/tightdb.h.cheetah
	src/tightdb/objc/util.hpp
Conflicts:
	doc/ref/examples/ex_objc_sharedgroup_intro.m
	doc/ref/examples/ex_objc_table_typed_intro.m
	doc/ref/examples/ex_objc_table_typed_intro_with_many_comments.m
	src/tightdb/objc/group.h
	src/tightdb/objc/table.h
@kspangsege kspangsege closed this Feb 25, 2014
@kspangsege kspangsege deleted the error_handling branch February 25, 2014 10:34
@semireg semireg mentioned this pull request Jan 15, 2015
jpsim added a commit that referenced this pull request Feb 6, 2017
I'm not sure why this fixes the crash.

Traceback (most recent call last):
  File "/Users/jp/Library/Application Support/Realm/rlm_lldb.py", line 226, in RLMResults_SummaryProvider
    if not is_results_evaluated(obj):
  File "/Users/jp/Library/Application Support/Realm/rlm_lldb.py", line 213, in is_results_evaluated
    mode_query_value = next(m for m in mode_type.enum_members if m.name == 'Query').GetValueAsUnsigned()
StopIteration
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
  * frame #0: 0x00007fffcebe8ae6 libobjc.A.dylib`lookUpImpOrForward + 79
    frame #1: 0x00007fffcebe85d4 libobjc.A.dylib`_objc_msgSend_uncached + 68
    frame #2: Realm`-[RLMResults deleteObjectsFromRealm]::$_14::operator(this=0x00007fff5fbfb8c8)() const at RLMResults.mm:424
    frame #3: Realm`auto translateErrors<-[RLMResults deleteObjectsFromRealm]::$_14>(f=0x00007fff5fbfb8c8, aggregateMethod=0x0000000000000000) at RLMResults.mm:108
    frame #4: Realm`::-[RLMResults deleteObjectsFromRealm](self=0x000000010230bb10, _cmd="deleteObjectsFromRealm") at RLMResults.mm:417
    frame #5: Realm`::-[RLMRealm deleteObjects:](self=0x00006080000a2ca0, _cmd="deleteObjects:", array=(None[0])) at RLMRealm.mm:623
    frame #6: RealmSwift`Realm.delete<A where ...> (objects=<unavailable>, self=0x0000608000030040) -> () at Realm.swift:404
    frame #7: RealmSwift Tests`RealmTests.(realm=0x0000608000030040) -> ()).(closure #1) at RealmTests.swift:435
    frame #8: RealmSwift`Realm.write(block=0x0000000104a35270 RealmSwift Tests`RealmSwift_Tests.RealmTests.(testDeleteResults () -> ()).(closure #1) at RealmTests.swift:430, self=0x0000608000030040, $error=Error @ 0x00007fff5fbfbe40) throws -> ()) throws -> () at Realm.swift:124
    frame #9: RealmSwift Tests`RealmTests.testDeleteResults(self=0x0000608000089fb0) -> () at RealmTests.swift:437
    frame #10: RealmSwift Tests`@objc RealmTests.testDeleteResults() -> () at RealmTests.swift:0
    frame #11: 0x00007fffb9f733ec CoreFoundation`__invoking___ + 140
    frame #12: 0x00007fffb9f73271 CoreFoundation`-[NSInvocation invoke] + 289
    frame #13: 0x00000001000c847c XCTest`__24-[XCTestCase invokeTest]_block_invoke.234 + 50
    frame #14: 0x000000010010dcd6 XCTest`-[XCTMemoryChecker _assertInvalidObjectsDeallocatedAfterScope:] + 37
    frame #15: 0x00000001000c8040 XCTest`__24-[XCTestCase invokeTest]_block_invoke_2 + 665
    frame #16: 0x0000000100105916 XCTest`-[XCTestContext performInScope:] + 190
    frame #17: 0x00000001000c7d94 XCTest`-[XCTestCase invokeTest] + 254
    frame #18: RealmSwift Tests`TestCase.(self=0x0000608000089fb0) -> ()).(closure #1) at TestCase.swift:79
    frame #19: RealmSwift Tests`thunk at TestCase.swift:0
    frame #20: RealmSwift Tests`partial apply for thunk at TestCase.swift:0
    frame #21: 0x00000001021ef5c8 libswiftObjectiveC.dylib`ObjectiveC.autoreleasepool <A> (invoking : () throws -> A) throws -> A + 56
    frame #22: RealmSwift Tests`TestCase.invokeTest(self=0x0000608000089fb0) -> () at TestCase.swift:79
    frame #23: RealmSwift Tests`@objc TestCase.invokeTest() -> () at TestCase.swift:0
    frame #24: 0x00000001000c8803 XCTest`-[XCTestCase performTest:] + 565
    frame #25: 0x00000001000c5776 XCTest`__27-[XCTestSuite performTest:]_block_invoke + 300
    frame #26: 0x00000001000c5366 XCTest`-[XCTestSuite _performProtectedSectionForTest:testSection:] + 29
    frame #27: 0x00000001000c554c XCTest`-[XCTestSuite performTest:] + 214
    frame #28: 0x00000001000c5776 XCTest`__27-[XCTestSuite performTest:]_block_invoke + 300
    frame #29: 0x00000001000c5366 XCTest`-[XCTestSuite _performProtectedSectionForTest:testSection:] + 29
    frame #30: 0x00000001000c554c XCTest`-[XCTestSuite performTest:] + 214
    frame #31: 0x00000001000c5776 XCTest`__27-[XCTestSuite performTest:]_block_invoke + 300
    frame #32: 0x00000001000c5366 XCTest`-[XCTestSuite _performProtectedSectionForTest:testSection:] + 29
    frame #33: 0x00000001000c554c XCTest`-[XCTestSuite performTest:] + 214
    frame #34: 0x000000010011883c XCTest`__44-[XCTTestRunSession runTestsAndReturnError:]_block_invoke + 40
    frame #35: 0x00000001000dbe0e XCTest`-[XCTestObservationCenter _observeTestExecutionForBlock:] + 587
    frame #36: 0x00000001001186da XCTest`-[XCTTestRunSession runTestsAndReturnError:] + 281
    frame #37: 0x00000001000b11fb XCTest`-[XCTestDriver runTestsAndReturnError:] + 254
    frame #38: 0x0000000100107fc9 XCTest`_XCTestMain + 773
    frame #39: 0x00007fffb9f957dc CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
    frame #40: 0x00007fffb9f767e4 CoreFoundation`__CFRunLoopDoBlocks + 356
    frame #41: 0x00007fffb9f75f65 CoreFoundation`__CFRunLoopRun + 917
    frame #42: 0x00007fffb9f75974 CoreFoundation`CFRunLoopRunSpecific + 420
    frame #43: 0x00007fffb9501a5c HIToolbox`RunCurrentEventLoopInMode + 240
    frame #44: 0x00007fffb9501799 HIToolbox`ReceiveNextEventCommon + 184
    frame #45: 0x00007fffb95016c6 HIToolbox`_BlockUntilNextEventMatchingListInModeWithFilter + 71
    frame #46: 0x00007fffb7aa75b4 AppKit`_DPSNextEvent + 1120
    frame #47: 0x00007fffb8221d6b AppKit`-[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2789
    frame #48: 0x00007fffb7a9bf35 AppKit`-[NSApplication run] + 926
    frame #49: 0x00007fffb7a66850 AppKit`NSApplicationMain + 1237
    frame #50: TestHost`main(argc=5, argv=0x00007fff5fbfef58) at main.m:40
    frame #51: 0x00007fffcf4d9255 libdyld.dylib`start + 1
    frame #52: 0x00007fffcf4d9255 libdyld.dylib`start + 1
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants