search for: skipnul

Displaying 20 results from an estimated 47 matches for "skipnul".

2023 Feb 11
1
scan(..., skip=1e11): infinite loop; cannot interrupt
...n such cases: --- src/main/scan.c (revision 83797) +++ src/main/scan.c (working copy) @@ -835,7 +835,7 @@ attribute_hidden SEXP do_scan(SEXP call, SEXP op, SEXP args, SEXP rho) { SEXP ans, file, sep, what, stripwhite, dec, quotes, comstr; - int c, flush, fill, blskip, multiline, escapes, skipNul; + int c = 0, flush, fill, blskip, multiline, escapes, skipNul; R_xlen_t nmax, nlines, nskip; const char *p, *encoding; RCNTXT cntxt; @@ -952,7 +952,7 @@ if(!data.con->canread) error(_("cannot read from this connection")); } - for (R_xlen_t i = 0; i < ns...
2017 Jul 15
2
readLines without skipNul=TRUE causes crash
...= normalizePath( file_folder ) ) unzipped_files <- list.files( file_folder , recursive = TRUE , full.names = TRUE ) infile <- grep( "DADOS(.*)\\.txt$" , unzipped_files , value = TRUE ) # works R.utils::countLines( infile ) # works with warning my_file <- readLines( infile , skipNul = TRUE ) # crash my_file <- readLines( infile ) # run just before crash sessionInfo() # R version 3.4.1 (2017-06-30) # Platform: x86_64-w64-mingw32/x64 (64-bit) # Running under: Windows 10 x64 (build 15063) # Matrix products: default # locale: # [1] LC_COLLATE=English_United States.1252 # [...
2017 Jul 15
0
readLines without skipNul=TRUE causes crash
...d_files <- list.files( file_folder , recursive = TRUE , full.names = > TRUE ) > > infile <- grep( "DADOS(.*)\\.txt$" , unzipped_files , value = TRUE ) > > # works > R.utils::countLines( infile ) > > # works with warning > my_file <- readLines( infile , skipNul = TRUE ) > > # crash > my_file <- readLines( infile ) > > > # run just before crash > sessionInfo() > # R version 3.4.1 (2017-06-30) > # Platform: x86_64-w64-mingw32/x64 (64-bit) > # Running under: Windows 10 x64 (build 15063) > > # Matrix products: default &g...
2017 Jul 16
0
readLines without skipNul=TRUE causes crash
thank you for taking the time to write this. i set it running last night and it's still going -- if it doesn't finish by tomorrow, i will try to find a site to host the problem file and add that link to the bug report so the archive package can be avoided at least. i'm sorry for the bother On Sat, Jul 15, 2017 at 4:14 PM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote:
2017 Jul 16
0
readLines without skipNul=TRUE causes crash
hi, the text file that prompts the segfault is 4gb but only 80,937 lines > file.info( "S:/temp/crash.txt") size isdir mode mtime ctime atime exe S:/temp/crash.txt 4078192743 FALSE 666 2017-07-15 17:24:35 2017-07-15 17:19:47 2017-07-15 17:19:47 no On Sun, Jul 16, 2017 at 6:34 AM, Duncan Murdoch <murdoch.duncan at
2017 Dec 14
2
cannot destroy connection (?) created by readLines in a tryCatch
..."no" "yes" 3 "file" "r" "text" "closed" "yes" "yes" AFAICT, readLines should close the connection: ? readLines function (con = stdin(), n = -1L, ok = TRUE, warn = TRUE, encoding = "unknown", skipNul = FALSE) { if (is.character(con)) { con <- file(con, "r") on.exit(close(con)) } .Internal(readLines(con, n, ok, warn, encoding, skipNul)) } <environment: namespace:base> so maybe this just a symptom of an on.exit() issue? Or am I missing something an...
2023 Mar 13
0
scan(..., skip=1e11): infinite loop; cannot interrupt
...c?(revision?83797) >?+++?src/main/scan.c?(working?copy) >?@@?-835,7?+835,7?@@ >???attribute_hidden?SEXP?do_scan(SEXP?call,?SEXP?op,?SEXP?args,?SEXP?rho) >???{ >???????SEXP?ans,?file,?sep,?what,?stripwhite,?dec,?quotes,?comstr; >?-????int?c,?flush,?fill,?blskip,?multiline,?escapes,?skipNul; >?+????int?c?=?0,?flush,?fill,?blskip,?multiline,?escapes,?skipNul; >???????R_xlen_t?nmax,?nlines,?nskip; >???????const?char?*p,?*encoding; >???????RCNTXT?cntxt; >?@@?-952,7?+952,7?@@ >????????if(!data.con->canread) >????error(_("cannot?read?from?this?connection")...
2017 Jul 15
2
readLines without skipNul=TRUE causes crash
On 15/07/2017 11:33 AM, Anthony Damico wrote: > hi, i realized that the segfault happens on the text file in a new R > session. so, creating the segfault-generating text file requires a > contributed package, but prompting the actual segfault does not -- > pretty sure that means this is a base R bug? submitted here: > https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=17311
2017 Jul 16
2
readLines without skipNul=TRUE causes crash
On 16/07/2017 6:17 AM, Anthony Damico wrote: > thank you for taking the time to write this. i set it running last > night and it's still going -- if it doesn't finish by tomorrow, i will > try to find a site to host the problem file and add that link to the bug > report so the archive package can be avoided at least. i'm sorry for > the bother > How big is that
2023 Feb 11
1
scan(..., skip=1e11): infinite loop; cannot interrupt
Hello, All: I have a 4.54 GB file that I'm trying to read in chunks using "scan(..., skip=__)". It works as expected for small values of "skip" but goes into an infinite loop for "skip=1e11" and similar large values of skip: I cannot even interrupt it; I must kill R. Below please find sessionInfo() with a toy example. My real problem is a large
2017 Dec 14
4
cannot destroy connection (?) created by readLines in a tryCatch
...uot;r" "text" "closed" "yes" "yes" >> >> AFAICT, readLines should close the connection: >> >> ? readLines >> function (con = stdin(), n = -1L, ok = TRUE, warn = TRUE, encoding = >> "unknown", >> skipNul = FALSE) >> { >> if (is.character(con)) { >> con <- file(con, "r") >> on.exit(close(con)) >> } >> .Internal(readLines(con, n, ok, warn, encoding, skipNul)) >> } >> <environment: namespace:base> >> &...
2017 Jul 15
0
readLines without skipNul=TRUE causes crash
...>>> TRUE ) >>> >>> infile <- grep( "DADOS(.*)\\.txt$" , unzipped_files , value = TRUE ) >>> >>> # works >>> R.utils::countLines( infile ) >>> >>> # works with warning >>> my_file <- readLines( infile , skipNul = TRUE ) >>> >>> # crash >>> my_file <- readLines( infile ) >>> >>> >>> # run just before crash >>> sessionInfo() >>> # R version 3.4.1 (2017-06-30) >>> # Platform: x86_64-w64-mingw32/x64 (64-bit) >>> # Run...
2017 Jul 15
4
readLines without skipNul=TRUE causes crash
...sive = TRUE , full.names >> = >> TRUE ) >> >> infile <- grep( "DADOS(.*)\\.txt$" , unzipped_files , value = TRUE ) >> >> # works >> R.utils::countLines( infile ) >> >> # works with warning >> my_file <- readLines( infile , skipNul = TRUE ) >> >> # crash >> my_file <- readLines( infile ) >> >> >> # run just before crash >> sessionInfo() >> # R version 3.4.1 (2017-06-30) >> # Platform: x86_64-w64-mingw32/x64 (64-bit) >> # Running under: Windows 10 x64 (build 15063)...
2017 Jul 16
0
readLines without skipNul=TRUE causes crash
...ipped_files , value = >TRUE ) >>>>>>> >>>>>>> # works >>>>>>> R.utils::countLines( infile ) >>>>>>> >>>>>>> # works with warning >>>>>>> my_file <- readLines( infile , skipNul = TRUE ) >>>>>>> >>>>>>> # crash >>>>>>> my_file <- readLines( infile ) >>>>>>> >>>>>>> >>>>>>> # run just before crash >>>>>>> sessionInfo() >&gt...
2014 Apr 21
1
read.table() code fails outside of the utils package
...e when run at the top level or from inside any other package. In R 3.1.0, that is no longer true. The read.table() source ONLY works when run from inside the "utils" package. The (only) culprit is this: .External(C_readtablehead, file, 1L, comment.char, blank.lines.skip, quote, sep, skipNul) Older versions of read.table() instead did this, which ran fine from any package; this entry point no longer exists: .Internal(readTableHead(file, nlines, comment.char, blank.lines.skip, quote, sep)) The C implementation of readTableHead is in utils.so, but the symbol is marked as local. I...
2017 Jul 16
0
readLines without skipNul=TRUE causes crash
...>>>> >> >>>>>>> # works >> >>>>>>> R.utils::countLines( infile ) >> >>>>>>> >> >>>>>>> # works with warning >> >>>>>>> my_file <- readLines( infile , skipNul = TRUE ) >> >>>>>>> >> >>>>>>> # crash >> >>>>>>> my_file <- readLines( infile ) >> >>>>>>> >> >>>>>>> >> >>>>>>> # run just before cr...
2017 Jul 17
0
readLines without skipNul=TRUE causes crash
...unzipped_files , value = TRUE ) >>>>>>> >>>>>>> # works >>>>>>> R.utils::countLines( infile ) >>>>>>> >>>>>>> # works with warning >>>>>>> my_file <- readLines( infile , skipNul = TRUE ) >>>>>>> >>>>>>> # crash >>>>>>> my_file <- readLines( infile ) >>>>>>> >>>>>>> >>>>>>> # run just before crash >>>>>>> sessionInfo() >&gt...
2017 Jul 15
0
readLines without skipNul=TRUE causes crash
...ile <- grep( "DADOS(.*)\\.txt$" , unzipped_files , value = TRUE ) >>>>> >>>>> # works >>>>> R.utils::countLines( infile ) >>>>> >>>>> # works with warning >>>>> my_file <- readLines( infile , skipNul = TRUE ) >>>>> >>>>> # crash >>>>> my_file <- readLines( infile ) >>>>> >>>>> >>>>> # run just before crash >>>>> sessionInfo() >>>>> # R version 3.4.1 (2017-06-30) >>...
2017 Jul 17
1
readLines without skipNul=TRUE causes crash
...;> >>>>>>> # works > >> >>>>>>> R.utils::countLines( infile ) > >> >>>>>>> > >> >>>>>>> # works with warning > >> >>>>>>> my_file <- readLines( infile , skipNul = TRUE ) > >> >>>>>>> > >> >>>>>>> # crash > >> >>>>>>> my_file <- readLines( infile ) > >> >>>>>>> > >> >>>>>>> > >> >>>>&gt...
2017 Jul 15
3
readLines without skipNul=TRUE causes crash
...;> >>>> infile <- grep( "DADOS(.*)\\.txt$" , unzipped_files , value = TRUE ) >>>> >>>> # works >>>> R.utils::countLines( infile ) >>>> >>>> # works with warning >>>> my_file <- readLines( infile , skipNul = TRUE ) >>>> >>>> # crash >>>> my_file <- readLines( infile ) >>>> >>>> >>>> # run just before crash >>>> sessionInfo() >>>> # R version 3.4.1 (2017-06-30) >>>> # Platform: x86_64-w64-min...