Badcreature / mad-components

Automatically exported from code.google.com/p/mad-components
0 stars 0 forks source link

Crash when have more than 150 items in UIList #27

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
protected static const LIST0:XML =  <list id="list0" colour="#FFFFFF" 
background="#000000,#000000">                                                   

                                                    <horizontal>
                                                            <image id="image">48</image>
                                                            <vertical>
                                                                    <label id="label"><font size="24" color="#FFFFFF"/></label>
                                                                    <label id="label2"><font color="#666666" size="11"/></label>
                                                            </vertical>
                                                    </horizontal>
                                            </list>;

protected static const LAYOUT0:XML = <columns widths="300"  
background="#000000,#FFFFFF">
                                                    {LIST0}
                                                    <label id="desc"><font color="#FFFFFF"/>Test description</label>
                                            </columns>;

protected static const NAVIGATOR:XML = <viewFlipper title="lists" 
background="#FFFFFF" colour="#666677" id="navigator">
                                                        {LAYOUT0}
                                                </viewFlipper>; 

protected function construct():void
{
UI.create(this, NAVIGATOR);

for (var i:int = 0; i < 150; i++)
{
data0.push({label:"test", label2:'Unknwown theme', 
image:getQualifiedClassName(MELON)});
}
uiList0 = UIList(UI.findViewById("list0"));
uiList0.data = data0;
}

What is the expected output? What do you see instead?
The list displays fine, but whe I try to scroll it, the application exists. 
This is not reproduced on adl emulator.
I'm using an Android tablet (Asus transformer)

What version of the product are you using? On what operating system?
I'm using the cvs version.

Please provide any additional information below.
The pictures are very small 128x128 px png about 4.5KB
I love the components. This is the only issue that prevents me from using it :(

Thanks!

Original issue reported on code.google.com by fariou...@gmail.com on 18 Mar 2012 at 7:11

GoogleCodeExporter commented 9 years ago
Assuming this could be a memory-related issue, have you tried <longList> ?

Just replace <list> in the layout with <longList recycle="true" ...etc .... and 
let me know the outcome.

Original comment by doc.andr...@gmail.com on 26 Mar 2012 at 7:43

GoogleCodeExporter commented 9 years ago
Thanks for the reply

I just tried longList and it's the same behavior.

More info: The list displays fine, but the application block for 2s and then 
exits as soon as I try to scroll it. No exception is thrown in fdb.
But switching from one view to the other of the navigator works fine. It's just 
the list itself.
Tried to remove the pictures, and also the same.

Original comment by fariou...@gmail.com on 26 Mar 2012 at 7:39

GoogleCodeExporter commented 9 years ago
Actually, I remember now another user reported a related problem.  It wasn't a 
problem in MadComponents, but it pointed to a quirk in AIR.

It seems related to either GPU mode being enabled (or not).  <renderMode> in 
your application.xml.

Or maybe even mask="true" being set. eg:-

<list id="list0" mask="true" colour="#FFFFFF" background="#000000,#000000"> 

Can you try those out - <renderMode> and mask, and let me know what happens?

Original comment by doc.andr...@gmail.com on 31 Mar 2012 at 5:59

GoogleCodeExporter commented 9 years ago
Great! Thanks so much.

This is indeed because of the renderMode not being set.
I forced it to gpu and now it works like a charm!
Tried it to cpu and still crashing. So I suppose that it's set to cpu mode 
internally by default.

I can know start using the components!
I only have to find some free time now.
thanks again.

Original comment by fariou...@gmail.com on 2 Apr 2012 at 7:09

GoogleCodeExporter commented 9 years ago
Would you do me a favour?  I'm unable to reproduce this problem on my own test 
device.  (HTC Desire).  I know that renderMode set to GPU solves the problem.  
What about setting it to Direct (as if you were using Stage3D).  Does it crash 
again?

Original comment by brutf...@gmail.com on 7 Apr 2012 at 10:25

GoogleCodeExporter commented 9 years ago
I've set the renderMode to direct and it crashed.
I do not know why in your case it works. Maybe it's related to android itself 
(my tablet is running ICS)

Original comment by fariou...@gmail.com on 7 Apr 2012 at 12:52

GoogleCodeExporter commented 9 years ago
It does seem to be device dependent.  It doesn't seem to be the version of 
Android.  Another user reported a crash with Froyo 2.2.

Which version of AIR did you build it with?

One more thing... 
http://xfiles.funnygarbage.com/~colinholgate/apks/Signal11Bug.apk

I'd expect it to crash too on your device.  Does it?

I've reporting the bug to Adobe.  That's why I'm collecting more info.

Original comment by brutf...@gmail.com on 7 Apr 2012 at 1:31

GoogleCodeExporter commented 9 years ago
By the way, I call it the Signal 11 bug, because LogCat says something like:

"Zygote - process XXX terminated by signal(11)".  Apparently, Signal 11 is a 
segmentation fault.

Original comment by brutf...@gmail.com on 7 Apr 2012 at 1:36

GoogleCodeExporter commented 9 years ago
I was up to date.... Well I was 1 week ago. I got an update today.
Your app works fine on my device. I do not know why? Are you using renderMode 
in gpu?

By the why, I reproduced the crash with my app. It's not a signal 11. Here are 
the lines:
 Process air.topapp (pid 26143) has died.
W/ActivityManager(  168): Force removing ActivityRecord{41570f70 
air.topapp/.AppEntry}: app died, no saved state
I/WindowManager(  168): WIN DEATH: Window{41649f08 
air.topapp/air.topapp.AppEntry paused=false}
W/WindowManager(  168): Force-removing child win Window{41656010 SurfaceView 
paused=false} from container Window{41649f08 air.topapp/air.topapp.AppEntry 
paused=false}
I/WindowManager(  168): WINDOW DIED Window{41649f08 
air.topapp/air.topapp.AppEntry paused=false}
W/WindowManager(  168): Failed looking up window
W/WindowManager(  168): java.lang.IllegalArgumentException: Requested window 
android.os.BinderProxy@41747ed8 does not exist
W/WindowManager(  168):     at 
com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerSe
rvice.java:7187)
W/WindowManager(  168):     at 
com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerSe
rvice.java:7178)
W/WindowManager(  168):     at 
com.android.server.wm.WindowState$DeathRecipient.binderDied(WindowState.java:152
9)
W/WindowManager(  168):     at 
android.os.BinderProxy.sendDeathNotice(Binder.java:417)
W/WindowManager(  168):     at com.android.server.SystemServer.init1(Native Method)
W/WindowManager(  168):     at 
com.android.server.SystemServer.main(SystemServer.java:886)
W/WindowManager(  168):     at java.lang.reflect.Method.invokeNative(Native Method)
W/WindowManager(  168):     at java.lang.reflect.Method.invoke(Method.java:511)
W/WindowManager(  168):     at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
W/WindowManager(  168):     at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
W/WindowManager(  168):     at dalvik.system.NativeStart.main(Native Method)
I/WindowManager(  168): WIN DEATH: null
W/InputManagerService(  168): Got RemoteException sending setActive(false) 
notification to pid 26143 uid 10011

For your information, this may be important: I built the apk under linux, using 
flex sdk v4.6

Original comment by fariou...@gmail.com on 8 Apr 2012 at 10:19

GoogleCodeExporter commented 9 years ago
Sorry, I was too fast. It is indeed a signal 11 in my case. apparently it 
crashed inside adobe air core library. Here is the full dump to send to adobe 
with the stack memory dump.

By the way, my app is in landscape mode while yours is in portrait mode. I do 
not know how to force my app in portrait mode yet.

virtual int MPLSensor::update_delay()
D/WindowManager(  168): adjustConfigurationLw, config:{1.0 0mcc0mnc (no locale) 
layoutdir=0 sw800dp w1280dp h752dp xlrg land ?uimode ?night finger -keyb/v/h 
-nav/v} mLidOpen:-1 mHasDockFeature:true mHasHallSensorFeature:true 
config.hardKeyboardHidden:2
V/        (  168): virtual int MPLSensor::setDelay(int32_t, int64_t)
E/        (  168):  setDelay handle: 4 rate 66
V/        (  168): virtual int MPLSensor::update_delay()
V/        (  168): virtual int MPLSensor::setDelay(int32_t, int64_t)
E/        (  168):  setDelay handle: 4 rate 66
V/        (  168): virtual int MPLSensor::update_delay()
F/libc    (26143): Fatal signal 11 (SIGSEGV) at 0x00000008 (code=1)
I/DEBUG   (   86): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 
***
I/DEBUG   (   86): Build fingerprint: 
'asus/WW_epad/TF101:4.0.3/IML74K/WW_epad-9.2.1.17-20120312:user/release-keys'
I/DEBUG   (   86): pid: 26143, tid: 26143  >>> air.topapp <<<
I/DEBUG   (   86): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 
00000008
I/DEBUG   (   86):  r0 00000000  r1 00000000  r2 00000020  r3 5b66c441
I/DEBUG   (   86):  r4 5c289f48  r5 0000568c  r6 01acc498  r7 becfbb38
I/DEBUG   (   86):  r8 01987f38  r9 00002d74  10 01ac04f8  fp becfbb18
I/DEBUG   (   86):  ip f954bcce  sp becfbaf0  lr 5b62b41b  pc 5b66c440  cpsr 
20000030
I/DEBUG   (   86):  d0  0000001841c00000  d1  4b00001841c00000
I/DEBUG   (   86):  d2  4b0000184b000000  d3  4a84f21441c00000
I/DEBUG   (   86):  d4  000005b800000034  d5  3fb99999a0000000
I/DEBUG   (   86):  d6  442f000000000000  d7  0000001842500000
I/DEBUG   (   86):  d8  bed8a07900000002  d9  3f37b187bc9eaa16
I/DEBUG   (   86):  d10 42c7bed8c11fe5ee  d11 000000003e37b187
I/DEBUG   (   86):  d12 0000000000000000  d13 0000000000000000
I/DEBUG   (   86):  d14 0000000000000000  d15 0000000000000000
I/DEBUG   (   86):  scr 60000013
I/DEBUG   (   86): 
I/DEBUG   (   86):          #00  pc 002cd440  
/data/data/com.adobe.air/lib/libCore.so
I/DEBUG   (   86):          #01  lr 5b62b41b  
/data/data/com.adobe.air/lib/libCore.so
I/DEBUG   (   86): 
I/DEBUG   (   86): code around pc:
I/DEBUG   (   86): 5b66c420 f101e7f1 1099030f 0003f021 1dcae7eb  
........!.......
I/DEBUG   (   86): 5b66c430 f0201050 e7e60003 f0231ccb e7e20003  P. 
.......#.....
I/DEBUG   (   86): 5b66c440 69036882 68c1b17a 68c260d1 6881b172  
.h.iz..h.`.hr..h
I/DEBUG   (   86): 5b66c450 21006091 f8d36081 60c22080 1080f8d3  .`.!.`... 
.`....
I/DEBUG   (   86): 5b66c460 f8c36088 681b0080 47706043 f8c36882  
.`.....hC`pG.h..
I/DEBUG   (   86): 
I/DEBUG   (   86): code around lr:
I/DEBUG   (   86): 5b62b3f8 290013cc f8d6bfcc f8d6a414 f1baa194  
...)............
I/DEBUG   (   86): 5b62b408 d09f0f00 9134f8df 0040f8da 3009f854  
......4...@.T..0
I/DEBUG   (   86): 5b62b418 f8d84798 68010068 47906bca b1d84681  
.G..h..h.k.G.F..
I/DEBUG   (   86): 5b62b428 20006803 13ccf8d6 f8d39a03 4653c020  .h. ........ 
.SF
I/DEBUG   (   86): 5b62b438 bfd82900 90012200 46489200 465a4639  
.)..."....HF9FZF
I/DEBUG   (   86): 
I/DEBUG   (   86): stack:
I/DEBUG   (   86):     becfbab0  5b6098e5  
/data/data/com.adobe.air/lib/libCore.so
I/DEBUG   (   86):     becfbab4  5d764600  
I/DEBUG   (   86):     becfbab8  5c289f48  
/data/data/com.adobe.air/lib/libCore.so
I/DEBUG   (   86):     becfbabc  00000000  
I/DEBUG   (   86):     becfbac0  00002278  
I/DEBUG   (   86):     becfbac4  00000000  
I/DEBUG   (   86):     becfbac8  01a9e2d0  [heap]
I/DEBUG   (   86):     becfbacc  5c289f48  
/data/data/com.adobe.air/lib/libCore.so
I/DEBUG   (   86):     becfbad0  0000568c  
I/DEBUG   (   86):     becfbad4  01acc498  [heap]
I/DEBUG   (   86):     becfbad8  becfbb38  [stack]
I/DEBUG   (   86):     becfbadc  01987f38  [heap]
I/DEBUG   (   86):     becfbae0  becfbce0  [stack]
I/DEBUG   (   86):     becfbae4  becfbb28  [stack]
I/DEBUG   (   86):     becfbae8  df0027ad  
I/DEBUG   (   86):     becfbaec  00000000  
I/DEBUG   (   86): #00 becfbaf0  5c93f020  
I/DEBUG   (   86):     becfbaf4  00000008  
I/DEBUG   (   86):     becfbaf8  00000000  
I/DEBUG   (   86):     becfbafc  becfc268  [stack]
I/DEBUG   (   86):     becfbb00  00000001  
I/DEBUG   (   86):     becfbb04  5b936b11  
/data/data/com.adobe.air/lib/libCore.so
I/DEBUG   (   86):     becfbb08  0072005b  
I/DEBUG   (   86):     becfbb0c  006e0065  
I/DEBUG   (   86):     becfbb10  00650064  
I/DEBUG   (   86):     becfbb14  00000002  
I/DEBUG   (   86):     becfbb18  0000000c  
I/DEBUG   (   86):     becfbb1c  00000138  
I/DEBUG   (   86):     becfbb20  00000000  
I/DEBUG   (   86):     becfbb24  000002f0  
I/DEBUG   (   86):     becfbb28  0000000c  
I/DEBUG   (   86):     becfbb2c  00000138  
I/DEBUG   (   86):     becfbb30  fffffff6  
I/DEBUG   (   86):     becfbb34  00002acc  
I/BootReceiver(  168): Copying /data/tombstones/tombstone_04 to DropBox 
(SYSTEM_TOMBSTONE)
W/InputDispatcher(  168): channel '41649f08 air.topapp/air.topapp.AppEntry 
(server)' ~ Consumer closed input channel or an error occurred.  events=0x8
E/InputDispatcher(  168): channel '41649f08 air.topapp/air.topapp.AppEntry 
(server)' ~ Channel is unrecoverably broken and will be disposed!
D/Zygote  (   89): Process 26143 terminated by signal (11)
V/        (  168): virtual int MPLSensor::setDelay(int32_t, int64_t)
E/        (  168):  setDelay handle: 4 rate 66
V/        (  168): virtual int MPLSensor::update_delay()
D/WindowManager(  168): adjustConfigurationLw, config:{1.0 0mcc0mnc (no locale) 
layoutdir=0 sw800dp w1280dp h752dp xlrg land ?uimode ?night finger -keyb/v/h 
-nav/v} mLidOpen:-1 mHasDockFeature:true mHasHallSensorFeature:true 
config.hardKeyboardHidden:2
W/InputDispatcher(  168): Attempted to unregister already unregistered input 
channel '41649f08 air.topapp/air.topapp.AppEntry (server)'
I/ActivityManager(  168): Process air.topapp (pid 26143) has died.
W/ActivityManager(  168): Force removing ActivityRecord{41570f70 
air.topapp/.AppEntry}: app died, no saved state
I/WindowManager(  168): WIN DEATH: Window{41649f08 
air.topapp/air.topapp.AppEntry paused=false}
W/WindowManager(  168): Force-removing child win Window{41656010 SurfaceView 
paused=false} from container Window{41649f08 air.topapp/air.topapp.AppEntry 
paused=false}
I/WindowManager(  168): WINDOW DIED Window{41649f08 
air.topapp/air.topapp.AppEntry paused=false}
W/WindowManager(  168): Failed looking up window
W/WindowManager(  168): java.lang.IllegalArgumentException: Requested window 
android.os.BinderProxy@41747ed8 does not exist
W/WindowManager(  168):     at 
com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerSe
rvice.java:7187)
W/WindowManager(  168):     at 
com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerSe
rvice.java:7178)
W/WindowManager(  168):     at 
com.android.server.wm.WindowState$DeathRecipient.binderDied(WindowState.java:152
9)
W/WindowManager(  168):     at 
android.os.BinderProxy.sendDeathNotice(Binder.java:417)
W/WindowManager(  168):     at com.android.server.SystemServer.init1(Native Method)
W/WindowManager(  168):     at 
com.android.server.SystemServer.main(SystemServer.java:886)
W/WindowManager(  168):     at java.lang.reflect.Method.invokeNative(Native Method)
W/WindowManager(  168):     at java.lang.reflect.Method.invoke(Method.java:511)
W/WindowManager(  168):     at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
W/WindowManager(  168):     at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
W/WindowManager(  168):     at dalvik.system.NativeStart.main(Native Method)
I/WindowManager(  168): WIN DEATH: null
W/InputManagerService(  168): Got RemoteException sending setActive(false) 
notification to pid 26143 uid 10011
I/TextType(  421): TextType = 0x0
D/dalvikvm(  168): GC_CONCURRENT freed 1120K, 29% free 12600K/17735K, paused 
352ms+5ms
D/FlexLabs( 1027): Widget count: 1

Original comment by fariou...@gmail.com on 8 Apr 2012 at 10:27

GoogleCodeExporter commented 9 years ago
I've done one more test: I've set in my xml
<autoOrients>true</autoOrients>

This line was not there previously.
I'm now by default in portrait mode. Guess what? It works. But as soon as I put 
the tablet in landscape position, the application crashes when it tries to 
redraw.

Help this help

Original comment by fariou...@gmail.com on 8 Apr 2012 at 10:38

GoogleCodeExporter commented 9 years ago
I'm still discussing this with Adobe... What version of Android OS are you 
using on the Acer?

Original comment by doc.andr...@gmail.com on 12 Apr 2012 at 8:49

GoogleCodeExporter commented 9 years ago
It's an asus transformer TF101 with android 4.0.1

Original comment by fariou...@gmail.com on 12 Apr 2012 at 8:18

GoogleCodeExporter commented 9 years ago
Anyway - mostly the issue is fixed with <renderMode>GPU</renderMode>

Original comment by doc.andr...@gmail.com on 12 Jul 2012 at 11:31

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Same problem like reported, using air 3.4
With about 300 items in the list
- I am using landscape mode, autoresize and autoscale set to false
- longlist does not bring anything
- mask=true does not bring anything
- setting renderMode from direct to GPU does not help me in my case. it does 
not crash but the items texts are not visible, only the cells. Furthermore, the 
general rendering in gpu mode is not beautiful, all shattering or 3D effects of 
MovieClips are not rendered.

--> but setting renderMode to direct and portrait make it works!
So, the problem comes from portrait I guess. Hmm... But I need landscape!
Have you a further idea ?

Original comment by mario.ar...@gmail.com on 17 Oct 2012 at 4:16

GoogleCodeExporter commented 9 years ago
it seems to work now with:
- direct mode
- landscape mode
- and following atributes, is autoLayout responsible ?
<list id="const" colour="#FFFFFF" pullDownRefresh="false" alignV = "scroll" 
border="true" autoLayout = "false" lines="true" highlightPressed="true" 
showPressed="true" gapV="0" gapH="0" hasBorder="true" 
background="#CCCCCC,#FFFFFF">

Original comment by mario.ar...@gmail.com on 18 Oct 2012 at 10:49

GoogleCodeExporter commented 9 years ago
Does that work-around solve your problem?

Original comment by doc.andr...@gmail.com on 18 Oct 2012 at 5:31

GoogleCodeExporter commented 9 years ago
Guys I've got the same issue with longlist. When there are more than 30 items, 
app crashes (iOS)... Did anyone find a workaround for this?

Original comment by bachov...@gmail.com on 20 Nov 2012 at 6:16

GoogleCodeExporter commented 9 years ago
Sorry, my bad, forgot to set renderMode to direct.

Does anyone know though what's the difference (gpu/direct) and why gpu was 
causing this issue?

Original comment by bachov...@gmail.com on 21 Nov 2012 at 3:44

GoogleCodeExporter commented 9 years ago
This bug still exists and this makes madcomponents unusable in projects 
requiring serious lists. Please attend to these bugs if you want this project 
to succeed.

Original comment by rajdeeprath@gmail.com on 8 Mar 2013 at 12:05

GoogleCodeExporter commented 9 years ago
I have the same issue but for another UI library (actually it's a feathers 
ported back to display list) and set cacheAsBitmap = true for item renderes 
helped me (or just using more simple item renderers) since Adobe advices to use 
as less display object in display list as possible for GPU render mode - 
http://help.adobe.com/en_US/as3/mobile/WS901d38e593cd1bac-3d719af412b2b394529-80
00.html.

Original comment by fsb.m...@gmail.com on 27 Aug 2014 at 8:35