Xcode 11 - dynamic_cast error 1: Both of the following type_info's should have public visibility

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintableJSON

      Goals

      Update Xcode from 10.2 to 11 Beta (seed 2)

      Expected Results

      My app runs just as before the update

      Actual Results

      Realm is causing an thread exception that surfaces on Xcode as:

      #7	0x0000000100a4d4dc in realm::object_name(realm::Table const&) at /node_modules/realm/src/object-store/src/list.cpp:72
      

      Specifically:

      70 static StringData object_name(Table const& table)
      71 {
      72     return ObjectStore::object_type_for_table_name(table.get_name());
      73 }
      

      I see the following in Xcode's output console:

      dynamic_cast error 1: Both of the following type_info's should have public visibility. At least one of them is hidden. N5realm5ArrayE, N5realm12ArrayIntegerE.
      /Users/realm/workspace/realm_realm-core_release_5.23.2/src/realm/table.hpp:1774: [realm-core-5.23.4] Assertion failed: dynamic_cast<Parent*>(parent)
      0 Realm 0x0000000104c9df14 ZN5realm4utilL18terminate_internalERNSt3_118basic_stringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 28
      1 Realm 0x0000000104c9e174 _ZN5realm4util9terminateEPKcS2_lOSt16initializer_listINS0_9PrintableEE + 324

      Steps to Reproduce

      The above exception occurs when trying to push to an array as follows

      Code Sample

        // This returns the contact using realm.objectForPrimaryKey
        let contact = getContact(contactId); 
        if (contact.notes.length === 0) {
          realm.write(() => {
            //  *** Breaks here ***
            contact.notes.push({
              contactId: contactId,
              notes: [],
            });
          });
        }
      

      Simplified schema:

      export const Contact = {
        name: 'Contact',
        primaryKey: 'id',
      
        properties: {
          id: {type: 'string'},
          notes: {type: 'list', objectType: 'Notes'},
        }
      };
      
      export const Notes = {
        name: 'Notes',
        primaryKey: 'contactId',
        properties: {
          contactId: {type: 'string'},
          notes: {type: 'list', objectType: 'Note'},
        }
      };
      
      export const Note = {
        name: 'Note',
        primaryKey: 'id',
        properties: {
          id: {type: 'string'},
          createdTimestamp: {type: 'int'},
          note: {type: 'string'},
          sync:{type:'Sync'},
          owner: {type: 'linkingObjects', objectType: 'Notes', property: 'notes'},
        }
      };
      

      Version of Realm and Tooling

      • Realm JS SDK Version: 3.0.0 (also happening on 2.28.0)
      • Node or React Native: React Native
      • Client OS & Version: iOS 13.0
      • Which debugger for React Native: None

            Assignee:
            Unassigned
            Reporter:
            Unito Sync Bot
            Archiver:
            Marc Greenfield

              Created:
              Updated:
              Resolved:
              Archived: