PDA

View Full Version : setting textbox & textInput entity visibility doesn't work.



blackMasoon
10-11-2011, 12:31 PM
I'm setting visibility for some entities and strange things are happening... Setting visibility to false for overlay entity works fine. I try to do same thing for textbox and textinput entity but it doesn't hide them:


GetMessageManager()->SetEntityVariable(player_name_input, 10, "visible", uint32(0));

I also found that there is no duch flag as "visible" for those entities by running this code:


player_name_input->GetComponentByName("InputTextRenderer")->GetVar("visible")->Set(uint32(0));

Where the app crashes because of no such key like "visible". How can I hide these components?

Seth
10-12-2011, 11:50 AM
Ok, if a variable doesn't exist, it shouldn't crash, it actually creates it with a default value. (You can also send the default value if you want)

The reason is crashed is "InputTextRenderer" isn't the right name for the component, so that was returning NULL and the code doesn't check for if the component is missing. Instead, it should check for "InputTextRender".

The reason it didn't work in your first example (code looks good) is the "visible" flag isn't respected by InputTextRender.

(comes back a few minutes later) :whistling:

Ok, I added it. It should now work if you update from svn. I only add support for things like "visible" and "enabled" as I personally need them so be sure to scan all source files for "visible" to see what actually is using them.

Also, keep in mind I think of those two variables are entity level rather than component level, so to do it manually instead of:


player_name_input->GetComponentByName("InputTextRender")->GetVar("visible")->Set(uint32(0));

It should be:


player_name_input->GetVar("visible")->Set(uint32(0));

blackMasoon
10-27-2011, 08:15 PM
I've updated the whole "shared folder" from the SVN and now everything is ok on windows but the app crashes while running on android device. Here's the log from LogCat:



10-27 22:14:08.590: INFO/RT3DApp(28014): File manager initted
10-27 22:14:08.610: DEBUG/SensorManager(28014): ====>>>>>Num Sensor: 1
10-27 22:14:08.610: DEBUG/SensorManager(28014): ====>>>>>Num Sensor: 2
10-27 22:14:08.610: DEBUG/SensorManager(28014): ====>>>>>Num Sensor: 3
10-27 22:14:08.610: DEBUG/SensorManager(28014): ====>>>>>Num Sensor: 0
10-27 22:14:08.610: ERROR/SensorManager(28014): unregisterListener:: all sensors, listener = com.rtsoft.rt3dapp.Main@4a506a88
10-27 22:14:08.640: INFO/ActivityManager(175): Displayed activity com.rtsoft.rt3dapp/.Main: 738 ms (total 738 ms)
10-27 22:14:08.660: WARN/IInputConnectionWrapper(27996): showStatusIcon on inactive InputConnection
10-27 22:14:08.850: INFO/DEBUG(25732): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
10-27 22:14:08.850: INFO/DEBUG(25732): Build fingerprint: 'samsung/GT-S5570/GT-S5570/GT-S5570:2.2.1/FROYO/XWKC1:user/release-keys'
10-27 22:14:08.850: INFO/DEBUG(25732): pid: 28014, tid: 28024 >>> com.rtsoft.rt3dapp <<<
10-27 22:14:08.850: INFO/DEBUG(25732): signal 11 (SIGSEGV), fault addr 3f80011e
10-27 22:14:08.850: INFO/DEBUG(25732): r0 3f800000 r1 81c55a2c r2 00000140 r3 81c56b88
10-27 22:14:08.850: INFO/DEBUG(25732): r4 81c53e08 r5 00000000 r6 440ee6ba r7 440f5f48
10-27 22:14:08.850: INFO/DEBUG(25732): r8 4f2a2b50 r9 440f5f40 10 440f5f2c fp 001d6970
10-27 22:14:08.860: INFO/DEBUG(25732): ip 81968fcc sp 4f2a2b08 lr 8196879c pc 8196879c cpsr 20000010
10-27 22:14:08.860: INFO/DEBUG(25732): d0 0000005e42bc0000 d1 3ff0000042bc0000
10-27 22:14:08.860: INFO/DEBUG(25732): d2 bfd3441350baf6de d3 c1493000c1323800
10-27 22:14:08.860: INFO/DEBUG(25732): d4 4900000040dcb000 d5 000000000006e580
10-27 22:14:08.860: INFO/DEBUG(25732): d6 4515a00000000800 d7 40800000c48ee000
10-27 22:14:08.860: INFO/DEBUG(25732): d8 0000000000000000 d9 0000000000000000
10-27 22:14:08.860: INFO/DEBUG(25732): d10 0000000000000000 d11 0000000000000000
10-27 22:14:08.860: INFO/DEBUG(25732): d12 0000000000000000 d13 0000000000000000
10-27 22:14:08.860: INFO/DEBUG(25732): d14 0000000000000000 d15 0000000000000000
10-27 22:14:08.860: INFO/DEBUG(25732): scr 80000012
10-27 22:14:08.930: INFO/DEBUG(25732): #00 pc 8196879c /data/data/com.rtsoft.rt3dapp/lib/librt3dapp.so
10-27 22:14:08.930: INFO/DEBUG(25732): #01 lr 8196879c /data/data/com.rtsoft.rt3dapp/lib/librt3dapp.so
10-27 22:14:08.930: INFO/DEBUG(25732): code around pc:
10-27 22:14:08.930: INFO/DEBUG(25732): 8196877c e24dd030 e08f4004 e7940001 e59f12c0
10-27 22:14:08.930: INFO/DEBUG(25732): 8196878c e5802000 e7941001 e5813000 eb08bba5
10-27 22:14:08.930: INFO/DEBUG(25732): 8196879c e5d0511e e3550000 1a00004c ebffe99d
10-27 22:14:08.930: INFO/DEBUG(25732): 819687ac e1a06000 ebffe9ae e3a02001 e1a01000
10-27 22:14:08.930: INFO/DEBUG(25732): 819687bc e1a00006 eb010cd8 e59f0288 e0840000
10-27 22:14:08.930: INFO/DEBUG(25732): stack:
10-27 22:14:08.930: INFO/DEBUG(25732): 4f2a2ac8 00001404
10-27 22:14:08.930: INFO/DEBUG(25732): 4f2a2acc 000001b8
10-27 22:14:08.930: INFO/DEBUG(25732): 4f2a2ad0 80b17280 /system/lib/libdvm.so
10-27 22:14:08.930: INFO/DEBUG(25732): 4f2a2ad4 001d6970 [heap]
10-27 22:14:08.930: INFO/DEBUG(25732): 4f2a2ad8 440f5f2c
10-27 22:14:08.930: INFO/DEBUG(25732): 4f2a2adc afd0be49 /system/lib/libc.so
10-27 22:14:08.930: INFO/DEBUG(25732): 4f2a2ae0 00000000
10-27 22:14:08.930: INFO/DEBUG(25732): 4f2a2ae4 afd10400 /system/lib/libc.so
10-27 22:14:08.930: INFO/DEBUG(25732): 4f2a2ae8 afd4172c /system/lib/libc.so
10-27 22:14:08.930: INFO/DEBUG(25732): 4f2a2aec 000000dc
10-27 22:14:08.930: INFO/DEBUG(25732): 4f2a2af0 81c53e08 /data/data/com.rtsoft.rt3dapp/lib/librt3dapp.so
10-27 22:14:08.930: INFO/DEBUG(25732): 4f2a2af4 00000000
10-27 22:14:08.930: INFO/DEBUG(25732): 4f2a2af8 440ee6ba /data/dalvik-cache/mnt@asec@com.rtsoft.rt3dapp-1@pkg.apk@classes.dex
10-27 22:14:08.930: INFO/DEBUG(25732): 4f2a2afc 440f5f48
10-27 22:14:08.930: INFO/DEBUG(25732): 4f2a2b00 df002777
10-27 22:14:08.930: INFO/DEBUG(25732): 4f2a2b04 e3a070ad
10-27 22:14:08.930: INFO/DEBUG(25732): 4f2a2b08 00000000
10-27 22:14:08.930: INFO/DEBUG(25732): 4f2a2b0c b0004998 /system/bin/linker
10-27 22:14:08.930: INFO/DEBUG(25732): 4f2a2b10 b0018904
10-27 22:14:08.930: INFO/DEBUG(25732): 4f2a2b14 81968fcc /data/data/com.rtsoft.rt3dapp/lib/librt3dapp.so
10-27 22:14:08.940: INFO/DEBUG(25732): 4f2a2b18 0000c4bc [heap]
10-27 22:14:08.940: INFO/DEBUG(25732): 4f2a2b1c 001eaa18 [heap]
10-27 22:14:08.940: INFO/DEBUG(25732): 4f2a2b20 00000000
10-27 22:14:08.940: INFO/DEBUG(25732): 4f2a2b24 00000014
10-27 22:14:08.940: INFO/DEBUG(25732): 4f2a2b28 440f5f2c
10-27 22:14:08.940: INFO/DEBUG(25732): 4f2a2b2c 001d6528 [heap]
10-27 22:14:08.940: INFO/DEBUG(25732): 4f2a2b30 00000000
10-27 22:14:08.940: INFO/DEBUG(25732): 4f2a2b34 00000000
10-27 22:14:08.940: INFO/DEBUG(25732): 4f2a2b38 4f2a2b70
10-27 22:14:08.940: INFO/DEBUG(25732): 4f2a2b3c 00000000
10-27 22:14:08.940: INFO/DEBUG(25732): 4f2a2b40 440ee6ba /data/dalvik-cache/mnt@asec@com.rtsoft.rt3dapp-1@pkg.apk@classes.dex
10-27 22:14:08.940: INFO/DEBUG(25732): 4f2a2b44 440f5f48
10-27 22:14:08.940: INFO/DEBUG(25732): 4f2a2b48 4f2a2b50
10-27 22:14:08.940: INFO/DEBUG(25732): 4f2a2b4c 80b170b8 /system/lib/libdvm.so
10-27 22:14:08.940: INFO/DEBUG(25732): 4f2a2b50 44332610 /dev/ashmem/dalvik-LinearAlloc (deleted)
10-27 22:14:08.940: INFO/DEBUG(25732): 4f2a2b54 001d6970 [heap]
10-27 22:14:08.940: INFO/DEBUG(25732): 4f2a2b58 440ee6ba /data/dalvik-cache/mnt@asec@com.rtsoft.rt3dapp-1@pkg.apk@classes.dex
10-27 22:14:08.940: INFO/DEBUG(25732): 4f2a2b5c 4f2a2c20
10-27 22:14:08.940: INFO/DEBUG(25732): 4f2a2b60 80b17280 /system/lib/libdvm.so
10-27 22:14:08.940: INFO/DEBUG(25732): 4f2a2b64 001d6970 [heap]
10-27 22:14:08.940: INFO/DEBUG(25732): 4f2a2b68 4f2a2b70
10-27 22:14:08.940: INFO/DEBUG(25732): 4f2a2b6c 80b417fb /system/lib/libdvm.so
10-27 22:14:08.940: INFO/DEBUG(25732): 4f2a2b70 440f5f40
10-27 22:14:08.940: INFO/DEBUG(25732): 4f2a2b74 440ee6ba /data/dalvik-cache/mnt@asec@com.rtsoft.rt3dapp-1@pkg.apk@classes.dex
10-27 22:14:08.940: INFO/DEBUG(25732): 4f2a2b78 81968fcc /data/data/com.rtsoft.rt3dapp/lib/librt3dapp.so
10-27 22:14:08.940: INFO/DEBUG(25732): 4f2a2b7c 4f2a2c20
10-27 22:14:08.940: INFO/DEBUG(25732): 4f2a2b80 4a5097d0 /dev/ashmem/mspace/dalvik-heap/2 (deleted)
10-27 22:14:08.940: INFO/DEBUG(25732): 4f2a2b84 00000001
10-27 22:14:08.940: INFO/DEBUG(25732): 4f2a2b88 00000000
10-27 22:14:08.940: INFO/DEBUG(25732): 4f2a2b8c 80b963d8 /system/lib/libdvm.so
10-27 22:14:08.940: INFO/DEBUG(25732): 4f2a2b90 44332610 /dev/ashmem/dalvik-LinearAlloc (deleted)
10-27 22:14:08.940: INFO/DEBUG(25732): 4f2a2b94 4a5097d0 /dev/ashmem/mspace/dalvik-heap/2 (deleted)
10-27 22:14:08.940: INFO/DEBUG(25732): 4f2a2b98 80b417c9 /system/lib/libdvm.so
10-27 22:14:08.940: INFO/DEBUG(25732): 4f2a2b9c 80b46913 /system/lib/libdvm.so
10-27 22:14:08.940: INFO/DEBUG(25732): 4f2a2ba0 00003d25
10-27 22:14:08.940: INFO/DEBUG(25732): 4f2a2ba4 80b963d8 /system/lib/libdvm.so
10-27 22:14:08.940: INFO/DEBUG(25732): 4f2a2ba8 00000002
10-27 22:14:08.940: INFO/DEBUG(25732): 4f2a2bac 440f5f40
10-27 22:14:08.950: INFO/DEBUG(25732): 4f2a2bb0 4f2a2c20
10-27 22:14:08.950: INFO/DEBUG(25732): 4f2a2bb4 001d6970 [heap]
10-27 22:14:08.950: INFO/DEBUG(25732): 4f2a2bb8 00000000
10-27 22:14:08.950: INFO/DEBUG(25732): 4f2a2bbc 440eb0c0 /data/dalvik-cache/mnt@asec@com.rtsoft.rt3dapp-1@pkg.apk@classes.dex
10-27 22:14:08.950: INFO/DEBUG(25732): 4f2a2bc0 440f5f5c
10-27 22:14:08.950: INFO/DEBUG(25732): 4f2a2bc4 4f2a2c18
10-27 22:14:08.950: INFO/DEBUG(25732): 4f2a2bc8 4a5097d0 /dev/ashmem/mspace/dalvik-heap/2 (deleted)
10-27 22:14:08.950: INFO/DEBUG(25732): 4f2a2bcc 80b1c02c /system/lib/libdvm.so
10-27 22:14:08.950: INFO/DEBUG(25732): 4f2a2bd0 00000000
10-27 22:14:08.950: INFO/DEBUG(25732): 4f2a2bd4 4f2a2c18
10-27 22:14:08.950: INFO/DEBUG(25732): 4f2a2bd8 00000000
10-27 22:14:08.950: INFO/DEBUG(25732): 4f2a2bdc 001d6978 [heap]
10-27 22:14:08.950: INFO/DEBUG(25732): 4f2a2be0 00036260 [heap]
10-27 22:14:08.950: INFO/DEBUG(25732): 4f2a2be4 80b9aec0 /system/lib/libdvm.so
10-27 22:14:08.950: INFO/DEBUG(25732): 4f2a2be8 44e0dee4 /system/framework/framework.odex
10-27 22:14:08.950: INFO/DEBUG(25732): 4f2a2bec 4f2a2ed8
10-27 22:14:08.950: INFO/DEBUG(25732): 4f2a2bf0 001d6970 [heap]
10-27 22:14:08.950: INFO/DEBUG(25732): 4f2a2bf4 80b22808 /system/lib/libdvm.so
10-27 22:14:08.950: INFO/DEBUG(25732): 4f2a2bf8 001d6970 [heap]
10-27 22:14:08.950: INFO/DEBUG(25732): 4f2a2bfc 4f2a2c18
10-27 22:14:08.950: INFO/DEBUG(25732): 4f2a2c00 80b22790 /system/lib/libdvm.so
10-27 22:14:08.950: INFO/DEBUG(25732): 4f2a2c04 000003ec
10-27 22:14:08.950: INFO/DEBUG(25732): 4f2a2c08 80b9aec0 /system/lib/libdvm.so
10-27 22:14:08.950: INFO/DEBUG(25732): 4f2a2c0c 80b216a0 /system/lib/libdvm.so
10-27 22:14:08.950: INFO/DEBUG(25732): 4f2a2c10 00000000
10-27 22:14:08.950: INFO/DEBUG(25732): 4f2a2c14 00000000
10-27 22:14:08.950: INFO/DEBUG(25732): 4f2a2c18 44e0dee4 /system/framework/framework.odex
10-27 22:14:08.950: INFO/DEBUG(25732): 4f2a2c1c 440f5fdc
10-27 22:14:08.950: INFO/DEBUG(25732): 4f2a2c20 00020000 [heap]
10-27 22:14:08.950: INFO/DEBUG(25732): 4f2a2c24 00000007
10-27 22:14:08.950: INFO/DEBUG(25732): 4f2a2c28 443326b4 /dev/ashmem/dalvik-LinearAlloc (deleted)
10-27 22:14:08.950: INFO/DEBUG(25732): 4f2a2c2c 0013a638 [heap]
10-27 22:14:08.950: INFO/DEBUG(25732): 4f2a2c30 001d6970 [heap]
10-27 22:14:08.950: INFO/DEBUG(25732): 4f2a2c34 4f2a2bd0
10-27 22:14:08.960: INFO/DEBUG(25732): 4f2a2c38 440f3300
10-27 22:14:08.960: INFO/DEBUG(25732): 4f2a2c3c 001d6978 [heap]
10-27 22:14:08.960: INFO/DEBUG(25732): 4f2a2c40 80b9b27e
10-27 22:14:08.960: INFO/DEBUG(25732): 4f2a2c44 80b9b2c0
10-27 22:14:08.960: INFO/DEBUG(25732): 4f2a2c48 00000001
10-27 22:14:08.960: INFO/DEBUG(25732): 4f2a2c4c 00000000
10-27 22:14:08.960: INFO/DEBUG(25732): 4f2a2c50 00000000
10-27 22:14:08.960: INFO/DEBUG(25732): 4f2a2c54 00000000
10-27 22:14:08.960: INFO/DEBUG(25732): 4f2a2c58 00000000
10-27 22:14:08.960: INFO/DEBUG(25732): 4f2a2c5c 00000000
10-27 22:14:08.960: INFO/DEBUG(25732): 4f2a2c60 00000000
10-27 22:14:08.960: INFO/DEBUG(25732): 4f2a2c64 80b9b390
10-27 22:14:08.960: INFO/DEBUG(25732): 4f2a2c68 00000001
10-27 22:14:08.960: INFO/DEBUG(25732): 4f2a2c6c 80b1bd74 /system/lib/libdvm.so
10-27 22:14:08.960: INFO/DEBUG(25732): 4f2a2c70 80b1bdb0 /system/lib/libdvm.so
10-27 22:14:08.960: INFO/DEBUG(25732): 4f2a2c74 80b1bc98 /system/lib/libdvm.so
10-27 22:14:08.960: INFO/DEBUG(25732): 4f2a2c78 80b1bcc0 /system/lib/libdvm.so
10-27 22:14:08.960: INFO/DEBUG(25732): 4f2a2c7c 80b1bcf0 /system/lib/libdvm.so
10-27 22:14:08.960: INFO/DEBUG(25732): 4f2a2c80 80b1bd14 /system/lib/libdvm.so
10-27 22:14:08.960: INFO/DEBUG(25732): 4f2a2c84 80b723e1 /system/lib/libdvm.so
10-27 22:14:08.960: INFO/DEBUG(25732): 4f2a2c88 00000000
10-27 22:14:08.960: INFO/DEBUG(25732): 4f2a2c8c 00000000
10-27 22:14:08.960: INFO/DEBUG(25732): 4f2a2c90 00000000
10-27 22:14:08.960: INFO/DEBUG(25732): 4f2a2c94 00000000
10-27 22:14:08.960: INFO/DEBUG(25732): 4f2a2c98 00000000
10-27 22:14:08.960: INFO/DEBUG(25732): 4f2a2c9c 00000000
10-27 22:14:08.960: INFO/DEBUG(25732): 4f2a2ca0 00000000
10-27 22:14:08.960: INFO/DEBUG(25732): 4f2a2ca4 00000000
10-27 22:14:08.960: INFO/DEBUG(25732): 4f2a2ca8 00000000
10-27 22:14:08.960: INFO/DEBUG(25732): 4f2a2cac 00000000
10-27 22:14:08.960: INFO/DEBUG(25732): 4f2a2cb0 00000000
10-27 22:14:08.960: INFO/DEBUG(25732): 4f2a2cb4 00000000
10-27 22:14:08.960: INFO/DEBUG(25732): 4f2a2cb8 00000000
10-27 22:14:08.960: INFO/DEBUG(25732): 4f2a2cbc 00000000
10-27 22:14:08.960: INFO/DEBUG(25732): 4f2a2cc0 00000000
10-27 22:14:08.960: INFO/DEBUG(25732): 4f2a2cc4 00000000
10-27 22:14:08.960: INFO/DEBUG(25732): 4f2a2cc8 00000000
10-27 22:14:08.960: INFO/DEBUG(25732): 4f2a2ccc 00000000
10-27 22:14:08.960: INFO/DEBUG(25732): 4f2a2cd0 00000000
10-27 22:14:08.970: INFO/DEBUG(25732): 4f2a2cd4 00000000
10-27 22:14:08.970: INFO/DEBUG(25732): 4f2a2cd8 00000000
10-27 22:14:08.970: INFO/DEBUG(25732): 4f2a2cdc 00000000
10-27 22:14:08.970: INFO/DEBUG(25732): 4f2a2ce0 00000000
10-27 22:14:08.970: INFO/DEBUG(25732): 4f2a2ce4 00000000
10-27 22:14:08.970: INFO/DEBUG(25732): 4f2a2ce8 00000000
10-27 22:14:08.970: INFO/DEBUG(25732): 4f2a2cec 00000000
10-27 22:14:08.970: INFO/DEBUG(25732): 4f2a2cf0 00000000
10-27 22:14:08.970: INFO/DEBUG(25732): 4f2a2cf4 00000000
10-27 22:14:08.970: INFO/DEBUG(25732): 4f2a2cf8 00000000
10-27 22:14:08.970: INFO/DEBUG(25732): 4f2a2cfc 00000000
10-27 22:14:08.970: INFO/DEBUG(25732): 4f2a2d00 00000000
10-27 22:14:08.970: INFO/DEBUG(25732): 4f2a2d04 00000000
10-27 22:14:08.970: INFO/DEBUG(25732): 4f2a2d08 00000000
10-27 22:14:08.970: INFO/DEBUG(25732): 4f2a2d0c 00000000
10-27 22:14:08.970: INFO/DEBUG(25732): 4f2a2d10 00000000
10-27 22:14:08.970: INFO/DEBUG(25732): 4f2a2d14 00000000
10-27 22:14:08.970: INFO/DEBUG(25732): 4f2a2d18 00000000
10-27 22:14:08.970: INFO/DEBUG(25732): 4f2a2d1c 00000000
10-27 22:14:08.970: INFO/DEBUG(25732): 4f2a2d20 00000000
10-27 22:14:08.970: INFO/DEBUG(25732): 4f2a2d24 00000000
10-27 22:14:08.970: INFO/DEBUG(25732): 4f2a2d28 00000000
10-27 22:14:08.970: INFO/DEBUG(25732): 4f2a2d2c 00000000
10-27 22:14:08.970: INFO/DEBUG(25732): 4f2a2d30 00000000
10-27 22:14:08.970: INFO/DEBUG(25732): 4f2a2d34 00000000
10-27 22:14:08.970: INFO/DEBUG(25732): 4f2a2d38 00000000
10-27 22:14:08.970: INFO/DEBUG(25732): 4f2a2d3c 00000000
10-27 22:14:08.970: INFO/DEBUG(25732): 4f2a2d40 00000000
10-27 22:14:09.530: INFO/DEBUG(25732): dumpmesg > /data/log/dumpstate_app_native.log
10-27 22:14:09.630: INFO/BootReceiver(175): Copying /data/tombstones/tombstone_02 to DropBox (SYSTEM_TOMBSTONE)
10-27 22:14:10.630: WARN/WindowManager(175): Window freeze timeout expired.
10-27 22:14:10.630: WARN/WindowManager(175): Force clearing orientation change: Window{4a8fc630 com.rtsoft.rt3dapp/com.rtsoft.rt3dapp.Main paused=false}
10-27 22:14:10.630: WARN/WindowManager(175): Force clearing orientation change: Window{4a936010 SurfaceView paused=false}
10-27 22:14:14.000: WARN/PowerManagerService(175): Timer 0x7->0x3|0x0
10-27 22:14:14.000: INFO/PowerManagerService(175): Ulight 7->3|0

Seth
10-28-2011, 01:54 PM
Hmm, not sure.

You tried a full clean/rebuild I take it? If the headers change at all this is often required.

I've just done a lot of work on the Android side (updated to Android SDK r14, added support for google in app purchase, added support for tapjoy, etc) but have been waiting to commit until I can get everything ready - I'll verify rt3dapp works fine here before committing and we can go from there.