You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Glide Version: glide:4.0.0-RC0 Integration libraries: None Device/Android Version: Android 7.1 Issue details / Repro steps / Use case background:
There is big video (mp4) file, over 2.2G, I use glide to get thumbnail, it cause exception.
Glide load line / GlideModule (if any) / list Adapter code (if any):
compile 'com.github.bumptech.glide:glide:4.0.0-RC0'
I do not use GlideModule
Bitmap thumbnail = null;
thumbnail =
Glide.with(context)
.asBitmap()
.apply(
new RequestOptions()
.override(request.getWidth(), request.getHeight())
.centerCrop())
.load(filePath)
.submit(request.getWidth(), request.getHeight())
.get();
Stack trace / LogCat:
08-12 18:53:27.629 2438 4317 E GlideExecutor: java.lang.IllegalArgumentException: Size exceeds Integer.MAX_VALUE
08-12 18:53:27.629 2438 4317 E GlideExecutor: at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:850)
08-12 18:53:27.629 2438 4317 E GlideExecutor: at com.bumptech.glide.util.ByteBufferUtil.fromFile(ByteBufferUtil.java:31)
08-12 18:53:27.629 2438 4317 E GlideExecutor: at com.bumptech.glide.load.model.ByteBufferFileLoader$ByteBufferFetcher.loadData(ByteBufferFileLoader.java:59)
08-12 18:53:27.629 2438 4317 E GlideExecutor: at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:61)
08-12 18:53:27.629 2438 4317 E GlideExecutor: at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:275)
08-12 18:53:27.629 2438 4317 E GlideExecutor: at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:245)
08-12 18:53:27.629 2438 4317 E GlideExecutor: at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:220)
08-12 18:53:27.629 2438 4317 E GlideExecutor: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
08-12 18:53:27.629 2438 4317 E GlideExecutor: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
08-12 18:53:27.629 2438 4317 E GlideExecutor: at java.lang.Thread.run(Thread.java:761)
08-12 18:53:27.629 2438 4317 E GlideExecutor: at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:347)
The text was updated successfully, but these errors were encountered:
Hi, sjudd,
In FileChannelImpl.map, it will check size.
If size > Integer.MAX_VALUE, it will throw exception.
It's android source code, so it can not change.
So if we want to get thumbnail for one file (ove 2GB file), how can I do?
Glide Version: glide:4.0.0-RC0
Integration libraries: None
Device/Android Version: Android 7.1
Issue details / Repro steps / Use case background:
There is big video (mp4) file, over 2.2G, I use glide to get thumbnail, it cause exception.
Glide load line /
GlideModule
(if any) / list Adapter code (if any):compile 'com.github.bumptech.glide:glide:4.0.0-RC0'
I do not use GlideModule
Bitmap thumbnail = null;
thumbnail =
Glide.with(context)
.asBitmap()
.apply(
new RequestOptions()
.override(request.getWidth(), request.getHeight())
.centerCrop())
.load(filePath)
.submit(request.getWidth(), request.getHeight())
.get();
Stack trace / LogCat:
08-12 18:53:27.629 2438 4317 E GlideExecutor: java.lang.IllegalArgumentException: Size exceeds Integer.MAX_VALUE
08-12 18:53:27.629 2438 4317 E GlideExecutor: at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:850)
08-12 18:53:27.629 2438 4317 E GlideExecutor: at com.bumptech.glide.util.ByteBufferUtil.fromFile(ByteBufferUtil.java:31)
08-12 18:53:27.629 2438 4317 E GlideExecutor: at com.bumptech.glide.load.model.ByteBufferFileLoader$ByteBufferFetcher.loadData(ByteBufferFileLoader.java:59)
08-12 18:53:27.629 2438 4317 E GlideExecutor: at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:61)
08-12 18:53:27.629 2438 4317 E GlideExecutor: at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:275)
08-12 18:53:27.629 2438 4317 E GlideExecutor: at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:245)
08-12 18:53:27.629 2438 4317 E GlideExecutor: at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:220)
08-12 18:53:27.629 2438 4317 E GlideExecutor: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
08-12 18:53:27.629 2438 4317 E GlideExecutor: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
08-12 18:53:27.629 2438 4317 E GlideExecutor: at java.lang.Thread.run(Thread.java:761)
08-12 18:53:27.629 2438 4317 E GlideExecutor: at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:347)
The text was updated successfully, but these errors were encountered: