[BUG] Duplicating subtitles with & without font color tags, a lot of warnings and errors, empty images with spupng. #403

Closed
opened 2026-01-29 16:43:05 +00:00 by claunia · 10 comments
Owner

Originally created by @tsmarinov on GitHub (Mar 6, 2018).

Please prefix your issue with one of the following: [BUG], [PROPOSAL], [QUESTION].

CCExtractor version (using the --version parameter preferably) : X.X

In raising this issue, I confirm the following (please check boxes, eg [X] - and delete unchecked ones):

  • I have read and understood the contributors guide.
  • I have checked that the bug-fix I am reporting can be replicated, or that the feature I am suggesting isn't already present.
  • I have checked that the issue I'm posting isn't already reported.
  • I have checked that the issue I'm porting isn't already solved and no duplicates exist in closed issues and in opened issues
  • I have checked the pull requests tab for existing solutions/implementations to my issue/suggestion.
  • I have used the latest available version of CCExtractor to verify this issue exists.

My familiarity with the project is as follows (check one, eg [X] - and delete unchecked ones):

  • I have never used CCExtractor.
  • I have used CCExtractor just a couple of times.
  • I absolutely love CCExtractor, but have not contributed previously.
  • I am an active contributor to CCExtractor.

Necessary information

  • Is this a regression (did it work before)? [ ] NO | [ ] YES - please specify the last known working version
  • What platform did you use? [ ] Windows - [ ] Linux - [ ] Mac
  • What were the used arguments? -autoprogram
    ./ccextractor -quant 0 -nofc -in=ts -datapid 0x1de7 -out=srt -stdout -nobom -trim -noteletext -codec dvbsub -dvblang bul -ocrlang bul cinemax.ts

**Video links (replace text below with your links) **
https://goo.gl/DmLjji
Please make the affected input file available for us (no screenshots, those don't help!). Public links to Dropbox, Google Drive, etc, are all fine. If it is not possible to make it available publicly, send us a private invitation (both Dropbox and Google Drive allow that). In this case we will download the file and upload it to the private developer repository.

Do not upload your file to any location that will require us to sign up or endure a wait list, slow downloads, etc. If your upload expires make sure you keep it active somehow (replace links if needed). Keep in mind that while we go over all tickets some may take a few days, and it's important we have the file available when we actually need it.

Additional information

{issue content here, replace this line with your issue content}

PS: Make sure you set an alert in GitHub so you get notifications about your ticket. We may need to ask questions and we do everything inside GitHub's system.

This is what i get when i use:

./ccextractor -quant 0 -nofc -in=ts -datapid 0x1de7 -out=srt -stdout -nobom -trim -noteletext -codec dvbsub -dvblang bul -ocrlang bul cinemax.ts

CCExtractor 0.87, Carlos Fernandez Sanz, Volker Quetschke.
Teletext portions taken from Petr Kutalek's telxcc
--------------------------------------------------------------------------
Input: cinemax.ts
[Extract: 1] [Stream mode: Transport]
[Program : Auto ] [Hauppage mode: No] [Use MythTV code: Auto]
[Timing mode: Auto] [Debug: No] [Buffer input: No]
[Use pic_order_cnt_lsb for H.264: No] [Print CC decoder traces: No]
[Target format: .srt] [Encoding: UTF-8] [Delay: 0] [Trim lines: Yes]
[Add font color data: No] [Add font typesetting: Yes]
[Convert case: No] [Video-edit join: No]
[Extraction start time: not set (from start)]
[Extraction end time: not set (to end)]
[Live stream: No] [Clock frequency: 90000]
[Teletext page: Autodetect]
[Start credits text: None]

-----------------------------------------------------------------
Opening file: cinemax.ts
Analyzing data in general mode
Sending captions to stdout.
  1%  |  00:061
00:00:06,618 --> 00:00:08,057
<font color="#6b6b6b">Случи се през нощта.</font>

Error in boxClipToRectangle: box outside rectangle
Warning in pixClipRectangle: box doesn't overlap pix
Error in boxClipToRectangle: box outside rectangle
Warning in pixClipRectangle: box doesn't overlap pix
Error in pixConvertRGBToGray: pixs not defined
Error in pixGetDimensions: pix not defined
Error in pixGetColormap: pix not defined
Error in pixClone: pixs not defined
Error in pixGetDepth: pix not defined
Error in pixGetWpl: pix not defined
Error in pixGetYRes: pix not defined

TessBaseAPIRecognize returned -1, skipping this bitmap.
2
00:00:08,058 --> 00:00:08,137
Случи се през нощта.

  2%  |  00:083
00:00:08,138 --> 00:00:11,137
<font color="#ececec">Загуби свяст призори.</font>

Error in boxClipToRectangle: box outside rectangle
Warning in pixClipRectangle: box doesn't overlap pix
Error in boxClipToRectangle: box outside rectangle
Warning in pixClipRectangle: box doesn't overlap pix
Error in pixConvertRGBToGray: pixs not defined
Error in pixGetDimensions: pix not defined
Error in pixGetColormap: pix not defined
Error in pixClone: pixs not defined
Error in pixGetDepth: pix not defined
Error in pixGetWpl: pix not defined
Error in pixGetYRes: pix not defined

TessBaseAPIRecognize returned -1, skipping this bitmap.
4
00:00:11,138 --> 00:00:11,217
Загуби свяст призори.

  3%  |  00:115
00:00:11,218 --> 00:00:14,897
<font color="#6b6b6b">Защо не ни предупредихте?</font>
<font color="#6b6b6b">Можеше да го настаним горе.</font>

Error in boxClipToRectangle: box outside rectangle
Warning in pixClipRectangle: box doesn't overlap pix
Error in boxClipToRectangle: box outside rectangle
Warning in pixClipRectangle: box doesn't overlap pix
Error in pixConvertRGBToGray: pixs not defined
Error in pixGetDimensions: pix not defined
Error in pixGetColormap: pix not defined
Error in pixClone: pixs not defined
Error in pixGetDepth: pix not defined
Error in pixGetWpl: pix not defined
Error in pixGetYRes: pix not defined

TessBaseAPIRecognize returned -1, skipping this bitmap.
6
00:00:14,898 --> 00:00:14,977
Защо не ни предупредихте?
Можеше да го настаним горе.

  4%  |  00:147
00:00:14,978 --> 00:00:16,898
<font color="#ececec">За МОМЗНТЗ по-добре да не ГО местим.</font>

Error in boxClipToRectangle: box outside rectangle
Warning in pixClipRectangle: box doesn't overlap pix
Error in boxClipToRectangle: box outside rectangle
Warning in pixClipRectangle: box doesn't overlap pix
Error in pixConvertRGBToGray: pixs not defined
Error in pixGetDimensions: pix not defined
Error in pixGetColormap: pix not defined
Error in pixClone: pixs not defined
Error in pixGetDepth: pix not defined
Error in pixGetWpl: pix not defined
Error in pixGetYRes: pix not defined

TessBaseAPIRecognize returned -1, skipping this bitmap.
8
00:00:16,899 --> 00:00:16,978
За МОМЗНТЗ по-добре да не ГО местим.

...

 72%  |  04:06*** Error in `./ccextractor': free(): invalid next size (normal): 0x0000000002bab480 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7ff32481e7e5]
/lib/x86_64-linux-gnu/libc.so.6(+0x8037a)[0x7ff32482737a]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7ff32482b53c]
./ccextractor[0x44ebc8]
./ccextractor[0x42e5bb]
./ccextractor[0x4261ec]
./ccextractor[0x43a032]
./ccextractor[0x43a688]
./ccextractor[0x441cae]
./ccextractor[0x442c5f]
./ccextractor[0x4072c4]
./ccextractor(main+0xc2)[0x407fe0]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7ff3247c7830]
./ccextractor[0x406d89]
======= Memory map: ========
00400000-00761000 r-xp 00000000 00:28 10289                              /mnt/hgfs/vm_share/issues/cinemax_bg/ccextractor
00960000-00961000 r--p 00360000 00:28 10289                              /mnt/hgfs/vm_share/issues/cinemax_bg/ccextractor
00961000-00968000 rw-p 00361000 00:28 10289                              /mnt/hgfs/vm_share/issues/cinemax_bg/ccextractor
00968000-009a0000 rw-p 00000000 00:00 0
025c9000-0366a000 rw-p 00000000 00:00 0                                  [heap]
7ff314000000-7ff314021000 rw-p 00000000 00:00 0
7ff314021000-7ff318000000 ---p 00000000 00:00 0
7ff31863b000-7ff3230b2000 rw-p 00000000 00:00 0
7ff3230b2000-7ff3230b5000 r-xp 00000000 fc:00 18255                      /lib/x86_64-linux-gnu/libdl-2.23.so
7ff3230b5000-7ff3232b4000 ---p 00003000 fc:00 18255                      /lib/x86_64-linux-gnu/libdl-2.23.so
7ff3232b4000-7ff3232b5000 r--p 00002000 fc:00 18255                      /lib/x86_64-linux-gnu/libdl-2.23.so
7ff3232b5000-7ff3232b6000 rw-p 00003000 fc:00 18255                      /lib/x86_64-linux-gnu/libdl-2.23.so
7ff3232b6000-7ff3232c1000 r-xp 00000000 fc:00 295284                     /usr/lib/x86_64-linux-gnu/libjbig.so.0
7ff3232c1000-7ff3234c0000 ---p 0000b000 fc:00 295284                     /usr/lib/x86_64-linux-gnu/libjbig.so.0
7ff3234c0000-7ff3234c1000 r--p 0000a000 fc:00 295284                     /usr/lib/x86_64-linux-gnu/libjbig.so.0
7ff3234c1000-7ff3234c4000 rw-p 0000b000 fc:00 295284                     /usr/lib/x86_64-linux-gnu/libjbig.so.0
7ff3234c4000-7ff3234e5000 r-xp 00000000 fc:00 551                        /lib/x86_64-linux-gnu/liblzma.so.5.0.0
7ff3234e5000-7ff3236e4000 ---p 00021000 fc:00 551                        /lib/x86_64-linux-gnu/liblzma.so.5.0.0
7ff3236e4000-7ff3236e5000 r--p 00020000 fc:00 551                        /lib/x86_64-linux-gnu/liblzma.so.5.0.0
7ff3236e5000-7ff3236e6000 rw-p 00021000 fc:00 551                        /lib/x86_64-linux-gnu/liblzma.so.5.0.0
7ff3236e6000-7ff323756000 r-xp 00000000 fc:00 295506                     /usr/lib/x86_64-linux-gnu/libtiff.so.5.2.4
7ff323756000-7ff323956000 ---p 00070000 fc:00 295506                     /usr/lib/x86_64-linux-gnu/libtiff.so.5.2.4
7ff323956000-7ff323957000 r--p 00070000 fc:00 295506                     /usr/lib/x86_64-linux-gnu/libtiff.so.5.2.4
7ff323957000-7ff32395a000 rw-p 00071000 fc:00 295506                     /usr/lib/x86_64-linux-gnu/libtiff.so.5.2.4
7ff32395a000-7ff3239b1000 r-xp 00000000 fc:00 295274                     /usr/lib/x86_64-linux-gnu/libjpeg.so.8.0.2
7ff3239b1000-7ff323bb1000 ---p 00057000 fc:00 295274                     /usr/lib/x86_64-linux-gnu/libjpeg.so.8.0.2
7ff323bb1000-7ff323bb2000 r--p 00057000 fc:00 295274                     /usr/lib/x86_64-linux-gnu/libjpeg.so.8.0.2
7ff323bb2000-7ff323bb3000 rw-p 00058000 fc:00 295274                     /usr/lib/x86_64-linux-gnu/libjpeg.so.8.0.2
7ff323bb3000-7ff323bd7000 r-xp 00000000 fc:00 593                        /lib/x86_64-linux-gnu/libpng12.so.0.54.0
7ff323bd7000-7ff323dd6000 ---p 00024000 fc:00 593                        /lib/x86_64-linux-gnu/libpng12.so.0.54.0
7ff323dd6000-7ff323dd7000 r--p 00023000 fc:00 593                        /lib/x86_64-linux-gnu/libpng12.so.0.54.0
7ff323dd7000-7ff323dd8000 rw-p 00024000 fc:00 593                        /lib/x86_64-linux-gnu/libpng12.so.0.54.0
7ff323dd8000-7ff323df1000 r-xp 00000000 fc:00 634                        /lib/x86_64-linux-gnu/libz.so.1.2.8
7ff323df1000-7ff323ff0000 ---p 00019000 fc:00 634                        /lib/x86_64-linux-gnu/libz.so.1.2.8
7ff323ff0000-7ff323ff1000 r--p 00018000 fc:00 634                        /lib/x86_64-linux-gnu/libz.so.1.2.8
7ff323ff1000-7ff323ff2000 rw-p 00019000 fc:00 634                        /lib/x86_64-linux-gnu/libz.so.1.2.8
7ff323ff2000-7ff324008000 r-xp 00000000 fc:00 537                        /lib/x86_64-linux-gnu/libgcc_s.so.1
7ff324008000-7ff324207000 ---p 00016000 fc:00 537                        /lib/x86_64-linux-gnu/libgcc_s.so.1
7ff324207000-7ff324208000 rw-p 00015000 fc:00 537                        /lib/x86_64-linux-gnu/libgcc_s.so.1
7ff324208000-7ff32437a000 r-xp 00000000 fc:00 264454                     /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7ff32437a000-7ff32457a000 ---p 00172000 fc:00 264454                     /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7ff32457a000-7ff324584000 r--p 00172000 fc:00 264454                     /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7ff324584000-7ff324586000 rw-p 0017c000 fc:00 264454                     /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
7ff324586000-7ff32458a000 rw-p 00000000 00:00 0
7ff32458a000-7ff3245a2000 r-xp 00000000 fc:00 18252                      /lib/x86_64-linux-gnu/libpthread-2.23.so
7ff3245a2000-7ff3247a1000 ---p 00018000 fc:00 18252                      /lib/x86_64-linux-gnu/libpthread-2.23.so
7ff3247a1000-7ff3247a2000 r--p 00017000 fc:00 18252                      /lib/x86_64-linux-gnu/libpthread-2.23.so
7ff3247a2000-7ff3247a3000 rw-p 00018000 fc:00 18252                      /lib/x86_64-linux-gnu/libpthread-2.23.so
7ff3247a3000-7ff3247a7000 rw-p 00000000 00:00 0
7ff3247a7000-7ff324967000 r-xp 00000000 fc:00 18253                      /lib/x86_64-linux-gnu/libc-2.23.so
7ff324967000-7ff324b67000 ---p 001c0000 fc:00 18253                      /lib/x86_64-linux-gnu/libc-2.23.so
7ff324b67000-7ff324b6b000 r--p 001c0000 fc:00 18253                      /lib/x86_64-linux-gnu/libc-2.23.so
7ff324b6b000-7ff324b6d000 rw-p 001c4000 fc:00 18253                      /lib/x86_64-linux-gnu/libc-2.23.so
7ff324b6d000-7ff324b71000 rw-p 00000000 00:00 0
7ff324b71000-7ff324dd7000 r-xp 00000000 fc:00 295676                     /usr/local/lib/liblept.so.5.0.1
7ff324dd7000-7ff324fd6000 ---p 00266000 fc:00 295676                     /usr/local/lib/liblept.so.5.0.1
7ff324fd6000-7ff324fd7000 r--p 00265000 fc:00 295676                     /usr/local/lib/liblept.so.5.0.1
7ff324fd7000-7ff324fe0000 rw-p 00266000 fc:00 295676                     /usr/local/lib/liblept.so.5.0.1
7ff324fe0000-7ff3252c9000 r-xp 00000000 fc:00 297695                     /usr/lib/libtesseract.so.3.0.4
7ff3252c9000-7ff3254c9000 ---p 002e9000 fc:00 297695                     /usr/lib/libtesseract.so.3.0.4
7ff3254c9000-7ff3254cd000 r--p 002e9000 fc:00 297695                     /usr/lib/libtesseract.so.3.0.4
7ff3254cd000-7ff3254ce000 rw-p 002ed000 fc:00 297695                     /usr/lib/libtesseract.so.3.0.4
7ff3254ce000-7ff325762000 rw-p 00000000 00:00 0
7ff325762000-7ff32586a000 r-xp 00000000 fc:00 16863                      /lib/x86_64-linux-gnu/libm-2.23.so
7ff32586a000-7ff325a69000 ---p 00108000 fc:00 16863                      /lib/x86_64-linux-gnu/libm-2.23.so
7ff325a69000-7ff325a6a000 r--p 00107000 fc:00 16863                      /lib/x86_64-linux-gnu/libm-2.23.so
7ff325a6a000-7ff325a6b000 rw-p 00108000 fc:00 16863                      /lib/x86_64-linux-gnu/libm-2.23.so
7ff325a6b000-7ff325a91000 r-xp 00000000 fc:00 18251                      /lib/x86_64-linux-gnu/ld-2.23.so
7ff325b7d000-7ff325c7f000 rw-p 00000000 00:00 0
7ff325c8f000-7ff325c90000 rw-p 00000000 00:00 0
7ff325c90000-7ff325c91000 r--p 00025000 fc:00 18251                      /lib/x86_64-linux-gnu/ld-2.23.so
7ff325c91000-7ff325c92000 rw-p 00026000 fc:00 18251                      /lib/x86_64-linux-gnu/ld-2.23.so
7ff325c92000-7ff325c93000 rw-p 00000000 00:00 0
7ffc1c9c3000-7ffc1c9e4000 rw-p 00000000 00:00 0                          [stack]
7ffc1c9e4000-7ffc1c9e7000 r--p 00000000 00:00 0                          [vvar]
7ffc1c9e7000-7ffc1c9e9000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
Aborted (core dumped)

duplicated subtitles: first is with fonts tags and then without them. Also when generating spupng, where are the non-color subtitles there are empty (transparent) PNGs

full log and ts is here: https://goo.gl/DmLjji

Originally created by @tsmarinov on GitHub (Mar 6, 2018). Please prefix your issue with one of the following: [BUG], [PROPOSAL], [QUESTION]. CCExtractor version (using the --version parameter preferably) : **X.X** **In raising this issue, I confirm the following (please check boxes, eg [X] - and delete unchecked ones):** - [X] I have read and understood the [contributors guide](https://github.com/CCExtractor/ccextractor/blob/master/.github/CONTRIBUTING.md). - [X] I have checked that the bug-fix I am reporting can be replicated, or that the feature I am suggesting isn't already present. - [X] I have checked that the issue I'm posting isn't already reported. - [X] I have checked that the issue I'm porting isn't already solved and no duplicates exist in [closed issues](https://github.com/CCExtractor/ccextractor/issues?q=is%3Aissue+is%3Aclosed) and in [opened issues](https://github.com/CCExtractor/ccextractor/issues) - [X] I have checked the pull requests tab for existing solutions/implementations to my issue/suggestion. - [X] I have used the latest available version of CCExtractor to verify this issue exists. **My familiarity with the project is as follows (check one, eg [X] - and delete unchecked ones):** - [ ] I have never used CCExtractor. - [ ] I have used CCExtractor just a couple of times. - [X] I absolutely love CCExtractor, but have not contributed previously. - [ ] I am an active contributor to CCExtractor. **Necessary information** - Is this a regression (did it work before)? [ ] NO | [ ] YES - *please specify the last known working version* - What platform did you use? [ ] Windows - [ ] Linux - [ ] Mac - What were the used arguments? `-autoprogram` ./ccextractor -quant 0 -nofc -in=ts -datapid 0x1de7 -out=srt -stdout -nobom -trim -noteletext -codec dvbsub -dvblang bul -ocrlang bul cinemax.ts **Video links (replace text below with your links) ** https://goo.gl/DmLjji Please make the affected input file available for us (no screenshots, those don't help!). Public links to Dropbox, Google Drive, etc, are all fine. If it is not possible to make it available publicly, send us a private invitation (both Dropbox and Google Drive allow that). In this case we will download the file and upload it to the private developer repository. Do *not* upload your file to any location that will require us to sign up or endure a wait list, slow downloads, etc. If your upload expires make sure you keep it active somehow (replace links if needed). Keep in mind that while we go over all tickets some may take a few days, and it's important we have the file available when we actually need it. **Additional information** {issue content here, replace this line with your issue content} PS: Make sure you set an alert in GitHub so you get notifications about your ticket. We may need to ask questions and we do everything inside GitHub's system. This is what i get when i use: `./ccextractor -quant 0 -nofc -in=ts -datapid 0x1de7 -out=srt -stdout -nobom -trim -noteletext -codec dvbsub -dvblang bul -ocrlang bul cinemax.ts` ``` CCExtractor 0.87, Carlos Fernandez Sanz, Volker Quetschke. Teletext portions taken from Petr Kutalek's telxcc -------------------------------------------------------------------------- Input: cinemax.ts [Extract: 1] [Stream mode: Transport] [Program : Auto ] [Hauppage mode: No] [Use MythTV code: Auto] [Timing mode: Auto] [Debug: No] [Buffer input: No] [Use pic_order_cnt_lsb for H.264: No] [Print CC decoder traces: No] [Target format: .srt] [Encoding: UTF-8] [Delay: 0] [Trim lines: Yes] [Add font color data: No] [Add font typesetting: Yes] [Convert case: No] [Video-edit join: No] [Extraction start time: not set (from start)] [Extraction end time: not set (to end)] [Live stream: No] [Clock frequency: 90000] [Teletext page: Autodetect] [Start credits text: None] ----------------------------------------------------------------- Opening file: cinemax.ts Analyzing data in general mode Sending captions to stdout. 1% | 00:061 00:00:06,618 --> 00:00:08,057 <font color="#6b6b6b">Случи се през нощта.</font> Error in boxClipToRectangle: box outside rectangle Warning in pixClipRectangle: box doesn't overlap pix Error in boxClipToRectangle: box outside rectangle Warning in pixClipRectangle: box doesn't overlap pix Error in pixConvertRGBToGray: pixs not defined Error in pixGetDimensions: pix not defined Error in pixGetColormap: pix not defined Error in pixClone: pixs not defined Error in pixGetDepth: pix not defined Error in pixGetWpl: pix not defined Error in pixGetYRes: pix not defined TessBaseAPIRecognize returned -1, skipping this bitmap. 2 00:00:08,058 --> 00:00:08,137 Случи се през нощта. 2% | 00:083 00:00:08,138 --> 00:00:11,137 <font color="#ececec">Загуби свяст призори.</font> Error in boxClipToRectangle: box outside rectangle Warning in pixClipRectangle: box doesn't overlap pix Error in boxClipToRectangle: box outside rectangle Warning in pixClipRectangle: box doesn't overlap pix Error in pixConvertRGBToGray: pixs not defined Error in pixGetDimensions: pix not defined Error in pixGetColormap: pix not defined Error in pixClone: pixs not defined Error in pixGetDepth: pix not defined Error in pixGetWpl: pix not defined Error in pixGetYRes: pix not defined TessBaseAPIRecognize returned -1, skipping this bitmap. 4 00:00:11,138 --> 00:00:11,217 Загуби свяст призори. 3% | 00:115 00:00:11,218 --> 00:00:14,897 <font color="#6b6b6b">Защо не ни предупредихте?</font> <font color="#6b6b6b">Можеше да го настаним горе.</font> Error in boxClipToRectangle: box outside rectangle Warning in pixClipRectangle: box doesn't overlap pix Error in boxClipToRectangle: box outside rectangle Warning in pixClipRectangle: box doesn't overlap pix Error in pixConvertRGBToGray: pixs not defined Error in pixGetDimensions: pix not defined Error in pixGetColormap: pix not defined Error in pixClone: pixs not defined Error in pixGetDepth: pix not defined Error in pixGetWpl: pix not defined Error in pixGetYRes: pix not defined TessBaseAPIRecognize returned -1, skipping this bitmap. 6 00:00:14,898 --> 00:00:14,977 Защо не ни предупредихте? Можеше да го настаним горе. 4% | 00:147 00:00:14,978 --> 00:00:16,898 <font color="#ececec">За МОМЗНТЗ по-добре да не ГО местим.</font> Error in boxClipToRectangle: box outside rectangle Warning in pixClipRectangle: box doesn't overlap pix Error in boxClipToRectangle: box outside rectangle Warning in pixClipRectangle: box doesn't overlap pix Error in pixConvertRGBToGray: pixs not defined Error in pixGetDimensions: pix not defined Error in pixGetColormap: pix not defined Error in pixClone: pixs not defined Error in pixGetDepth: pix not defined Error in pixGetWpl: pix not defined Error in pixGetYRes: pix not defined TessBaseAPIRecognize returned -1, skipping this bitmap. 8 00:00:16,899 --> 00:00:16,978 За МОМЗНТЗ по-добре да не ГО местим. ... 72% | 04:06*** Error in `./ccextractor': free(): invalid next size (normal): 0x0000000002bab480 *** ======= Backtrace: ========= /lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7ff32481e7e5] /lib/x86_64-linux-gnu/libc.so.6(+0x8037a)[0x7ff32482737a] /lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7ff32482b53c] ./ccextractor[0x44ebc8] ./ccextractor[0x42e5bb] ./ccextractor[0x4261ec] ./ccextractor[0x43a032] ./ccextractor[0x43a688] ./ccextractor[0x441cae] ./ccextractor[0x442c5f] ./ccextractor[0x4072c4] ./ccextractor(main+0xc2)[0x407fe0] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7ff3247c7830] ./ccextractor[0x406d89] ======= Memory map: ======== 00400000-00761000 r-xp 00000000 00:28 10289 /mnt/hgfs/vm_share/issues/cinemax_bg/ccextractor 00960000-00961000 r--p 00360000 00:28 10289 /mnt/hgfs/vm_share/issues/cinemax_bg/ccextractor 00961000-00968000 rw-p 00361000 00:28 10289 /mnt/hgfs/vm_share/issues/cinemax_bg/ccextractor 00968000-009a0000 rw-p 00000000 00:00 0 025c9000-0366a000 rw-p 00000000 00:00 0 [heap] 7ff314000000-7ff314021000 rw-p 00000000 00:00 0 7ff314021000-7ff318000000 ---p 00000000 00:00 0 7ff31863b000-7ff3230b2000 rw-p 00000000 00:00 0 7ff3230b2000-7ff3230b5000 r-xp 00000000 fc:00 18255 /lib/x86_64-linux-gnu/libdl-2.23.so 7ff3230b5000-7ff3232b4000 ---p 00003000 fc:00 18255 /lib/x86_64-linux-gnu/libdl-2.23.so 7ff3232b4000-7ff3232b5000 r--p 00002000 fc:00 18255 /lib/x86_64-linux-gnu/libdl-2.23.so 7ff3232b5000-7ff3232b6000 rw-p 00003000 fc:00 18255 /lib/x86_64-linux-gnu/libdl-2.23.so 7ff3232b6000-7ff3232c1000 r-xp 00000000 fc:00 295284 /usr/lib/x86_64-linux-gnu/libjbig.so.0 7ff3232c1000-7ff3234c0000 ---p 0000b000 fc:00 295284 /usr/lib/x86_64-linux-gnu/libjbig.so.0 7ff3234c0000-7ff3234c1000 r--p 0000a000 fc:00 295284 /usr/lib/x86_64-linux-gnu/libjbig.so.0 7ff3234c1000-7ff3234c4000 rw-p 0000b000 fc:00 295284 /usr/lib/x86_64-linux-gnu/libjbig.so.0 7ff3234c4000-7ff3234e5000 r-xp 00000000 fc:00 551 /lib/x86_64-linux-gnu/liblzma.so.5.0.0 7ff3234e5000-7ff3236e4000 ---p 00021000 fc:00 551 /lib/x86_64-linux-gnu/liblzma.so.5.0.0 7ff3236e4000-7ff3236e5000 r--p 00020000 fc:00 551 /lib/x86_64-linux-gnu/liblzma.so.5.0.0 7ff3236e5000-7ff3236e6000 rw-p 00021000 fc:00 551 /lib/x86_64-linux-gnu/liblzma.so.5.0.0 7ff3236e6000-7ff323756000 r-xp 00000000 fc:00 295506 /usr/lib/x86_64-linux-gnu/libtiff.so.5.2.4 7ff323756000-7ff323956000 ---p 00070000 fc:00 295506 /usr/lib/x86_64-linux-gnu/libtiff.so.5.2.4 7ff323956000-7ff323957000 r--p 00070000 fc:00 295506 /usr/lib/x86_64-linux-gnu/libtiff.so.5.2.4 7ff323957000-7ff32395a000 rw-p 00071000 fc:00 295506 /usr/lib/x86_64-linux-gnu/libtiff.so.5.2.4 7ff32395a000-7ff3239b1000 r-xp 00000000 fc:00 295274 /usr/lib/x86_64-linux-gnu/libjpeg.so.8.0.2 7ff3239b1000-7ff323bb1000 ---p 00057000 fc:00 295274 /usr/lib/x86_64-linux-gnu/libjpeg.so.8.0.2 7ff323bb1000-7ff323bb2000 r--p 00057000 fc:00 295274 /usr/lib/x86_64-linux-gnu/libjpeg.so.8.0.2 7ff323bb2000-7ff323bb3000 rw-p 00058000 fc:00 295274 /usr/lib/x86_64-linux-gnu/libjpeg.so.8.0.2 7ff323bb3000-7ff323bd7000 r-xp 00000000 fc:00 593 /lib/x86_64-linux-gnu/libpng12.so.0.54.0 7ff323bd7000-7ff323dd6000 ---p 00024000 fc:00 593 /lib/x86_64-linux-gnu/libpng12.so.0.54.0 7ff323dd6000-7ff323dd7000 r--p 00023000 fc:00 593 /lib/x86_64-linux-gnu/libpng12.so.0.54.0 7ff323dd7000-7ff323dd8000 rw-p 00024000 fc:00 593 /lib/x86_64-linux-gnu/libpng12.so.0.54.0 7ff323dd8000-7ff323df1000 r-xp 00000000 fc:00 634 /lib/x86_64-linux-gnu/libz.so.1.2.8 7ff323df1000-7ff323ff0000 ---p 00019000 fc:00 634 /lib/x86_64-linux-gnu/libz.so.1.2.8 7ff323ff0000-7ff323ff1000 r--p 00018000 fc:00 634 /lib/x86_64-linux-gnu/libz.so.1.2.8 7ff323ff1000-7ff323ff2000 rw-p 00019000 fc:00 634 /lib/x86_64-linux-gnu/libz.so.1.2.8 7ff323ff2000-7ff324008000 r-xp 00000000 fc:00 537 /lib/x86_64-linux-gnu/libgcc_s.so.1 7ff324008000-7ff324207000 ---p 00016000 fc:00 537 /lib/x86_64-linux-gnu/libgcc_s.so.1 7ff324207000-7ff324208000 rw-p 00015000 fc:00 537 /lib/x86_64-linux-gnu/libgcc_s.so.1 7ff324208000-7ff32437a000 r-xp 00000000 fc:00 264454 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21 7ff32437a000-7ff32457a000 ---p 00172000 fc:00 264454 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21 7ff32457a000-7ff324584000 r--p 00172000 fc:00 264454 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21 7ff324584000-7ff324586000 rw-p 0017c000 fc:00 264454 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21 7ff324586000-7ff32458a000 rw-p 00000000 00:00 0 7ff32458a000-7ff3245a2000 r-xp 00000000 fc:00 18252 /lib/x86_64-linux-gnu/libpthread-2.23.so 7ff3245a2000-7ff3247a1000 ---p 00018000 fc:00 18252 /lib/x86_64-linux-gnu/libpthread-2.23.so 7ff3247a1000-7ff3247a2000 r--p 00017000 fc:00 18252 /lib/x86_64-linux-gnu/libpthread-2.23.so 7ff3247a2000-7ff3247a3000 rw-p 00018000 fc:00 18252 /lib/x86_64-linux-gnu/libpthread-2.23.so 7ff3247a3000-7ff3247a7000 rw-p 00000000 00:00 0 7ff3247a7000-7ff324967000 r-xp 00000000 fc:00 18253 /lib/x86_64-linux-gnu/libc-2.23.so 7ff324967000-7ff324b67000 ---p 001c0000 fc:00 18253 /lib/x86_64-linux-gnu/libc-2.23.so 7ff324b67000-7ff324b6b000 r--p 001c0000 fc:00 18253 /lib/x86_64-linux-gnu/libc-2.23.so 7ff324b6b000-7ff324b6d000 rw-p 001c4000 fc:00 18253 /lib/x86_64-linux-gnu/libc-2.23.so 7ff324b6d000-7ff324b71000 rw-p 00000000 00:00 0 7ff324b71000-7ff324dd7000 r-xp 00000000 fc:00 295676 /usr/local/lib/liblept.so.5.0.1 7ff324dd7000-7ff324fd6000 ---p 00266000 fc:00 295676 /usr/local/lib/liblept.so.5.0.1 7ff324fd6000-7ff324fd7000 r--p 00265000 fc:00 295676 /usr/local/lib/liblept.so.5.0.1 7ff324fd7000-7ff324fe0000 rw-p 00266000 fc:00 295676 /usr/local/lib/liblept.so.5.0.1 7ff324fe0000-7ff3252c9000 r-xp 00000000 fc:00 297695 /usr/lib/libtesseract.so.3.0.4 7ff3252c9000-7ff3254c9000 ---p 002e9000 fc:00 297695 /usr/lib/libtesseract.so.3.0.4 7ff3254c9000-7ff3254cd000 r--p 002e9000 fc:00 297695 /usr/lib/libtesseract.so.3.0.4 7ff3254cd000-7ff3254ce000 rw-p 002ed000 fc:00 297695 /usr/lib/libtesseract.so.3.0.4 7ff3254ce000-7ff325762000 rw-p 00000000 00:00 0 7ff325762000-7ff32586a000 r-xp 00000000 fc:00 16863 /lib/x86_64-linux-gnu/libm-2.23.so 7ff32586a000-7ff325a69000 ---p 00108000 fc:00 16863 /lib/x86_64-linux-gnu/libm-2.23.so 7ff325a69000-7ff325a6a000 r--p 00107000 fc:00 16863 /lib/x86_64-linux-gnu/libm-2.23.so 7ff325a6a000-7ff325a6b000 rw-p 00108000 fc:00 16863 /lib/x86_64-linux-gnu/libm-2.23.so 7ff325a6b000-7ff325a91000 r-xp 00000000 fc:00 18251 /lib/x86_64-linux-gnu/ld-2.23.so 7ff325b7d000-7ff325c7f000 rw-p 00000000 00:00 0 7ff325c8f000-7ff325c90000 rw-p 00000000 00:00 0 7ff325c90000-7ff325c91000 r--p 00025000 fc:00 18251 /lib/x86_64-linux-gnu/ld-2.23.so 7ff325c91000-7ff325c92000 rw-p 00026000 fc:00 18251 /lib/x86_64-linux-gnu/ld-2.23.so 7ff325c92000-7ff325c93000 rw-p 00000000 00:00 0 7ffc1c9c3000-7ffc1c9e4000 rw-p 00000000 00:00 0 [stack] 7ffc1c9e4000-7ffc1c9e7000 r--p 00000000 00:00 0 [vvar] 7ffc1c9e7000-7ffc1c9e9000 r-xp 00000000 00:00 0 [vdso] ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall] Aborted (core dumped) ``` duplicated subtitles: first is with fonts tags and then without them. Also when generating spupng, where are the non-color subtitles there are empty (transparent) PNGs full log and ts is here: [https://goo.gl/DmLjji](https://goo.gl/DmLjji)
claunia added the needs-confirmation-of-being-brokenOCRdifficulty: medium labels 2026-01-29 16:43:05 +00:00
Author
Owner

@thealphadollar commented on GitHub (Mar 6, 2018):

I would like to look into this bug in sometime but before me if someone wants to try, the below link could be a good starting point.

https://github.com/tesseract-ocr/tesseract/issues/427

@thealphadollar commented on GitHub (Mar 6, 2018): I would like to look into this bug in sometime but before me if someone wants to try, the below link could be a good starting point. https://github.com/tesseract-ocr/tesseract/issues/427
Author
Owner

@thealphadollar commented on GitHub (Mar 6, 2018):

The same issue can be reproduced in this sample from our own sample files.

The issue is, most probably, concerned with Tesseract.

@thealphadollar commented on GitHub (Mar 6, 2018): The same issue can be reproduced in this [sample ](https://drive.google.com/file/d/1Qm6F0z8r3K2DliICep9Dw7cfiaklZ_2T/view?usp=sharing) from our own sample files. The issue is, most probably, concerned with Tesseract.
Author
Owner

@cfsmp3 commented on GitHub (Mar 8, 2018):

I can't reproduce the crash with current master.

@cfsmp3 commented on GitHub (Mar 8, 2018): I can't reproduce the crash with current master.
Author
Owner

@thealphadollar commented on GitHub (Mar 8, 2018):

@cfsmp3 I tried it on my system (Linux) and the issue is for real I would say. I used the latest commit, fetched just now :)

screenshot from 2018-03-08 09-15-48

The git log for the version used:

screenshot from 2018-03-08 09-18-00

Arguments used are exactly the same as given in issue,
-quant 0 -nofc -in=ts -datapid 0x1de7 -out=srt -stdout -nobom -trim -noteletext -codec dvbsub -dvblang bul -ocrlang bul cinemax.ts

I'm using tesseract version 3.04.01-6, which is latest at the moment.

This has slim chances, but may be a different version of Tesseract could be making the difference since I think this error is related to OCR'ing.

@thealphadollar commented on GitHub (Mar 8, 2018): @cfsmp3 I tried it on my system (Linux) and the issue is for real I would say. I used the latest commit, fetched just now :) ![screenshot from 2018-03-08 09-15-48](https://user-images.githubusercontent.com/32812320/37132045-a32263f0-22b1-11e8-943d-84f26ab256cd.png) The git log for the version used: ![screenshot from 2018-03-08 09-18-00](https://user-images.githubusercontent.com/32812320/37132094-e4682f0c-22b1-11e8-9ec6-6f0c433b9231.png) Arguments used are exactly the same as given in issue, `-quant 0 -nofc -in=ts -datapid 0x1de7 -out=srt -stdout -nobom -trim -noteletext -codec dvbsub -dvblang bul -ocrlang bul cinemax.ts` I'm using tesseract version `3.04.01-6`, which is latest at the moment. This has slim chances, but may be a different version of Tesseract could be making the difference since I think this error is related to OCR'ing.
Author
Owner

@cfsmp3 commented on GitHub (Mar 8, 2018):

I do see those messages Pix... as well, but not a segfault.
Does it segfault for you too?

On Wed, Mar 7, 2018 at 7:58 PM, Shivam Kumar Jha notifications@github.com
wrote:

@cfsmp3 https://github.com/cfsmp3 I tried it on my system (Linux) and
the issue is for real I would say. I used the latest commit, fetched just
now :)

[image: screenshot from 2018-03-08 09-15-48]
https://user-images.githubusercontent.com/32812320/37132045-a32263f0-22b1-11e8-943d-84f26ab256cd.png

The git log for the version used:

[image: screenshot from 2018-03-08 09-18-00]
https://user-images.githubusercontent.com/32812320/37132094-e4682f0c-22b1-11e8-9ec6-6f0c433b9231.png

Arguments used are exactly the same as given in issue,
-quant 0 -nofc -in=ts -datapid 0x1de7 -out=srt -stdout -nobom -trim
-noteletext -codec dvbsub -dvblang bul -ocrlang bul cinemax.ts

I'm using tesseract version 3.04.01-6, which is latest at the moment.

This has slim chances, but may be a different version of Tesseract could
be making the difference since I think this error is related to OCR'ing.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/CCExtractor/ccextractor/issues/956#issuecomment-371371220,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFrJ2Y4-kRc6BuH0i4yi6HzQTMtdcbXyks5tcKxagaJpZM4SetCK
.

@cfsmp3 commented on GitHub (Mar 8, 2018): I do see those messages Pix... as well, but not a segfault. Does it segfault for you too? On Wed, Mar 7, 2018 at 7:58 PM, Shivam Kumar Jha <notifications@github.com> wrote: > @cfsmp3 <https://github.com/cfsmp3> I tried it on my system (Linux) and > the issue is for real I would say. I used the latest commit, fetched just > now :) > > [image: screenshot from 2018-03-08 09-15-48] > <https://user-images.githubusercontent.com/32812320/37132045-a32263f0-22b1-11e8-943d-84f26ab256cd.png> > > The git log for the version used: > > [image: screenshot from 2018-03-08 09-18-00] > <https://user-images.githubusercontent.com/32812320/37132094-e4682f0c-22b1-11e8-9ec6-6f0c433b9231.png> > > Arguments used are exactly the same as given in issue, > -quant 0 -nofc -in=ts -datapid 0x1de7 -out=srt -stdout -nobom -trim > -noteletext -codec dvbsub -dvblang bul -ocrlang bul cinemax.ts > > I'm using tesseract version 3.04.01-6, which is latest at the moment. > > This has slim chances, but may be a different version of Tesseract could > be making the difference since I think this error is related to OCR'ing. > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub > <https://github.com/CCExtractor/ccextractor/issues/956#issuecomment-371371220>, > or mute the thread > <https://github.com/notifications/unsubscribe-auth/AFrJ2Y4-kRc6BuH0i4yi6HzQTMtdcbXyks5tcKxagaJpZM4SetCK> > . >
Author
Owner

@thealphadollar commented on GitHub (Mar 8, 2018):

With the --nofontcolor parameter it gives me no segfault but produces the error shown in my last comment. When I don't use the "-nofc" parameter, it gives me a segfault.

screenshot from 2018-03-08 12-50-51

argument used: ccextractor -quant 0 -in=ts -datapid 0x1de7 -out=srt -stdout -nobom -trim -noteletext -codec dvbsub -dvblang bul -ocrlang bul cinemax.ts

@thealphadollar commented on GitHub (Mar 8, 2018): With the `--nofontcolor` parameter it gives me no segfault but produces the error shown in my last comment. When I don't use the "-nofc" parameter, it gives me a segfault. ![screenshot from 2018-03-08 12-50-51](https://user-images.githubusercontent.com/32812320/37138372-dc41a43e-22cf-11e8-885b-5554527b76b7.png) argument used: `ccextractor -quant 0 -in=ts -datapid 0x1de7 -out=srt -stdout -nobom -trim -noteletext -codec dvbsub -dvblang bul -ocrlang bul cinemax.ts`
Author
Owner

@cfsmp3 commented on GitHub (Apr 9, 2018):

This trace gives a clue:

=================================================================
==323==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x610000003bf4 at pc 0x7fbda8ecb904 bp 0x7ffcae4e6ec0 sp 0x7ffcae4e6668
WRITE of size 65 at 0x610000003bf4 thread T0
#0 0x7fbda8ecb903 in __asan_memcpy (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x8c903)
#1 0x42b7a3 in memcpy /usr/include/x86_64-linux-gnu/bits/string3.h:53
#2 0x42b7a3 in ocr_bitmap ../src/lib_ccx/ocr.c:571
#3 0x42ca2e in ocr_rect ../src/lib_ccx/ocr.c:815
#4 0x4665b5 in write_dvb_sub ../src/lib_ccx/dvb_subtitle_decoder.c:1664
#5 0x4665b5 in dvbsub_handle_display_segment ../src/lib_ccx/dvb_subtitle_decoder.c:1713
#6 0x468b8e in dvbsub_decode ../src/lib_ccx/dvb_subtitle_decoder.c:1821
#7 0x446886 in process_data ../src/lib_ccx/general_loop.c:651
#8 0x44839c in general_loop ../src/lib_ccx/general_loop.c:1027
#9 0x40815a in api_start ../src/ccextractor.c:209
#10 0x409744 in main ../src/ccextractor.c:532
#11 0x7fbda7bc782f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
#12 0x4079f8 in _start (/usr/local/src/ccextractor/linux/ccextractor+0x4079f8)

0x610000003bf4 is located 0 bytes to the right of 180-byte region [0x610000003b40,0x610000003bf4)
allocated by thread T0 here:
#0 0x7fbda8ed7602 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98602)
#1 0x42b4fc in ocr_bitmap ../src/lib_ccx/ocr.c:513
#2 0x42ca2e in ocr_rect ../src/lib_ccx/ocr.c:815
#3 0x4665b5 in write_dvb_sub ../src/lib_ccx/dvb_subtitle_decoder.c:1664
#4 0x4665b5 in dvbsub_handle_display_segment ../src/lib_ccx/dvb_subtitle_decoder.c:1713
#5 0x468b8e in dvbsub_decode ../src/lib_ccx/dvb_subtitle_decoder.c:1821
#6 0x446886 in process_data ../src/lib_ccx/general_loop.c:651
#7 0x44839c in general_loop ../src/lib_ccx/general_loop.c:1027
#8 0x40815a in api_start ../src/ccextractor.c:209
#9 0x409744 in main ../src/ccextractor.c:532
#10 0x7fbda7bc782f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

SUMMARY: AddressSanitizer: heap-buffer-overflow ??:0 __asan_memcpy
Shadow bytes around the buggy address:
0x0c207fff8720: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fd fd
0x0c207fff8730: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fa
0x0c207fff8740: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c207fff8750: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c207fff8760: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00
=>0x0c207fff8770: 00 00 00 00 00 00 00 00 00 00 00 00 00 00[04]fa
0x0c207fff8780: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fd fd
0x0c207fff8790: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fa
0x0c207fff87a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c207fff87b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c207fff87c0: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fd fd
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Heap right redzone: fb
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack partial redzone: f4
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
==323==ABORTING

However, even though eventually we crash, there's lots of issues before it... so this issue is definitely a must-solve by the student in charge of the OCR improvements during GSoC.

@cfsmp3 commented on GitHub (Apr 9, 2018): This trace gives a clue: ================================================================= ==323==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x610000003bf4 at pc 0x7fbda8ecb904 bp 0x7ffcae4e6ec0 sp 0x7ffcae4e6668 WRITE of size 65 at 0x610000003bf4 thread T0 #0 0x7fbda8ecb903 in __asan_memcpy (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x8c903) #1 0x42b7a3 in memcpy /usr/include/x86_64-linux-gnu/bits/string3.h:53 #2 0x42b7a3 in ocr_bitmap ../src/lib_ccx/ocr.c:571 #3 0x42ca2e in ocr_rect ../src/lib_ccx/ocr.c:815 #4 0x4665b5 in write_dvb_sub ../src/lib_ccx/dvb_subtitle_decoder.c:1664 #5 0x4665b5 in dvbsub_handle_display_segment ../src/lib_ccx/dvb_subtitle_decoder.c:1713 #6 0x468b8e in dvbsub_decode ../src/lib_ccx/dvb_subtitle_decoder.c:1821 #7 0x446886 in process_data ../src/lib_ccx/general_loop.c:651 #8 0x44839c in general_loop ../src/lib_ccx/general_loop.c:1027 #9 0x40815a in api_start ../src/ccextractor.c:209 #10 0x409744 in main ../src/ccextractor.c:532 #11 0x7fbda7bc782f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) #12 0x4079f8 in _start (/usr/local/src/ccextractor/linux/ccextractor+0x4079f8) 0x610000003bf4 is located 0 bytes to the right of 180-byte region [0x610000003b40,0x610000003bf4) allocated by thread T0 here: #0 0x7fbda8ed7602 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98602) #1 0x42b4fc in ocr_bitmap ../src/lib_ccx/ocr.c:513 #2 0x42ca2e in ocr_rect ../src/lib_ccx/ocr.c:815 #3 0x4665b5 in write_dvb_sub ../src/lib_ccx/dvb_subtitle_decoder.c:1664 #4 0x4665b5 in dvbsub_handle_display_segment ../src/lib_ccx/dvb_subtitle_decoder.c:1713 #5 0x468b8e in dvbsub_decode ../src/lib_ccx/dvb_subtitle_decoder.c:1821 #6 0x446886 in process_data ../src/lib_ccx/general_loop.c:651 #7 0x44839c in general_loop ../src/lib_ccx/general_loop.c:1027 #8 0x40815a in api_start ../src/ccextractor.c:209 #9 0x409744 in main ../src/ccextractor.c:532 #10 0x7fbda7bc782f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) SUMMARY: AddressSanitizer: heap-buffer-overflow ??:0 __asan_memcpy Shadow bytes around the buggy address: 0x0c207fff8720: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fd fd 0x0c207fff8730: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fa 0x0c207fff8740: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c207fff8750: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c207fff8760: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00 =>0x0c207fff8770: 00 00 00 00 00 00 00 00 00 00 00 00 00 00[04]fa 0x0c207fff8780: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fd fd 0x0c207fff8790: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fa 0x0c207fff87a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c207fff87b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c207fff87c0: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fd fd Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe ==323==ABORTING However, even though eventually we crash, there's lots of issues before it... so this issue is definitely a must-solve by the student in charge of the OCR improvements during GSoC.
Author
Owner

@cfsmp3 commented on GitHub (Apr 9, 2018):

valgrind output:

==791== Invalid write of size 1
==791== at 0x4C3275B: memcpy@@GLIBC_2.14 (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==791== by 0x41C95A: ocr_bitmap (ocr.c:571)
==791== by 0x41D4BF: ocr_rect (ocr.c:815)
==791== by 0x43DE06: write_dvb_sub (dvb_subtitle_decoder.c:1664)
==791== by 0x43E104: dvbsub_handle_display_segment (dvb_subtitle_decoder.c:1713)
==791== by 0x43E583: dvbsub_decode (dvb_subtitle_decoder.c:1821)
==791== by 0x42ABCE: process_data (general_loop.c:651)
==791== by 0x42BB7F: general_loop (general_loop.c:1027)
==791== by 0x4072C3: api_start (ccextractor.c:209)
==791== by 0x407FDF: main (ccextractor.c:532)
==791== Address 0x155f8a84 is 0 bytes after a block of size 180 alloc'd
==791== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==791== by 0x41C616: ocr_bitmap (ocr.c:513)
==791== by 0x41D4BF: ocr_rect (ocr.c:815)
==791== by 0x43DE06: write_dvb_sub (dvb_subtitle_decoder.c:1664)
==791== by 0x43E104: dvbsub_handle_display_segment (dvb_subtitle_decoder.c:1713)
==791== by 0x43E583: dvbsub_decode (dvb_subtitle_decoder.c:1821)
==791== by 0x42ABCE: process_data (general_loop.c:651)
==791== by 0x42BB7F: general_loop (general_loop.c:1027)
==791== by 0x4072C3: api_start (ccextractor.c:209)
==791== by 0x407FDF: main (ccextractor.c:532)
==791==
==791== Invalid write of size 1
==791== at 0x4C3275B: memcpy@@GLIBC_2.14 (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==791== by 0x41C9D5: ocr_bitmap (ocr.c:578)
==791== by 0x41D4BF: ocr_rect (ocr.c:815)
==791== by 0x43DE06: write_dvb_sub (dvb_subtitle_decoder.c:1664)
==791== by 0x43E104: dvbsub_handle_display_segment (dvb_subtitle_decoder.c:1713)
==791== by 0x43E583: dvbsub_decode (dvb_subtitle_decoder.c:1821)
==791== by 0x42ABCE: process_data (general_loop.c:651)
==791== by 0x42BB7F: general_loop (general_loop.c:1027)
==791== by 0x4072C3: api_start (ccextractor.c:209)
==791== by 0x407FDF: main (ccextractor.c:532)
==791== Address 0x155f8aa0 is 16 bytes after a block of size 192 in arena "client"
==791==
==791== Invalid write of size 1
==791== at 0x41CA18: ocr_bitmap (ocr.c:586)
==791== by 0x41D4BF: ocr_rect (ocr.c:815)
==791== by 0x43DE06: write_dvb_sub (dvb_subtitle_decoder.c:1664)
==791== by 0x43E104: dvbsub_handle_display_segment (dvb_subtitle_decoder.c:1713)
==791== by 0x43E583: dvbsub_decode (dvb_subtitle_decoder.c:1821)
==791== by 0x42ABCE: process_data (general_loop.c:651)
==791== by 0x42BB7F: general_loop (general_loop.c:1027)
==791== by 0x4072C3: api_start (ccextractor.c:209)
==791== by 0x407FDF: main (ccextractor.c:532)
==791== Address 0x155f8aa7 is 23 bytes after a block of size 192 in arena "client"

[etc]

@cfsmp3 commented on GitHub (Apr 9, 2018): valgrind output: ==791== Invalid write of size 1 ==791== at 0x4C3275B: memcpy@@GLIBC_2.14 (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==791== by 0x41C95A: ocr_bitmap (ocr.c:571) ==791== by 0x41D4BF: ocr_rect (ocr.c:815) ==791== by 0x43DE06: write_dvb_sub (dvb_subtitle_decoder.c:1664) ==791== by 0x43E104: dvbsub_handle_display_segment (dvb_subtitle_decoder.c:1713) ==791== by 0x43E583: dvbsub_decode (dvb_subtitle_decoder.c:1821) ==791== by 0x42ABCE: process_data (general_loop.c:651) ==791== by 0x42BB7F: general_loop (general_loop.c:1027) ==791== by 0x4072C3: api_start (ccextractor.c:209) ==791== by 0x407FDF: main (ccextractor.c:532) ==791== Address 0x155f8a84 is 0 bytes after a block of size 180 alloc'd ==791== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==791== by 0x41C616: ocr_bitmap (ocr.c:513) ==791== by 0x41D4BF: ocr_rect (ocr.c:815) ==791== by 0x43DE06: write_dvb_sub (dvb_subtitle_decoder.c:1664) ==791== by 0x43E104: dvbsub_handle_display_segment (dvb_subtitle_decoder.c:1713) ==791== by 0x43E583: dvbsub_decode (dvb_subtitle_decoder.c:1821) ==791== by 0x42ABCE: process_data (general_loop.c:651) ==791== by 0x42BB7F: general_loop (general_loop.c:1027) ==791== by 0x4072C3: api_start (ccextractor.c:209) ==791== by 0x407FDF: main (ccextractor.c:532) ==791== ==791== Invalid write of size 1 ==791== at 0x4C3275B: memcpy@@GLIBC_2.14 (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==791== by 0x41C9D5: ocr_bitmap (ocr.c:578) ==791== by 0x41D4BF: ocr_rect (ocr.c:815) ==791== by 0x43DE06: write_dvb_sub (dvb_subtitle_decoder.c:1664) ==791== by 0x43E104: dvbsub_handle_display_segment (dvb_subtitle_decoder.c:1713) ==791== by 0x43E583: dvbsub_decode (dvb_subtitle_decoder.c:1821) ==791== by 0x42ABCE: process_data (general_loop.c:651) ==791== by 0x42BB7F: general_loop (general_loop.c:1027) ==791== by 0x4072C3: api_start (ccextractor.c:209) ==791== by 0x407FDF: main (ccextractor.c:532) ==791== Address 0x155f8aa0 is 16 bytes after a block of size 192 in arena "client" ==791== ==791== Invalid write of size 1 ==791== at 0x41CA18: ocr_bitmap (ocr.c:586) ==791== by 0x41D4BF: ocr_rect (ocr.c:815) ==791== by 0x43DE06: write_dvb_sub (dvb_subtitle_decoder.c:1664) ==791== by 0x43E104: dvbsub_handle_display_segment (dvb_subtitle_decoder.c:1713) ==791== by 0x43E583: dvbsub_decode (dvb_subtitle_decoder.c:1821) ==791== by 0x42ABCE: process_data (general_loop.c:651) ==791== by 0x42BB7F: general_loop (general_loop.c:1027) ==791== by 0x4072C3: api_start (ccextractor.c:209) ==791== by 0x407FDF: main (ccextractor.c:532) ==791== Address 0x155f8aa7 is 23 bytes after a block of size 192 in arena "client" [etc]
Author
Owner

@cfsmp3 commented on GitHub (Jan 25, 2020):

@tsmarinov Is this still happening?

@cfsmp3 commented on GitHub (Jan 25, 2020): @tsmarinov Is this still happening?
Author
Owner

@cfsmp3 commented on GitHub (Nov 21, 2021):

Closing due to original poster not responding.

@cfsmp3 commented on GitHub (Nov 21, 2021): Closing due to original poster not responding.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ccextractor#403