Android Question incredible problem with a directory name

marcick

Well-Known Member
Licensed User
Longtime User
My app is running fine on more than 100 devices, but suddenly I'm experiencing this kind of problem on a fresh new just bought Asus Zenpad 8.0, look at this code:

B4X:
Dim fn As String="bmap4atest"
If File.exists(File.DirRootExternal,fn)=False Then File.MakeDir(File.DirRootExternal,fn)
File.WriteString(File.DirRootExternal & "/" & fn,"prova","hello")

It works as expected, and I see the directory "bmap4atest" is created and the file "hello" is inside it
(root/sdcard/bmap4atest)

But if I change the name of the directory from "bmap4atest" to "bmap4a" that code fails and I get the error

B4X:
java.io.FileNotFoundException: /storage/emulated/0/bmap4a/prova: open failed: ENOENT (No such file or directory)

(the error is at th eline file.writestring ..)
Am I becoming crazy ? Why the hell I can't use "bmap4a" as a directory name only on this device ?

update: believe me, it made me crazy for 2 hours, the problem is suddenly disappeared. I don't know what to say, may be the device has some problems
 
Last edited:

marcick

Well-Known Member
Licensed User
Longtime User
It seems like the directory is created but the app has still no access to it. Can't explain why was happening with a particular directory name and only on that fresh new device.
After some try and try and reboot, everything started to works fine. Crazy.
 
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
Were you running the app in debug mode? I've had some weird stuff happen when testing changes in Rapid Debug. It got to the point where I wouldn't use Rapid Debug - however with the latest version of B4A that's the only debug option, so now that I'm forced to use it I find that cleaning the project every so often seems to help. I don't know exactly what's going on & I've never reported it as an issue, but I have definitely seen random issues appear & then disappear when using Rapid Debug. Maybe some values being corrupted, not released / refreshed, or something?

- Colin.
 
Upvote 0

marcick

Well-Known Member
Licensed User
Longtime User
My app is running on more than 100 devices. I was installing the apk on a fresh new just bought device, (after a couple of hours for installing all the available updates) and I saw the message "the app has been stopped" (or similar, I don't know exactely how is the english message).
Then I attached the IDE and started to investigate. I'm not sure but during investigation maybe I was using debug mode. But at first, the problem has occoured with the apk installation ...
Suddenly, everything started to work fine. I'm tempted to reset the device to factory and see if it happens again or not.
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
You can still use legacy debugger, you will find it in one of the IDE menus, under tools I think
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…