This is how my one looks. I used your zip file.
This is how my one looks. I used your zip file.
Gigablue Quad 4K & UE 4K
.........FBC Tuners:
------------------> GT-Sat unicable LNB to 1.5M dish(28.2E)
------------------> Gigablue unicable LNB to 80 cm dish(19.2E)
.......................> FBC & DVB-S2X into 90cm dish (27.5W) Opticum robust Unicable LNB
AX HD61, Edision Osmio 4K+, Zgemma H9Combo, Octagon SF8008 , gbtrio4k, h9se using unicable ports
Zgemma H9 C/S into Giga4K
Or a Windows one, since filenames are supposed to be utf-16(?).
That filename shows up as pФllФ.mp4 on my Linux systems. (The Ф is a Cyrillic Capital Letter EF - Unicode U+0424.)
But it is a valid utf-8 string (even if it doesn't look as you'd expect). Not sure why the ö (o with diaresis - U+00F6) should show up differently in different places, though.
MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD
What unzip are you using?
Mine finds one file and says so:
And we disagree about the name which is there too.Code:[parent]: unzip -l ../mymovies.zip Archive: ../mymovies.zip Length Date Time Name --------- ---------- ----- ---- 0 2022-06-23 16:44 mymovies/pФllФ.mp4 --------- ------- 0 1 file
However, if I actually peep into the zip file the filename which is there is:
p~ll~.mp4
where both ~s are byte 0x94.
Which in Unicode is a non-printable character. (CANCEL CHARACTER).
Which might be what triggers the bugs.
MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD
On reflexion 0x94, whilst being perfectly legal in an ext4 filename, is NOT legal utf-8.
That should be the 2-byte sequence 0xc2 0x94.
But ö is U+00f6 in Unicode, which is 0xc3 0xb6 in utf-8.
Anything that looks at filesystem names (or, as in console output, might echo this back) has to be able to cater for the result being non-utf8 when decoded.
So this might be what contributes to triggering the bugs.
Last edited by birdman; 23-06-22 at 20:42.
MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD
Tested openatv 6.4 and everything works fine there. 0x94 = 148 = ö in codepage 850
Just realised 6.4 still uses python2. Tested Openatv 7.0 and that is also crashing. I guess all pyhton3 images have this issue?!
Last edited by ocean; 29-06-22 at 08:59.
I just tried extracting the file on my linux mint system. This how it shows on the console:
...and in the Nemo File Manager:Code:joe@joe-desktop:~/Downloads/mymovies$ ls -al total 124 drwx------ 2 joe joe 4096 Jun 29 09:11 . drwxr-xr-x 25 joe joe 118784 Jun 29 09:11 .. -rw-rw-r-- 1 joe joe 0 Jun 23 16:44 'p'$'\302\224''ll'$'\302\224''.mp4'
Where the " are displayed as unicode 0094 symbols.Code:p”ll”.mp4
Last edited by Joe_90; 29-06-22 at 09:22.
GB Quad Plus, Mut@nt HD51, AX HD61, 80cm dish and Supreme Dark motor. Sony STR-DN 1060, Sony UHP-H1 Bluray, Odroid N2+ (CoreElec), Monitor Audio Bronze 5.1 speakers
Spent some time debuging code and now know what is causing the crash.
"def createPlaylist()" in file MovieSelection.py
When there is non utf-8 filename in directory, item.getPath() contains surrogates for all non utf-8 characters. It throws exception "std::logic_error" when path is used.
If simply filter out surrogates from item paths like this before appending to items:
item.setPath(item.getPath().encode('UTF-8', 'surrogateescape').decode('UTF-8', 'ignore'))
-> No crash and directory loads normally.
Ofcourse you can't play these files, because path is still incorrect.
How did this work in python27? It should use bytes for file paths, not str.
Anyway, hope this info helps to fix this properly. I did see other similar bug where opening movie directory crashed and it's probably this same issue.
abu baniaz (23-08-22)
MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD
If I may suggest adding temporary workaround for the crash:
Filter out non UTF-8 filenames from movielist. Currently there is no way to play the files anyway.
MovieList.py line 741 has this comment:
# OSX put a lot of stupid files ._* everywhere... we need to skip them
Just add this code after that:
Code:# Filter out non UTF-8 files. Remove this when movielist supports them. aname = name.encode('UTF-8', 'surrogateescape').decode('UTF-8', 'ignore') if aname != name: print("[MovieList] skipping non utf-8 filename: %s" % aname) continue
MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD
Yes I know, my suggestion only meant to be temporary.
But I think it makes sence, because I don't expect to see fix for filesystem any time soon. Unfortunately.
Same problems are also in other images, so this not VIX only problem. I Wonder if other image developers are aware of this, atleast openatv crashes same way and trashcan code also looks identical.
I think using os.walk.. is fine.
In trashcan.py code parameter "trashfolder" is str, that means python3 converts everything to str automatically. Non utf-8 characters are replaced with surrogates -> problem.
Exact same "os.walk" where "trashfolder" parameter is bytes, then root, dirs, files and name are also bytes and no str conversion happens.
That's exactly what we want. But real problem comes from this part: enigma.eBackgroundFileEraser.getInstance().erase(f n)
That function needs accept fn also as bytes.
It's imported from enigma.pyc, but I can't find enigma.py. I guess file is generated somehow from C, is there documentation how this works?
file_eraser.cpp has: void eBackgroundFileEraser::erase(const std::string& filename)
Possible solution is to add overloaded function. I have only minimal experience in C, maybe something like: void eBackgroundFileEraser::erase(const char* filename)
That also likely means whole image needs to be compiled from source before you can even test.
Yes it's compiled into Enigma, but all the standard C++ calls in file_eraser such as delete, rename, trunc expect string
building the image is simple, but also somewhat complex.... see bottom of https://github.com/OpenViX/enigma2
appreciate suggestions....... Huevos and I are still looking at having a resolution ... in python
Last edited by twol; 26-08-22 at 16:09.
Gigablue Quad 4K & UE 4K
.........FBC Tuners:
------------------> GT-Sat unicable LNB to 1.5M dish(28.2E)
------------------> Gigablue unicable LNB to 80 cm dish(19.2E)
.......................> FBC & DVB-S2X into 90cm dish (27.5W) Opticum robust Unicable LNB
AX HD61, Edision Osmio 4K+, Zgemma H9Combo, Octagon SF8008 , gbtrio4k, h9se using unicable ports
Zgemma H9 C/S into Giga4K