Skip to main content
Participating Frequently
August 20, 2018
Answered

Is there a workaround for crash when user selects too many files with browseForOpenMultiple?

  • August 20, 2018
  • 2 replies
  • 678 views

In Windows, browseForOpenMultiple crashes Animate if I try to select too many files. I think the exact number varies depending on the length of the file references.  I am *not* reading the files at this time, only the list of selected file names.  Is there any work-around besides warning the user not to select too many files at once?

This topic has been closed for replies.
Correct answer kglad

Thanks, kglad, I've submitted a bug report now.


you should probably do it here, too - Tracker

i don't know if this one replaces the one linked in message 5 but an adobe staff member mentioned it today in response to a different issue.

2 replies

JoãoCésar17023019
Community Expert
Community Expert
August 22, 2018

Hi.

Maybe you should try to not read everything all at once.

Please check this answer and see if it helps.

actionscript 3 - Listing huge amount files and directories include subdirectories in Adobe AIR - Stack Overflow

Regards,

JC

Participating Frequently
August 22, 2018

Thanks for the link, but actually, it's not "me" that is trying to select (not "read") everything all at once -- it's my eventual users when I release the program who will need to limit themselves from doing so, and it would be nice if there was a way to "fail gracefully" and simply tell them they've tried to select (NOT read!) too many files at one time.  If there were a precise number, I suppose I could at least warn them of that, but apparently it's not a set amount; it seems to depend on the character length of the directory structure.  The program does not time out (the problem addressed in the link you provided), it simply exits.  The only workaround I've come up with is to build my own file selection picker, and not use browseForOpenMultiple at all, which is what I'm constructing right now.  But that's a shame to have to do that, since, ideally, the OSs all already have one that should work perfectly well, with thumbnails, size, date of last modification, etc. already displayed.  And it's what the users are used to using. Flash shouldn't just crash.

kglad
Community Expert
Community Expert
August 22, 2018
kglad
Community Expert
Community Expert
August 21, 2018

you can use a try-catch for the browse and listener and use an io_error event listener.

Participating Frequently
August 21, 2018

Thanks for your reply, but unfortunately I'm doing those things already, but it still crashes the player if I try to select too many files at once.