[ 
https://issues.apache.org/jira/browse/ARROW-5700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16874773#comment-16874773
 ] 

Tham edited comment on ARROW-5700 at 6/28/19 8:38 AM:
------------------------------------------------------

 

> Can you double-check by calling SetLastError(0) before _wsopen_s?

SetLastError(0) has been set before _wsopen_s():
{code:java}
GetLastError() before _wsopen_s():0
_wsopen_s: fd:000001F5DA662558 (*fd):-1 
file_name.ToNative().c_str():000001F5DA58E4B0 oflag:163721 pmode:384 
errno_actual:9
GetLastError():80{code}
 There is no file before I run application. The file had been created before 
application crashed. It's a empty file.


was (Author: thamha):
 

> Can you double-check by calling SetLastError(0) before _wsopen_s?

SetLastError(0) has been set before _wsopen_s():
{code:java}
GetLastError() before _wsopen_s():0
_wsopen_s: fd:000001F5DA662558 (*fd):-1 
file_name.ToNative().c_str():000001F5DA58E4B0 oflag:163721 pmode:384 
errno_actual:9
GetLastError():80{code}
 The file had been created before application crashed. It's a empty file.

> [C++] Failed to open local file: Bad file descriptor
> ----------------------------------------------------
>
>                 Key: ARROW-5700
>                 URL: https://issues.apache.org/jira/browse/ARROW-5700
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: C++
>         Environment: Windows version 10.0.10586.1106 (th2_release.170904-1742)
>            Reporter: Tham
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.0.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> I open an output stream to write a parquet file. Here is the code:
> {code:java}
> std::shared_ptr<arrow::io::OutputStream> outStream;
> arrow::Status err;
> err = arrow::io::FileOutputStream::Open(filePath.toStdString(), false, 
> &outStream);
> if (err.code() != arrow::StatusCode::OK) {
>     std::cout << err.message() << std::endl;
> }
> {code}
> Here is the error message I got:
> {code:java}
> Failed to open local file: <path_to_parquet_file> , error: Bad file 
> descriptor"
> {code}
> I've got this error only when running on Windows version 10.0.10586.1106 
> (th2_release.170904-1742).
> Any idea?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to