Use Image from Bing with OpenFilePicker Generated Error RRS feed

  • Question

  • Now Windows 8 allows me to open an image from Bing search in OpenFilePicker.

    There is no problem to load and display a picture from Bing just like from SkyDrive.

    However when I tried to use the photo and snapshot again from Bing the app crash.

    The same operation worked fine with SkyDrive and Facebook photos.

    When I select a picture from Bing or SkyDrive, I guess there is a copy inside the local storage.

    Why I can not reuse the copy of photos in Bing but can reuse the copy of photos from SkyDrive?

    How can I disable the display of Bing from the Picker?

    Tuesday, August 13, 2013 3:07 PM

All replies

  • Can you provide more details? What exactly are you doing with the picture?

    It will generally help if you can provide a minimal code snippet along with an explanation of what it is doing, what the expected behavior is, and how that differs from the actual behavior. Posting a minimal app that reproduces the problem to your Skydrive will also make it easier for people to reproduce your problem and help out.

    You cannot disable specific sources from the picker. Your app should be able to handle images from any source.


    Wednesday, August 14, 2013 12:51 AM
  • There is no Bing source in previous Windows 8.

    Is it a bug of Bing source?

    SkyDrive, Facebook require an authorized account. But Bing does not require. That is a different. My app worked fine on Facebook image but Bing image is alway crash when I tried to reuse the Bing image. No special processing for different source. Maybe the token of Bing image is not reusable. 

    BTW I have two Windows 8 Pro system. One is x64 ultrabook, another is atom x86 tablet. No Bing source in Ultrabook but there is Bing source in tablet. The available source of OpenFilePicker is different!!!


    Wednesday, August 14, 2013 1:51 PM
  • Apps can extend the file picker. One one system you have installed the Bing app, so it is available in the picker. On the other you have not.

    You will need to provide more information about what your code is doing with the bitmap for us to be able to help you. What exactly do you mean by "reuse"? Please provide a code snippet or minimal repro project which demonstrates the problem, along with an explanation of what the code is doing and the expected behavior and how that differs from the actual behavior.


    Wednesday, August 14, 2013 3:46 PM
  • My app is available on Windows Store now. I can send your a message to tell how to repeat this problem. Is there a message available in this forum?

    BTW If Apps can extend the file picker, they should not be able to affect my file picker. Otherwise third parties may distribute bugs  to my apps. Users will simply think its the crash of my app which is not in control of my app.

    Wednesday, August 14, 2013 9:40 PM
  • Hi Charlie,

    While it is possible that it is a problem in the Bing extension, it is also likely the problem is in your app. We would be happy to help you diagnose this, but you need to tell us what your app is doing with the StorageFile returned from the file picker. Without knowing what your code is doing we cannot help you diagnose that.

    In many cases we've seen apps make incorrect assumptions about the StorageFile objects returned from the file picker which cause the app to break when they get a legal StorageFile that the app doesn't anticipate. For example, StorageFile objects returned from the file pickers do not have to be file system objects and do not have to provide Path properties. Apps which (incorrectly) rely on the Path property may crash when they receive such a StorageFile. This is a bug in the app, not in the file picker extension.

    If you cannot create a minimal repro that you can share publically on your SkyDrive then you can open a support incident and we can work with you one-on-one.

    You can find more information about file picker extensions at Integrating with file picker contracts


    Wednesday, August 14, 2013 9:50 PM
  • I tried to add catch exception to avoid the crash. It seems working but have not tried on Bing source.

    I did not use the path but a token from file picker. So the use of file is fine.

    The trouble may be an async programming problem. To fast response network, the file can work right in sequence. But to slow response web site, the async snapshot an image may cause exception. 

    Thursday, August 15, 2013 2:56 PM