Skip to content
This repository has been archived by the owner on Mar 17, 2022. It is now read-only.

Pix not usable after rotateQuad #192

Closed
ratcashdev opened this issue Feb 9, 2017 · 7 comments
Closed

Pix not usable after rotateQuad #192

ratcashdev opened this issue Feb 9, 2017 · 7 comments
Labels

Comments

@ratcashdev
Copy link

Summary:

Steps to reproduce the issue:

Pix pix = ReadFile.readFile(new File(imgFilePath));
System.out.println("pix.getDimensions() = " + Arrays.toString(pix.getDimensions()));
Pix pix2 = Rotate.rotateOrth(pix, 1);
System.out.println("pix2.getDimensions() = " + Arrays.toString(pix2.getDimensions()));

Expected result:

I/System.out: pix.getDimensions() = [5312, 2988, 32]
I/System.out: pix2.getDimensions() = [2988, 5312 , 32]

Actual result:

I/System.out: pix.getDimensions() = [5312, 2988, 32]
I/System.out: pix2.getDimensions() = [0, 0, 0]

Tess-two version used:
'com.rmtheis:tess-two:6.2.0'

@rmtheis
Copy link
Owner

rmtheis commented Feb 9, 2017

Hmm... Does the testRotateOrth test case in the RotateTest class work for you?

@rmtheis
Copy link
Owner

rmtheis commented Feb 9, 2017

Also, does it work for you with smaller images?

@ratcashdev
Copy link
Author

ratcashdev commented Feb 9, 2017

I am only using the pre-compiled library, so can't comment on the test-case. Will see if I can build it from scratch.
With a smaller image it crashes straight. Dimensions before rotation: [597, 1062, 32]

@rmtheis
Copy link
Owner

rmtheis commented Feb 9, 2017

What type of architecture/device are you running on?

@rmtheis
Copy link
Owner

rmtheis commented Feb 9, 2017

Also, does it work if you use 6.1.1?

@ratcashdev
Copy link
Author

6.2.0 behaves the same both on x86_64 emulator as well as on arm64 (samsung galaxy s6, Marshmallow 6.0.1).
6.1.1: also crashes with the small image on x86_64 with the following stack trace:

02-09 19:37:05.104 15148-15163/com.sample.project A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0xffffffffec40dec0 in tid 15163 (roidJUnitRunner)
                                                                   
                                                                   [ 02-09 19:37:05.105  1216: 1216 W/         ]
                                                                   debuggerd: handling request: pid=15148 uid=10070 gid=10070 tid=15163
02-09 19:37:05.161 15167-15167/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
02-09 19:37:05.162 15167-15167/? A/DEBUG: Build fingerprint: 'Android/sdk_phone_x86_64/generic_x86_64:7.0/NYC/3245079:userdebug/test-keys'
02-09 19:37:05.162 15167-15167/? A/DEBUG: Revision: '0'
02-09 19:37:05.162 15167-15167/? A/DEBUG: ABI: 'x86_64'
02-09 19:37:05.162 15167-15167/? A/DEBUG: pid: 15148, tid: 15163, name: roidJUnitRunner  >>> com.sample.project <<<
02-09 19:37:05.162 15167-15167/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xffffffffec40dec0
02-09 19:37:05.162 15167-15167/? A/DEBUG:     rax 00007ffeec55d030  rbx 00007ffee99f1d00  rcx 00007ffeec3f7fac  rdx 00007ffeec3f7fb0
02-09 19:37:05.162 15167-15167/? A/DEBUG:     rsi 00007ffeec3f7fb4  rdi ffffffffec40dec0
02-09 19:37:05.162 15167-15167/? A/DEBUG:     r8  00007ffeec3f7ee8  r9  00007ffedbac6c7c  r10 fffffffffffffb8c  r11 00007ffef7fd387c
02-09 19:37:05.162 15167-15167/? A/DEBUG:     r12 ffffffffec40dec0  r13 0000000000000000  r14 00007ffeec3f8028  r15 00007ffeec55d030
02-09 19:37:05.162 15167-15167/? A/DEBUG:     cs  0000000000000033  ss  000000000000002b
02-09 19:37:05.162 15167-15167/? A/DEBUG:     rip 00007ffed891f61b  rbp 00007ffeec3f80b8  rsp 00007ffeec3f7f98  eflags 0000000000000206
02-09 19:37:05.163 15167-15167/? A/DEBUG: backtrace:
02-09 19:37:05.163 15167-15167/? A/DEBUG:     #00 pc 000000000014a61b  /data/app/com.sample.project-2/lib/x86_64/liblept.so (pixGetDimensions+43)
02-09 19:37:05.163 15167-15167/? A/DEBUG:     #01 pc 00000000001f9bae  /data/app/com.sample.project-2/lib/x86_64/liblept.so (Java_com_googlecode_leptonica_android_Pix_nativeGetDimensions+78)
02-09 19:37:05.163 15167-15167/? A/DEBUG:     #02 pc 000000000069f3b8  /data/app/com.sample.project-2/oat/x86_64/base.odex (offset 0x66e000)
02-09 19:37:05.163 15167-15167/? A/DEBUG:     #03 pc 00000000000fb46f  <anonymous:00007ffeec2fd000>
02-09 19:37:05.163 15167-15167/? A/DEBUG:     #04 pc 12d7ffe8fffffffe  <unknown>

@rmtheis rmtheis added the bug label Feb 10, 2017
@rmtheis
Copy link
Owner

rmtheis commented Mar 21, 2017

Thanks for the crash report. Let's track this on #197.

@rmtheis rmtheis closed this as completed Mar 21, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants