Skip to content

SD examples don't close file handles [imported] #832

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

Closed
cmaglie opened this issue Nov 15, 2012 · 0 comments
Closed

SD examples don't close file handles [imported] #832

cmaglie opened this issue Nov 15, 2012 · 0 comments
Assignees
Labels

Comments

@cmaglie
Copy link
Member

cmaglie commented Nov 15, 2012

This is Issue 832 moved from a Google Code project.
Added by 2012-02-27T14:19:44.000Z by kevin.os...@gmail.com.
Please review that bug for more context and additional comments, but update this bug.

Original labels: Type-Defect, Priority-Medium

Original description

I've only checked the list example, but if there are more than 26 files on a card, it fails. (only lists the first 26 files on the card, including directories). I recreated it by:
touch 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 etc... 36
Here's the output:
Initializing SD card...initialization done.
1 0
2 0
3 0
4 0
5 0
6 0
7 0
8 0
9 0
10 0
11 0
12 0
13 0
14 0
15 0
16 0
17 0
18 0
19 0
20 0
21 0
22 0
23 0
24 0
25 0
done!
after applying the fix (attached)
Initializing SD card...initialization done.
1 0
2 0
3 0
4 0
5 0
6 0
7 0
8 0
9 0
10 0
11 0
12 0
13 0
14 0
15 0
16 0
17 0
18 0
19 0
20 0
21 0
22 0
23 0
24 0
25 0
26 0
27 0
28 0
29 0
30 0
31 0
32 0
33 0
34 0
35 0
36 0
done!

The reason is that the program runs out of file handles. It keeps openNextFile()-ing, but never closes them.
attached is a fixed example.

What version of the Arduino software are you using?
Arduino1.0
On what operating
system?
Windows 7
Which Arduino board are you using?
Uno R2

Please provide any additional information below.

@ghost ghost assigned ffissore Dec 20, 2012
ffissore pushed a commit that referenced this issue Dec 20, 2012
oriregev pushed a commit to oriregev/Arduino that referenced this issue Dec 20, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants