rmtheis / tess-two

Fork of Tesseract Tools for Android
Apache License 2.0
3.76k stars 1.38k forks source link

SIGSEGV encountered when using getHOCRText #180

Closed rmtheis closed 8 years ago

rmtheis commented 8 years ago

Using commit 21e404851b70b39884bdbfe630cbb7c0ddfacd6d and "eng".

11-06 20:45:33.708 25090-26667/? A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x38 in tid 26667 (Thread-19881)
11-06 20:45:33.839 373-373/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
11-06 20:45:33.840 373-373/? A/DEBUG: Build fingerprint: 'google/shamu/shamu:6.0.1/MOB31H/3234857:user/release-keys'
11-06 20:45:33.841 373-373/? A/DEBUG: Revision: '0'
11-06 20:45:33.842 373-373/? A/DEBUG: ABI: 'arm'
11-06 20:45:33.842 373-373/? A/DEBUG: pid: 25090, tid: 26667, name: Thread-19881  >>> edu.sfsu.cs.orange.ocr <<<
11-06 20:45:33.842 373-373/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x38
11-06 20:45:33.860 373-373/? A/DEBUG:     r0 00000038  r1 0000000b  r2 00000014  r3 00000032
11-06 20:45:33.861 373-373/? A/DEBUG:     r4 b6cd430c  r5 00000001  r6 b6cd4310  r7 a08b92c8
11-06 20:45:33.861 373-373/? A/DEBUG:     r8 a1378b53  r9 00000004  sl 00000000  fp a025e810
11-06 20:45:33.861 373-373/? A/DEBUG:     ip a13c7dd0  sp a08b92b8  lr a1267f9b  pc a127b380  cpsr 80030030
11-06 20:45:33.896 373-373/? A/DEBUG: backtrace:
11-06 20:45:33.897 373-373/? A/DEBUG:     #00 pc 000fc380  /data/app/edu.sfsu.cs.orange.ocr-2/lib/arm/libtess.so (_Z14FreeFeatureSetP18FEATURE_SET_STRUCT+35)
11-06 20:45:33.897 373-373/? A/DEBUG:     #01 pc 000e8f97  /data/app/edu.sfsu.cs.orange.ocr-2/lib/arm/libtess.so (_ZN9tesseract8Classify11AdaptToCharEP5TBLOBiifP22ADAPT_TEMPLATES_STRUCT+318)
11-06 20:45:33.898 373-373/? A/DEBUG:     #02 pc 000e8ce1  /data/app/edu.sfsu.cs.orange.ocr-2/lib/arm/libtess.so (_ZN9tesseract8Classify11LearnPiecesEPKciifNS_20CharSegmentationTypeES2_P8WERD_RES+432)
11-06 20:45:33.898 373-373/? A/DEBUG:     #03 pc 000e8955  /data/app/edu.sfsu.cs.orange.ocr-2/lib/arm/libtess.so (_ZN9tesseract8Classify9LearnWordEPKcP8WERD_RES+360)
11-06 20:45:33.898 373-373/? A/DEBUG:     #04 pc 000969bd  /data/app/edu.sfsu.cs.orange.ocr-2/lib/arm/libtess.so (_ZN9tesseract9Tesseract19classify_word_pass1ERKNS_8WordDataEPP8WERD_RESPNS_13PointerVectorIS4_EE+128)
11-06 20:45:33.898 373-373/? A/DEBUG:     #05 pc 0009545b  /data/app/edu.sfsu.cs.orange.ocr-2/lib/arm/libtess.so (_ZN9tesseract9Tesseract17RetryWithLanguageERKNS_8WordDataEMS0_FvS3_PP8WERD_RESPNS_13PointerVectorIS4_EEES6_S9_+126)
11-06 20:45:33.898 373-373/? A/DEBUG:     #06 pc 00092bc1  /data/app/edu.sfsu.cs.orange.ocr-2/lib/arm/libtess.so (_ZN9tesseract9Tesseract26classify_word_and_languageEiP11PAGE_RES_ITPNS_8WordDataE+272)
11-06 20:45:33.899 373-373/? A/DEBUG:     #07 pc 0009658f  /data/app/edu.sfsu.cs.orange.ocr-2/lib/arm/libtess.so (_ZN9tesseract9Tesseract18ClassifyBlobAsWordEiP11PAGE_RES_ITP6C_BLOBP6STRINGPf+250)
11-06 20:45:33.899 373-373/? A/DEBUG:     #08 pc 000967ff  /data/app/edu.sfsu.cs.orange.ocr-2/lib/arm/libtess.so (_ZN9tesseract9Tesseract24ClassifyBlobPlusOutlinesERK13GenericVectorIbERKS1_IP9C_OUTLINEEiP11PAGE_RES_ITP6C_BLOBP6STRING+378)
11-06 20:45:33.899 373-373/? A/DEBUG:     #09 pc 0009627b  /data/app/edu.sfsu.cs.orange.ocr-2/lib/arm/libtess.so (_ZN9tesseract9Tesseract27SelectGoodDiacriticOutlinesEifP11PAGE_RES_ITP6C_BLOBRK13GenericVectorIP9C_OUTLINEEiPS5_IbE+538)
11-06 20:45:33.899 373-373/? A/DEBUG:     #10 pc 00095bab  /data/app/edu.sfsu.cs.orange.ocr-2/lib/arm/libtess.so (_ZN9tesseract9Tesseract34AssignDiacriticsToOverlappingBlobsERK13GenericVectorIP9C_OUTLINEEiP4WERDP11PAGE_RES_ITPS1_IbESC_PS1_IP6C_BLOBE+650)
11-06 20:45:33.899 373-373/? A/DEBUG:     #11 pc 000934df  /data/app/edu.sfsu.cs.orange.ocr-2/lib/arm/libtess.so (_ZN9tesseract9Tesseract18ReassignDiacriticsEiP11PAGE_RES_ITPb+186)
11-06 20:45:33.899 373-373/? A/DEBUG:     #12 pc 000932a1  /data/app/edu.sfsu.cs.orange.ocr-2/lib/arm/libtess.so (_ZN9tesseract9Tesseract18RecogAllWordsPassNEiP10ETEXT_DESCP11PAGE_RES_ITP13GenericVectorINS_8WordDataEE+376)
11-06 20:45:33.900 373-373/? A/DEBUG:     #13 pc 00093907  /data/app/edu.sfsu.cs.orange.ocr-2/lib/arm/libtess.so (_ZN9tesseract9Tesseract15recog_all_wordsEP8PAGE_RESP10ETEXT_DESCPK4TBOXPKci+306)
11-06 20:45:33.900 373-373/? A/DEBUG:     #14 pc 000892a5  /data/app/edu.sfsu.cs.orange.ocr-2/lib/arm/libtess.so (_ZN9tesseract11TessBaseAPI9RecognizeEP10ETEXT_DESC+476)
11-06 20:45:33.900 373-373/? A/DEBUG:     #15 pc 00089c7d  /data/app/edu.sfsu.cs.orange.ocr-2/lib/arm/libtess.so (_ZN9tesseract11TessBaseAPI11GetHOCRTextEP10ETEXT_DESCi+36)
11-06 20:45:33.900 373-373/? A/DEBUG:     #16 pc 0017cc05  /data/app/edu.sfsu.cs.orange.ocr-2/lib/arm/libtess.so (Java_com_googlecode_tesseract_android_TessBaseAPI_nativeGetHOCRText+96)
11-06 20:45:33.900 373-373/? A/DEBUG:     #17 pc 0007026b  /data/app/edu.sfsu.cs.orange.ocr-2/oat/arm/base.odex (offset 0x62000) (java.lang.String com.googlecode.tesseract.android.TessBaseAPI.nativeGetHOCRText(long, int)+102)
11-06 20:45:33.900 373-373/? A/DEBUG:     #18 pc 00071a69  /data/app/edu.sfsu.cs.orange.ocr-2/oat/arm/base.odex (offset 0x62000) (java.lang.String com.googlecode.tesseract.android.TessBaseAPI.getHOCRText(int)+156)
11-06 20:45:33.900 373-373/? A/DEBUG:     #19 pc 0007c4ab  /data/app/edu.sfsu.cs.orange.ocr-2/oat/arm/base.odex (offset 0x62000) (edu.sfsu.cs.orange.ocr.OcrResult edu.sfsu.cs.orange.ocr.DecodeHandler.getOcrResult()+222)
11-06 20:45:33.901 373-373/? A/DEBUG:     #20 pc 0007ca41  /data/app/edu.sfsu.cs.orange.ocr-2/oat/arm/base.odex (offset 0x62000) (void edu.sfsu.cs.orange.ocr.DecodeHandler.ocrContinuousDecode(byte[], int, int)+228)
11-06 20:45:33.901 373-373/? A/DEBUG:     #21 pc 0007d10b  /data/app/edu.sfsu.cs.orange.ocr-2/oat/arm/base.odex (offset 0x62000) (void edu.sfsu.cs.orange.ocr.DecodeHandler.handleMessage(android.os.Message)+342)
11-06 20:45:33.901 373-373/? A/DEBUG:     #22 pc 73d315d1  /data/dalvik-cache/arm/system@framework@boot.oat (offset 0x1ed6000)
11-06 20:45:34.816 373-373/? A/DEBUG: Tombstone written to: /data/tombstones/tombstone_09
rmtheis commented 8 years ago
11-06 20:58:37.447 29049-29157/edu.sfsu.cs.orange.ocr A/libc: Invalid address 0xb4d40dcc passed to free: invalid page index
11-06 20:58:37.447 29049-29157/edu.sfsu.cs.orange.ocr A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0xf in tid 29157 (Thread-19924)
11-06 20:58:37.499 373-373/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
11-06 20:58:37.499 373-373/? A/DEBUG: Build fingerprint: 'google/shamu/shamu:6.0.1/MOB31H/3234857:user/release-keys'
11-06 20:58:37.499 373-373/? A/DEBUG: Revision: '0'
11-06 20:58:37.499 373-373/? A/DEBUG: ABI: 'arm'
11-06 20:58:37.500 373-373/? A/DEBUG: pid: 29049, tid: 29157, name: Thread-19924  >>> edu.sfsu.cs.orange.ocr <<<
11-06 20:58:37.500 373-373/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xf
11-06 20:58:37.543 373-373/? A/DEBUG: Abort message: 'Invalid address 0xb4d40dcc passed to free: invalid page index'
11-06 20:58:37.543 373-373/? A/DEBUG:     r0 0000000f  r1 00000dcc  r2 00000000  r3 00000002
11-06 20:58:37.544 373-373/? A/DEBUG:     r4 9a64138c  r5 00000001  r6 9a641390  r7 9ff7e2c8
11-06 20:58:37.544 373-373/? A/DEBUG:     r8 a1378b53  r9 00000004  sl 00000000  fp acb55bb0
11-06 20:58:37.544 373-373/? A/DEBUG:     ip b6cc75e0  sp 9ff7e2b8  lr b6caa25b  pc a127b380  cpsr 80030030
11-06 20:58:37.566 373-373/? A/DEBUG: backtrace:
11-06 20:58:37.566 373-373/? A/DEBUG:     #00 pc 000fc380  /data/app/edu.sfsu.cs.orange.ocr-2/lib/arm/libtess.so (_Z14FreeFeatureSetP18FEATURE_SET_STRUCT+35)
11-06 20:58:37.566 373-373/? A/DEBUG:     #01 pc 000e8f97  /data/app/edu.sfsu.cs.orange.ocr-2/lib/arm/libtess.so (_ZN9tesseract8Classify11AdaptToCharEP5TBLOBiifP22ADAPT_TEMPLATES_STRUCT+318)
11-06 20:58:37.566 373-373/? A/DEBUG:     #02 pc 000e8ce1  /data/app/edu.sfsu.cs.orange.ocr-2/lib/arm/libtess.so (_ZN9tesseract8Classify11LearnPiecesEPKciifNS_20CharSegmentationTypeES2_P8WERD_RES+432)
11-06 20:58:37.567 373-373/? A/DEBUG:     #03 pc 000e8955  /data/app/edu.sfsu.cs.orange.ocr-2/lib/arm/libtess.so (_ZN9tesseract8Classify9LearnWordEPKcP8WERD_RES+360)
11-06 20:58:37.567 373-373/? A/DEBUG:     #04 pc 000969bd  /data/app/edu.sfsu.cs.orange.ocr-2/lib/arm/libtess.so (_ZN9tesseract9Tesseract19classify_word_pass1ERKNS_8WordDataEPP8WERD_RESPNS_13PointerVectorIS4_EE+128)
11-06 20:58:37.567 373-373/? A/DEBUG:     #05 pc 0009545b  /data/app/edu.sfsu.cs.orange.ocr-2/lib/arm/libtess.so (_ZN9tesseract9Tesseract17RetryWithLanguageERKNS_8WordDataEMS0_FvS3_PP8WERD_RESPNS_13PointerVectorIS4_EEES6_S9_+126)
11-06 20:58:37.567 373-373/? A/DEBUG:     #06 pc 00092bc1  /data/app/edu.sfsu.cs.orange.ocr-2/lib/arm/libtess.so (_ZN9tesseract9Tesseract26classify_word_and_languageEiP11PAGE_RES_ITPNS_8WordDataE+272)
11-06 20:58:37.567 373-373/? A/DEBUG:     #07 pc 0009658f  /data/app/edu.sfsu.cs.orange.ocr-2/lib/arm/libtess.so (_ZN9tesseract9Tesseract18ClassifyBlobAsWordEiP11PAGE_RES_ITP6C_BLOBP6STRINGPf+250)
11-06 20:58:37.567 373-373/? A/DEBUG:     #08 pc 000967ff  /data/app/edu.sfsu.cs.orange.ocr-2/lib/arm/libtess.so (_ZN9tesseract9Tesseract24ClassifyBlobPlusOutlinesERK13GenericVectorIbERKS1_IP9C_OUTLINEEiP11PAGE_RES_ITP6C_BLOBP6STRING+378)
11-06 20:58:37.567 373-373/? A/DEBUG:     #09 pc 0009618b  /data/app/edu.sfsu.cs.orange.ocr-2/lib/arm/libtess.so (_ZN9tesseract9Tesseract27SelectGoodDiacriticOutlinesEifP11PAGE_RES_ITP6C_BLOBRK13GenericVectorIP9C_OUTLINEEiPS5_IbE+298)
11-06 20:58:37.567 373-373/? A/DEBUG:     #10 pc 00095bab  /data/app/edu.sfsu.cs.orange.ocr-2/lib/arm/libtess.so (_ZN9tesseract9Tesseract34AssignDiacriticsToOverlappingBlobsERK13GenericVectorIP9C_OUTLINEEiP4WERDP11PAGE_RES_ITPS1_IbESC_PS1_IP6C_BLOBE+650)
11-06 20:58:37.568 373-373/? A/DEBUG:     #11 pc 000934df  /data/app/edu.sfsu.cs.orange.ocr-2/lib/arm/libtess.so (_ZN9tesseract9Tesseract18ReassignDiacriticsEiP11PAGE_RES_ITPb+186)
11-06 20:58:37.568 373-373/? A/DEBUG:     #12 pc 000932a1  /data/app/edu.sfsu.cs.orange.ocr-2/lib/arm/libtess.so (_ZN9tesseract9Tesseract18RecogAllWordsPassNEiP10ETEXT_DESCP11PAGE_RES_ITP13GenericVectorINS_8WordDataEE+376)
11-06 20:58:37.568 373-373/? A/DEBUG:     #13 pc 00093907  /data/app/edu.sfsu.cs.orange.ocr-2/lib/arm/libtess.so (_ZN9tesseract9Tesseract15recog_all_wordsEP8PAGE_RESP10ETEXT_DESCPK4TBOXPKci+306)
11-06 20:58:37.568 373-373/? A/DEBUG:     #14 pc 000892a5  /data/app/edu.sfsu.cs.orange.ocr-2/lib/arm/libtess.so (_ZN9tesseract11TessBaseAPI9RecognizeEP10ETEXT_DESC+476)
11-06 20:58:37.568 373-373/? A/DEBUG:     #15 pc 00089c7d  /data/app/edu.sfsu.cs.orange.ocr-2/lib/arm/libtess.so (_ZN9tesseract11TessBaseAPI11GetHOCRTextEP10ETEXT_DESCi+36)
11-06 20:58:37.568 373-373/? A/DEBUG:     #16 pc 0017cc05  /data/app/edu.sfsu.cs.orange.ocr-2/lib/arm/libtess.so (Java_com_googlecode_tesseract_android_TessBaseAPI_nativeGetHOCRText+96)
11-06 20:58:37.568 373-373/? A/DEBUG:     #17 pc 0007026b  /data/app/edu.sfsu.cs.orange.ocr-2/oat/arm/base.odex (offset 0x62000) (java.lang.String com.googlecode.tesseract.android.TessBaseAPI.nativeGetHOCRText(long, int)+102)
11-06 20:58:37.568 373-373/? A/DEBUG:     #18 pc 00071a69  /data/app/edu.sfsu.cs.orange.ocr-2/oat/arm/base.odex (offset 0x62000) (java.lang.String com.googlecode.tesseract.android.TessBaseAPI.getHOCRText(int)+156)
11-06 20:58:37.569 373-373/? A/DEBUG:     #19 pc 0007c4ab  /data/app/edu.sfsu.cs.orange.ocr-2/oat/arm/base.odex (offset 0x62000) (edu.sfsu.cs.orange.ocr.OcrResult edu.sfsu.cs.orange.ocr.DecodeHandler.getOcrResult()+222)
11-06 20:58:37.569 373-373/? A/DEBUG:     #20 pc 0007ca41  /data/app/edu.sfsu.cs.orange.ocr-2/oat/arm/base.odex (offset 0x62000) (void edu.sfsu.cs.orange.ocr.DecodeHandler.ocrContinuousDecode(byte[], int, int)+228)
11-06 20:58:37.569 373-373/? A/DEBUG:     #21 pc 0007d10b  /data/app/edu.sfsu.cs.orange.ocr-2/oat/arm/base.odex (offset 0x62000) (void edu.sfsu.cs.orange.ocr.DecodeHandler.handleMessage(android.os.Message)+342)
11-06 20:58:37.569 373-373/? A/DEBUG:     #22 pc 73d315d1  /data/dalvik-cache/arm/system@framework@boot.oat (offset 0x1ed6000)
11-06 20:58:38.042 373-373/? A/DEBUG: Tombstone written to: /data/tombstones/tombstone_00
rmtheis commented 8 years ago

Fixed in ff6fabb325f26a5f1dffe2857353c481f0beb5c2.