TommyCorr / android-anpr

Automatically exported from code.google.com/p/android-anpr
0 stars 1 forks source link

App closed quickly after launch #2

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. android-anpr-read-only at revision 36 (the latest till 2012/5/13).
2. eclipse, android-ndk-r8, libcom_graphics_NativeGraphics.so generated 
successfully.
3. have /sdcard/resources/...(see Downloads resources.zip ) at sdcard.

What is the expected output? What do you see instead?
It's expected to run successfully, but instead it is closed quickly after 
launch.

What version of the product are you using? On what operating system?
Please see above.

Please provide any additional information below.
Some LogCat fragments:
05-13 16:11:53.489: I/intelligence_info(11120): Neon support - ok/ armv7: 
2.6.29-g582a0f5 #38 / default: 2.6.29-00261-g0097074-dirty #20 / armv5: 
2.6.29-g582a0f5 digit@lulu #37
05-13 16:11:53.489: I/intelligence_info(11120): gray image :: width is 1280; 
height is 720; stride is 5120; format is 1;flags is0
05-13 16:11:53.969: I/WindowManager(9740): WINDOW DIED Window{41010bf0 
com.intelligency/com.intelligence.intelligencyActivity paused=false}
Progress com.intelligence (pid 11120) has died.

Original issue reported on code.google.com by xyxzfj@gmail.com on 13 May 2012 at 8:15

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Same problem at my galaxy S2 running ICS Samsung Skin (I know, crappy skin!). 
LogCat attached!

Keep up the grat work!

Original comment by otavi...@gmail.com on 12 Aug 2012 at 2:24

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Same problem on my HTC Sensation XE android os 4.03, i hope this will solved 
soon.

Looks promissing

Original comment by jace...@gmail.com on 13 Aug 2012 at 2:51

GoogleCodeExporter commented 9 years ago
Same problem as indicated by the first post of this discussion (e.g. window 
closes unexpectedly without any errors in logcat).  I've been tinkering around 
with the code to isolate the location and came up that the issue is stemming 
from class DrawCanvasView.run().  Specifically, where the following is called: 

NativeGraphics.yuvToRGB(data, preview.cs.width, preview.cs.height);

I checked to ensure that the format of the preview was indeed yuv (nv21).  I 
then tried to do the conversion with native support with the following code:

private Bitmap getBitmap(byte[] data, int w, int h){
            Bitmap b = null;            
            // Get the YuV image
            YuvImage yuv_image = new YuvImage(data, ImageFormat.NV21, w, h, null);

            // Convert YuV to Jpeg
            Rect rect = new Rect(0, 0, w, h);
            ByteArrayOutputStream output_stream = new ByteArrayOutputStream();
            yuv_image.compressToJpeg(rect, 100, output_stream);
            // Convert from Jpeg to Bitmap
            b = BitmapFactory.decodeByteArray(output_stream.toByteArray(), 0, output_stream.size());
            return b;       
        }

But then when this bitmap is passed into systemLogic.recognize(c);, the screen 
again closes without warning/errors.  I salted the code (Intelligence.java 
Class) with printout statements to isolate the issue again and came up that it 
fails between step 2 and 3 (e.g. logcat never displays "3") :

Log.d(DEBUG_TAG,"2");
        if (enableReportGeneration) {
            //console.console("Automatic Number Plate Recognition Report");
            //console.console("Image width: "+carSnapshot.getWidth()+" px");
            //console.console("Image height: "+carSnapshot.getHeight()+" px");
        }
        int p = 0;
       // console.console("getBands");
        for (Band b : carSnapshot.getBands()) { //doporucene 3
            Log.d(DEBUG_TAG,"3");

At this point I figure I'd ask the developer.  Any help and/or recommendations 
to resolve this issue would be greatly appreciated.

Thanks

Paul L. 

Original comment by pjlamber...@gmail.com on 2 Sep 2012 at 4:09

GoogleCodeExporter commented 9 years ago
I am having the same issue as you Paul, where you able to resolve the issue?

Original comment by vpmirand...@gmail.com on 21 Oct 2012 at 2:34

GoogleCodeExporter commented 9 years ago
Error on System.loadLibrary("com_graphics_NativeGraphics");
Unsatisfied Link Error

Original comment by filippo....@sinesy.it on 18 Jan 2013 at 1:31

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hi guys! Have you found solution to the problem? I have the same error with 
com_graphics_NativeGraphics, and I need to resolve it as soon as possible. 
Please, let me know if you fixed it.

Original comment by Bistra.N...@gmail.com on 1 Jul 2013 at 9:20

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
For errors on com_graphics_NativeGraphics make sure you built the jni folder 
with ndk-build

Including .so files in android studio as follows
https://groups.google.com/forum/?fromgroups#!topic/adt-dev/nQobKd2Gl_8

Original comment by man...@krukje.nl on 21 Jul 2013 at 11:49

GoogleCodeExporter commented 9 years ago
Hi! I had the same problems, with this .so libraries generation, but I fixed 
them somehow. Now the problem is that the code become apparently cyclic in  
DrawCanvasView.java . I am receiving message for "Thread.sleep(1);" and then 
after it start from the begging, printing the width and hight: 
"Intelligence.console.console("w:: " + preview.cs.width + "  h:: " + 
preview.cs.height);".

Also I can see that The wl.release() call is not always reached.
If someone can help me to fix the problem will be great!

Original comment by Bistra.N...@gmail.com on 21 Jul 2013 at 12:14

Attachments: