arib icon indicating copy to clipboard operation
arib copied to clipboard

Exception thrown in aijin.es test file

Open johnoneil opened this issue 7 years ago • 2 comments

<Screen Posiiton to 13,0><Medium Text>(<Normal Text>恋人<Medium Text>)�<Normal Text>タバコやめないの?<Medium Text>◻
<Screen Posiiton to 15,17><Medium Text>�<Normal Text>また言う<Medium Text>犖
Exception throw while parsing data group from .es
Traceback (most recent call last):
  File "/home/on-three/code/arib/arib/data_group.py", line 135, in next_data_group
    data_group = DataGroup(f)
  File "/home/on-three/code/arib/arib/data_group.py", line 54, in __init__
    raise DataGroupParseError("Initial stuffing byte not equal to 0x80: " + hex(self._stuffing_byte))
DataGroupParseError: Initial stuffing byte not equal to 0x80: 0xff
Looking for new data group in .es
Data group found. Continuing.
<clear screen>
<CS:"7 S"><CS:"620;480 V"><CS:"170;30 _"><CS:"4 X"><CS:"24 Y"><CS:"36;36 W"><CS:"8 n"><CS:"1;0000 c"><Medium Text><Small Text>
<

johnoneil avatar May 13 '17 20:05 johnoneil

issue arises in aijin.ts at 0:16:37 and causes the subtitle text above to not appear. As can be seen there are a lot of DRCS characters used at this point.

johnoneil avatar May 13 '17 22:05 johnoneil

debug log

[0x3f][0x4d]-->人
-->89
MSZ: --> 0x89
-->0e
switching GL to table G1
-->29
-->1b
esc first byte is 0x2a
ESC DESIGNATION 0x2a
G2 DRCS 0x20
DRCS 0x41
control code designation
designating via final_byte 0x41
[42, 32] : 0 [40]
[42, 32] : 1 [41]
[42, 32] : 2 [42]
[42, 32] : 3 [43]
[42, 32] : 4 [36, 40]
[42, 32] : 5 [36, 41]
[42, 32] : 6 [36, 42]
[42, 32] : 7 [36, 43]
[42, 32] : 8 [40, 32]
[42, 32] : 9 [41, 32]
[42, 32] : 10 [42, 32]
found designation match at [42, 32] at index 10 and desig 2
-->1b
esc first byte is 0x7d
ESC INVOCATION 0x7d
[ESC][0x7d]-->LS2R
control code invocation.
[ESC][0x7d]-->LS2R
invoking 0x7d
-->b3
-->8a
NSZ: --> 0x8a
-->1b
esc first byte is 0x29
ESC DESIGNATION 0x29
G1 CODESET 0x31
control code designation
designating via final_byte 0x31
[41] : 0 [40]
[41] : 1 [41]
found designation match at [41] at index 1 and desig 1
-->0e
switching GL to table G1
-->3f
katakana [0x3f]-->タ
-->50
katakana [0x50]-->バ
-->33
katakana [0x33]-->コ
-->1b
esc first byte is 0x29
ESC DESIGNATION 0x29
G1 CODESET 0x30
control code designation
designating via final_byte 0x30
[41] : 0 [40]
[41] : 1 [41]
found designation match at [41] at index 1 and desig 1
-->0e
switching GL to table G1
-->64
hiragana: [0x64]-->や
-->61
hiragana: [0x61]-->め
-->4a
hiragana: [0x4a]-->な
-->24
hiragana: [0x24]-->い
-->4e
hiragana: [0x4e]-->の
-->1b
esc first byte is 0x29
ESC DESIGNATION 0x29
G1 CODESET 0x4a
control code designation
designating via final_byte 0x4a
[41] : 0 [40]
[41] : 1 [41]
found designation match at [41] at index 1 and desig 1
-->0e
switching GL to table G1
-->3f
-->89
MSZ: --> 0x89
-->1b
esc first byte is 0x2a
ESC DESIGNATION 0x2a
G2 DRCS 0x20
DRCS 0x42
control code designation
designating via final_byte 0x42
[42, 32] : 0 [40]
[42, 32] : 1 [41]
[42, 32] : 2 [42]
[42, 32] : 3 [43]
[42, 32] : 4 [36, 40]
[42, 32] : 5 [36, 41]
[42, 32] : 6 [36, 42]
[42, 32] : 7 [36, 43]
[42, 32] : 8 [40, 32]
[42, 32] : 9 [41, 32]
[42, 32] : 10 [42, 32]
found designation match at [42, 32] at index 10 and desig 2
-->1b
esc first byte is 0x7d
ESC INVOCATION 0x7d
[ESC][0x7d]-->LS2R
control code invocation.
[ESC][0x7d]-->LS2R
invoking 0x7d
-->e0
[0xe0][0x88]-->◻
-->1c
APS: --> 15,17>
-->89
MSZ: --> 0x89
-->1b
esc first byte is 0x2a
ESC DESIGNATION 0x2a
G2 DRCS 0x20
DRCS 0x41
control code designation
designating via final_byte 0x41
[42, 32] : 0 [40]
[42, 32] : 1 [41]
[42, 32] : 2 [42]
[42, 32] : 3 [43]
[42, 32] : 4 [36, 40]
[42, 32] : 5 [36, 41]
[42, 32] : 6 [36, 42]
[42, 32] : 7 [36, 43]
[42, 32] : 8 [40, 32]
[42, 32] : 9 [41, 32]
[42, 32] : 10 [42, 32]
found designation match at [42, 32] at index 10 and desig 2
-->1b
esc first byte is 0x7d
ESC INVOCATION 0x7d
[ESC][0x7d]-->LS2R
control code invocation.
[ESC][0x7d]-->LS2R
invoking 0x7d
-->b3
-->8a
NSZ: --> 0x8a
-->1b
esc first byte is 0x29
ESC DESIGNATION 0x29
G1 CODESET 0x30
control code designation
designating via final_byte 0x30
[41] : 0 [40]
[41] : 1 [41]
found designation match at [41] at index 1 and desig 1
-->0e
switching GL to table G1
-->5e
hiragana: [0x5e]-->ま
-->3f
hiragana: [0x3f]-->た
-->0f
switching _GL to table G0
-->38
[0x38][0x40]-->言
-->0e
switching GL to table G1
-->26
hiragana: [0x26]-->う
-->89
MSZ: --> 0x89
-->1b
esc first byte is 0x2a
ESC DESIGNATION 0x2a
G2 DRCS 0x20
DRCS 0x42
control code designation
designating via final_byte 0x42
[42, 32] : 0 [40]
[42, 32] : 1 [41]
[42, 32] : 2 [42]
[42, 32] : 3 [43]
[42, 32] : 4 [36, 40]
[42, 32] : 5 [36, 41]
[42, 32] : 6 [36, 42]
[42, 32] : 7 [36, 43]
[42, 32] : 8 [40, 32]
[42, 32] : 9 [41, 32]
[42, 32] : 10 [42, 32]
found designation match at [42, 32] at index 10 and desig 2
-->1b
esc first byte is 0x7d
ESC INVOCATION 0x7d
[ESC][0x7d]-->LS2R
control code invocation.
[ESC][0x7d]-->LS2R
invoking 0x7d
-->e0
[0xe0][0x38]-->犖
crc value is 17024
<clear screen>
<CS:"7 S"><CS:"620;480 V"><CS:"170;30 _"><CS:"4 X"><CS:"24 Y"><CS:"36;36 W"><CS:"8 n"><CS:"1;0000 c"><Medium Text><Small Text>
<Screen Posiiton to 13,0><Medium Text>(<Normal Text>恋人<Medium Text>)�<Normal Text>タバコやめないの?<Medium Text>◻
<Screen Posiiton to 15,17><Medium Text>�<Normal Text>また言う<Medium Text>犖
__DATA_GROUP_START__
0xff
Exception throw while parsing data group from .es
Traceback (most recent call last):
  File "/home/on-three/code/arib/arib/data_group.py", line 135, in next_data_group
    data_group = DataGroup(f)
  File "/home/on-three/code/arib/arib/data_group.py", line 54, in __init__
    raise DataGroupParseError("Initial stuffing byte not equal to 0x80: " + hex(self._stuffing_byte))
DataGroupParseError: Initial stuffing byte not equal to 0x80: 0xff
Looking for new data group in .es
Data group found. Continuing.
<clear screen>
<CS:"7 S"><CS:"620;480 V"><CS:"170;30 _"><CS:"4 X"><CS:"24 Y"><CS:"36;36 W"><CS:"8 n"><CS:"1;0000 c"><Medium Text><Small Text>
<Screen Posiiton to 13,0><Medium Text>(<Normal Text>恋人<Medium Text>)�<Normal Text>タバコやめないの?<Medium Text>◻
<Screen Posiiton to 15,17><Medium Text>�<Normal Text>また言う<Medium Text>犖
__DATA_GROUP_START__
0x80
0xff
0xf0
group id 0
0
0
d

Almost certainly the trailing character '犖' is incorrect and should be the DRCS for closing parentheses. The use of DRCS and designations (switching decoders at runtime) is complex here and certainly wrong.

johnoneil avatar May 13 '17 22:05 johnoneil