So after talking to Professor, we figured out the image size is too big for the cards and if you are displaying the images during filtering or search, the program crashes as it is unable to handle display images in the ImageVIew with such huge quantity.
To tackle it I had to optimize my code by not reloading all the images every time a search function is performed and reducing the image size by scaling it smaller size. Hope this helps.