RGLab / flowWorkspace

flowWorkspace
GNU Affero General Public License v3.0
45 stars 21 forks source link

test case crash R on win32 #319

Open mikejiang opened 4 years ago

mikejiang commented 4 years ago

This code is supposed to throw error message of 'duplicates'. But it crashes R after throwing the expected error.

devtools::load_all(".")
library(CytoML)
wsfile <- list.files(dataDir, pattern="manual.xml",full=TRUE)
ws <- open_flowjo_xml(wsfile);
gs <- flowjo_to_gatingset(ws, path = dataDir, name = 4)
chnnls <- colnames(gs)
chnnls[1] <- "FSC-H" 
colnames(gs_cyto_data(gs))<- chnnls
terminate called after throwing an instance of 'std::domain_error'
  what():  The input of 'set_channels' has duplicates!

This application has requested the Runtime to terminate it in an unusual way.

And it only crashes on win32, but not on win64 , nor Linux, mac. also, it only crashes for gs that's parsed from xml, but not for the one that is loaded by load_gs, i.e.

> gs <- load_gs(list.files(dataDir, pattern = "gs_manual",full = TRUE))
>
>     chnnls <- colnames(gs)
>     chnnls[1] <- "FSC-H"
>     colnames(gs_cyto_data(gs))<- chnnls
Error in set_all_channels(x@pointer, value) :
  The input of 'set_channels' has duplicates!
>
SamGG commented 4 years ago

Hi Mike, Is it possible to forbid the installation on Win32? This is the way you would take, because Win32 is "deprecated" ;-)

mikejiang commented 4 years ago

I can't seem to step into my c++ code by following https://cran.r-project.org/bin/windows/base/rw-FAQ.html#How-do-I-debug-code-that-I-have-compiled-and-dyn_002eload_002ded_003f Next thing to try is to building R from source with debug mode enabled. will loop back on this later