Too Many Files Open Compile Error

Mahares

Expert
Licensed User
Longtime User
I used to debug via USB directly to a device without problems. I recently switched to B4A Bridge. Now That I want to try via USB again, I immediately get the attached error message (too many open files). See attached image. I restarted the ADB server, made sure to shut down B4A, restarted PC to avail. I even reinstalled the Android SDK which takes for ever to install, as Erel suggested in one his posts. It did not help. I prefer USB debugging as it has fewer steps than B4A Bridge. How can I regain my wish?
Thank you very much.
 

Attachments

  • CompileError.PNG
    CompileError.PNG
    9.2 KB · Views: 143

Mahares

Expert
Licensed User
Longtime User
@Erel: The device is a relatively new phone, Droid Razr, 6 months old, which has been working flawlessly. What do you exactly mean by restart the device. If you are talking about turning on and off the phone, I did all that. I had the exact same issue on another laptop dispalying the same error, that is 2 computers. I never had that problem before I started using B4 Bridge.
 
Upvote 0

EvgenyB4A

Active Member
Licensed User
Longtime User
The problem is in the device. Did you try to restart it?
On some older devices a single restart will not help. You should restart the device and then restart it again when the home screen is displayed.

My Application display HTML pages from DirRootExternal that contains GIF file every 30 sec . After some hours of running in debug mode, I have got " ...EMFILE (Too many file open)" error. Please look at uploaded file. What maybe the reasons?
 

Attachments

  • android-error.JPG
    android-error.JPG
    316.6 KB · Views: 115
Upvote 0

sorex

Expert
Licensed User
Longtime User
are you closing the file after you read in the html?

I'm not sure if it is required in B4A like in some other languages, maybe it's only needed on saving.

maybe you should post the reading part of the code.
 
Upvote 0

EvgenyB4A

Active Member
Licensed User
Longtime User
I use webview:


Sub
ViewWebPage

' GDX(0).SetOnGestureListener(pnlNum0 , "gstPnl")

SendInhibitCash

' intTimeAdv=0

pnlNum0.Visible=True

pnlNum1.Visible=False

pnlNum2.Visible=False

pnlNum3.Visible=False

pnlNum4.Visible=False

pnlNum5.Visible=False

pnlNum0.BringToFront

pnlNum0.Color=Colors.Gray

Dim
o AsReflector

o.Target =
WebView1

o.RunMethod2(
"clearCache","True","java.lang.boolean")

WebView1
.LoadUrl("file://" & File.Combine(File.DirRootExternal & "/Adverts", "clip.htm"))

WebView1
.ZoomEnabled=False

'

IfintGif<1ThenintGif=1

IfintGif>GetClipCount ThenintGif=1

o.Target =
WebView1

o.RunMethod2(
"clearCache","True","java.lang.boolean")

WebView1.LoadUrl("file://" & File.Combine(File.DirRootExternal & "/Adverts", "clip" & intGif & ".htm"))

intGif=intGif+1

End Sub
 
Upvote 0
Top