Skip to content

Even if Java's exceptions occurs, empty graph returns without any errors in search #112

@yasu-sh

Description

@yasu-sh

This is the small note to record a known issue:

If you use large datasets or sets many required edges, you may get empty graph without any errors.
This sympton is caused by the code as below:

if(!is.null(e <- .jgetEx())){

	# Search
	tetrad_graph <- .jcall(algo_instance, "Ledu/cmu/tetrad/graph/Graph;", 
		"search", tetradData, parameters_instance, check=FALSE)

	if(!is.null(e <- .jgetEx())){
		.jclear()
		tetradrunner$nodes <- colnames(df)
		tetradrunner$edges <- NULL
		# print("Java exception was raised")
		# print(e)

This suppress the error like this:
Error in .jcall("RJavaArrayTools", "Z", "isArray", .jcast(o)) : java.lang.OutOfMemoryError: Java heap space

rJava documentation

.jgetEx polls for any pending exceptions and returns the exception object.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions