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

Caused by: java.lang.IllegalArgumentException: Can't triangulate less than 3 points #18

Open
theapache64 opened this issue Sep 7, 2019 · 0 comments

Comments

@theapache64
Copy link

When I try to set color generator dynamically,

binding.trvBg.drawable.setColorGenerator(RandomColorGenerator())

app crashes with below stacktrace

java.lang.RuntimeException: An error occurred while executing doInBackground()
        at android.os.AsyncTask$3.done(AsyncTask.java:354)
        at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
        at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
        at java.util.concurrent.FutureTask.run(FutureTask.java:271)
        at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:764)
     Caused by: java.lang.IllegalArgumentException: Can't triangulate less than 3 points
        at com.manolovn.trianglify.util.Preconditions.checkArgument(Preconditions.java:25)
        at com.manolovn.trianglify.triangulator.DelaunayTriangulator.triangulate(DelaunayTriangulator.java:27)
        at com.manolovn.trianglify.TrianglifyDrawable$TriangulateAsyncTask.doInBackground(TrianglifyDrawable.java:127)
        at com.manolovn.trianglify.TrianglifyDrawable$TriangulateAsyncTask.doInBackground(TrianglifyDrawable.java:118)
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