[ https://issues.apache.org/jira/browse/ARROW-15669?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yifei Yang updated ARROW-15669: ------------------------------- Attachment: stacktrace-mac-exception.txt > "std::bad_cast" on mac os when reading from FlightStreamReader > -------------------------------------------------------------- > > Key: ARROW-15669 > URL: https://issues.apache.org/jira/browse/ARROW-15669 > Project: Apache Arrow > Issue Type: Bug > Components: FlightRPC > Affects Versions: 6.0.0, 7.0.0 > Reporter: Yifei Yang > Priority: Major > Attachments: FlightMacExceptionTest.cpp, Main.cpp, > stacktrace-mac-exception.txt > > > When calling "FlightStreamReader::ReadAll()", got "std::bad_cast exception" > (this is on 6.0.0, on 7.0.0 got "segmentation violation signal"). This > happens only on mac os, it works fine on linux (tested on ubuntu). > Code snippet: > Construction of FlightDataStream inside server's DoGet(): > {{auto schema = ::arrow::schema({}} > {{ > {field("f0", ::arrow::int32())} > ,}} > {{ > {field("f1", ::arrow::int32())} > ,}} > {{ > {field("f2", ::arrow::int32())} > ,}} > {{});}} > {{auto array_0_0 = Arrays::make<::arrow::Int32Type>(\{0, 1, 2, 3, 4, 5, 6, 7, > 8, 9}).value();}} > {{auto array_0_1 = Arrays::make<::arrow::Int32Type>(\{10, 11, 12, 13, 14, 15, > 16, 17, 18, 19}).value();}} > {{auto array_0_2 = Arrays::make<::arrow::Int32Type>(\{20, 21, 22, 23, 24, 25, > 26, 27, 28, 29}).value();}} > {{auto rb_0 = ::arrow::RecordBatch::Make(schema, 10, \{array_0_0, array_0_1, > array_0_2});}} > {{auto rb_1 = ::arrow::RecordBatch::Make(schema, 10, \{array_0_0, array_0_1, > array_0_2});}} > {{auto rb_reader = ::arrow::RecordBatchReader::Make(\{rb_0, rb_1});}} > {{return std::make_unique<::arrow::flight::RecordBatchStream>(*rb_reader);}} > > Retrieve record batches from stream at client: > {{std::unique_ptr<::arrow::flight::FlightStreamReader> reader;}} > {{st = client->DoGet(ticket, &reader); // ticked is well constructed}} > {{{}std::shared_ptr<::arrow::Table> table;{}}}{{{}st = > reader->ReadAll(&table);{}}} > > Thanks! -- This message was sent by Atlassian Jira (v8.20.1#820001)