Problem with accessing Android root directory

I am trying to make my app to show the files and folders without using Android native widgets, using Openframeworks and ofxImGui.

It works without problem for some directories but if I change the directory to internal storage’s root directory("/storage/emulated/0") or (/storage/emulated/0/Android") and list the files/folders and display information using Openframeworks’ directory/files functions and ofxImGui, the app crashes.But for example, if I use the directory “/storage/emulated/0/Android/data” then it works.

I assume, there are some Android system files in those folders and my app is trying to access those and Android doesn’t let my app to access them.Or maybe Android just doesn’t allow access to internal storage’s root directory.

Is there an easy way to be able to solve this problem?I am testing it on an Android 7 phone.

The problem got solved.After inspecting debug log, I noticed the picture file I use next to filenames, wasn’t loaded.