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

Fresco Library doesn't work with the spcial http request format #133

Closed
ZhaoKaiQiang opened this issue Apr 12, 2015 · 3 comments
Closed

Comments

@ZhaoKaiQiang
Copy link

I am first use the Fresco Library,but have a trouble with it.
I want to load a picture which url is "http://tp4.sinaimg.cn/1312838711/50/5632121054/1",maybe it is not a normal url format,so the Library throws a Exception as follow
04-12 17:38:01.037 8538-8538/com.socks.jiandan E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.socks.jiandan, PID: 8538
java.lang.StringIndexOutOfBoundsException: length=4; regionStart=0; regionLength=30
at java.lang.String.startEndAndLength(String.java:588)
at java.lang.String.substring(String.java:1475)
at com.facebook.imagepipeline.core.ProducerSequenceFactory.getBasicDecodedImageSequence(ProducerSequenceFactory.java:195)
at com.facebook.imagepipeline.core.ProducerSequenceFactory.getDecodedImageProducerSequence(ProducerSequenceFactory.java:143)
at com.facebook.imagepipeline.core.ImagePipeline.fetchDecodedImage(ImagePipeline.java:137)
at com.facebook.drawee.backends.pipeline.PipelineDraweeControllerBuilder.getDataSourceForRequest(PipelineDraweeControllerBuilder.java:82)
at com.facebook.drawee.backends.pipeline.PipelineDraweeControllerBuilder.getDataSourceForRequest(PipelineDraweeControllerBuilder.java:31)
at com.facebook.drawee.controller.AbstractDraweeControllerBuilder$2.get(AbstractDraweeControllerBuilder.java:322)
at com.facebook.drawee.controller.AbstractDraweeControllerBuilder$2.get(AbstractDraweeControllerBuilder.java:319)
at com.facebook.drawee.backends.pipeline.PipelineDraweeController.getDataSource(PipelineDraweeController.java:96)
at com.facebook.drawee.controller.AbstractDraweeController.submitRequest(AbstractDraweeController.java:392)
at com.facebook.drawee.controller.AbstractDraweeController.onAttach(AbstractDraweeController.java:332)
at com.facebook.drawee.view.DraweeHolder.attachController(DraweeHolder.java:276)
at com.facebook.drawee.view.DraweeHolder.attachOrDetatchController(DraweeHolder.java:293)
at com.facebook.drawee.view.DraweeHolder.onAttach(DraweeHolder.java:117)
at com.facebook.drawee.view.DraweeView.onAttachedToWindow(DraweeView.java:104)
at android.view.View.dispatchAttachedToWindow(View.java:12607)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2467)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2467)
at android.view.ViewGroup.addViewInner(ViewGroup.java:3603)
at android.view.ViewGroup.addView(ViewGroup.java:3417)
at android.view.ViewGroup.addView(ViewGroup.java:3362)
at android.support.v7.widget.RecyclerView$4.addView(RecyclerView.java:379)
at android.support.v7.widget.ChildHelper.addView(ChildHelper.java:79)
at android.support.v7.widget.RecyclerView$LayoutManager.addViewInt(RecyclerView.java:5258)
at android.support.v7.widget.RecyclerView$LayoutManager.addView(RecyclerView.java:5216)
at android.support.v7.widget.RecyclerView$LayoutManager.addView(RecyclerView.java:5204)
at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1325)
at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1274)
at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:525)
at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:2118)
at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:2415)
at android.view.View.layout(View.java:14839)
at android.view.ViewGroup.layout(ViewGroup.java:4633)
at android.support.v4.widget.SwipeRefreshLayout.onLayout(SwipeRefreshLayout.java:561)
at android.view.View.layout(View.java:14839)
at android.view.ViewGroup.layout(ViewGroup.java:4633)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
at android.view.View.layout(View.java:14839)
at android.view.ViewGroup.layout(ViewGroup.java:4633)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
at android.view.View.layout(View.java:14839)
at android.view.ViewGroup.layout(ViewGroup.java:4633)
at android.support.v7.internal.widget.ActionBarOverlayLayout.onLayout(ActionBarOverlayLayout.java:502)
at android.view.View.layout(View.java:14839)
at android.view.ViewGroup.layout(ViewGroup.java:4633)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
at android.widget.FrameLayout.onLayout(FrameLay

The http respose code is 304,not 200,so,i don't konw how to use the Library load picture like this.

@tyronen
Copy link
Contributor

tyronen commented Apr 12, 2015

I believe this issue was fixed in version 0.2.0 of Fresco. Are you using the latest version?

@tyronen tyronen closed this as completed Apr 12, 2015
@mhdatie
Copy link

mhdatie commented May 14, 2015

I'm getting the same exact exception when loading one of the URL's. I will get back to this and provide more information about the error.

@ZhaoKaiQiang
Copy link
Author

@MohamadAtieh I solve this question when i use the last version library,you can try it.

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

3 participants