Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
yasu-sh opened this issue Apr 5, 2023 · 0 comments

Comments

@yasu-sh
Copy link
Contributor

yasu-sh commented Apr 5, 2023

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.

@yasu-sh yasu-sh changed the title Even if Java's exceptions occurs, empty graph returns wtihout any errors in search Even if Java's exceptions occurs, empty graph returns without any errors in search Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant