AruleViz error subscript out of range

I have a very large dataset which i am using for market basket analysis. I am ploting a graph of the rules and i have two options in the R Shiny up to show all rules or a sample. The dataset gives a large number of rules and if this option "all rules" is selected in ploting the rules graph, i get a mesage Error: subscript out of range
However when i choose sample and subset the rules to a small number the rules graph displays well. How can I avoid this error message when i am using large data sets and the option of ploting is all rules not a sample. The application is a generic one which can be used with a range of data sets. Thanking you in advance