Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

beginning of crash after several loading #439

Open
AhmedHumk opened this issue Jul 31, 2022 · 0 comments
Open

beginning of crash after several loading #439

AhmedHumk opened this issue Jul 31, 2022 · 0 comments

Comments

@AhmedHumk
Copy link

AhmedHumk commented Jul 31, 2022

thats how i load the svga

    public void PlaySvgaFromAssets(final String svgafilename, final Boolean activateantialies){
        try {
            SVGAParser parser = new SVGAParser(context);
            parser.decodeFromAssets(svgafilename, new SVGAParser.ParseCompletion(){
                @Override
                public void onComplete(SVGAVideoEntity videoItem) {
                    SVGAImageView svga = getObject();
                    videoItem.setAntiAlias(activateantialies);
                    svga.setVideoItem(videoItem);
                    svga.startAnimation();
                }

                @Override
                public void onError() {
                }

            }, null);

        } catch (Exception e) {

        }

    }

--------- beginning of crash
java.lang.OutOfMemoryError: Failed to allocate a 852464 byte allocation with 54936 free bytes and 53KB until OOM, target footprint 402653184, growth limit 402653184
at java.util.Arrays.copyOf(Arrays.java:3161)
at java.io.ByteArrayOutputStream.toByteArray(ByteArrayOutputStream.java:191)
at SVGAParser.inflate(SVGAParser.kt:505)
at SVGAParser.decodeFromInputStream$lambda-14(SVGAParser.kt:308)
at SVGAParser.lambda$qQmMepCHi6TnT4_chtkqzWrN89w(Unknown Source:0)
at -$$Lambda$SVGAParser$qQmMepCHi6TnT4_chtkqzWrN89w.run(Unknown Source:14)
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:929)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant