1 min read
PT3が壊れたかと思った話
11月1日午前1時35分からアニメを実況しようと思ってChinachu経由でTV視聴をしていたらいきなり止まった。
Chinachu用の鯖でsudo mirakurun status
をしたらCPUが100%に張り付いていた。
いろいろ調べて諦めかけた結果、PT3が応答しなくなったわけではなく、内部での不具合だった模様。
解決策
/usr/local/lib/node_modules/mirakurun/node_modules/aribts/lib/char.js
を書き換える
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- node_modules/aribts/lib/char.js.orig 2018-11-01 03:11:47.359169459 +0900 | |
+++ node_modules/aribts/lib/char.js 2018-11-01 03:06:35.021146159 +0900 | |
@@ -186,7 +186,7 @@ | |
case 0x95: | |
// MACRO | |
- while (this.buffer[this.position] !== 0x4F) { | |
+ while (this.buffer.length > this.position && this.buffer[this.position] !== 0x4F) { | |
this.position++; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
break in node_modules/aribts/lib/char.js:189 | |
187 case 0x95: | |
188 // MACRO | |
>189 while (this.buffer[this.position] !== 0x4F) { | |
190 this.position++; | |
191 } |
xtuaokさんにとても感謝。