-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
OutOfMemory Exception when using robolectric >= 4.10 with mockito #9095
Comments
This is kind of a funny issue. There is not much that Robolectric is doing to contribute to this issue, it is more of an issue for Java's ImageIO library. A mock InputStream is tricking the Java ImageIO helpers into spinning forever, most likely becuase calling Overall, if you use Android graphics libraries that read iamges , I would recommend using real graphical data. Here is the stack trace I am seeing:
|
Description
Robolectric occurs OutOfMemory exception when mocking InputStream for drawable creation:
Drawable.createFromStream(inputStream, null);
Steps to Reproduce
Drawable.createFromStream(inputStream, null);
Robolectric & Android Version
Link to a public git repo demonstrating the problem:
https://github.com/HeineCat/Example_OutOfMemoryException_Robolectric
The text was updated successfully, but these errors were encountered: