09-30-2012, 04:25 AM
Too lazy to press stop and start?
Android tests
|
09-30-2012, 04:25 AM
Too lazy to press stop and start?
yes that too but it also looks cooler
10-01-2012, 07:08 PM
Do you think mcserver is now good enough for the play store?
10-02-2012, 03:16 AM
Try to at least give them time to respond.. 1 day of waiting isnt that much.
And now you have 3 posts in a row.. This forum does support edit does it not ?
The latest revision of MCServer crashes on Android while generating the initial world.
This is what I get from the logcat E/MCServer( 7367): [1f7e98|21:37:42] --- Started Log --- E/MCServer( 7367): [1f7e98|21:37:42] Creating new server instance... E/MCServer( 7367): [1f7e98|21:37:42] Reading server config... E/MCServer( 7367): [1f7e98|21:37:42] Starting server... E/MCServer( 7367): [1f7e98|21:37:42] Starting up server. E/MCServer( 7367): [1f7e98|21:37:42] Compatible clients: 1.2.4, 1.2.5, 1.3.1, 1.3.2, 1.4.2, protocol versions 29, 39, 47 E/MCServer( 7367): [1f7e98|21:37:42] Port 25565 has been bound E/MCServer( 7367): [1f7e98|21:37:42] Generating protocol encryption keypair... E/MCServer( 7367): [1f7e98|21:37:42] Loading settings... E/MCServer( 7367): [1f7e98|21:37:42] -- Loading Groups -- E/MCServer( 7367): [1f7e98|21:37:42] -- Done Loading Groups -- E/MCServer( 7367): [1f7e98|21:37:42] -- Loading crafting recipes from crafting.txt -- E/MCServer( 7367): [1f7e98|21:37:42] Cannot open file "crafting.txt", no crafting recipes will be available! E/MCServer( 7367): [1f7e98|21:37:42] -- Loading furnace recipes -- E/MCServer( 7367): [1f7e98|21:37:42] Could not open file for recipes: furnace.txt E/MCServer( 7367): [1f7e98|21:37:42] Loading worlds... E/MCServer( 7367): [1f7e98|21:37:42] cWorld::cWorld(world) E/MCServer( 7367): [1f7e98|21:37:42] [Generator]::BiomeGen value not found in world.ini, using "DistortedVoronoi". E/MCServer( 7367): [1f7e98|21:37:42] Using a cache for biomegen of size 64. E/MCServer( 7367): [1f7e98|21:37:42] [Generator]::HeightGen value not found in world.ini, using "Biomal". E/MCServer( 7367): [1f7e98|21:37:42] Using a cache for Heightgen of size 64. E/MCServer( 7367): [1f7e98|21:37:42] [Generator]::CompositionGen value not found in world.ini, using "Biomal". E/MCServer( 7367): [1f7e98|21:37:42] world/world.ini [Physics]:WaterSimulator not present or empty, using the default of "Classic". E/MCServer( 7367): [1f7e98|21:37:42] world/world.ini [Physics]:LavaSimulator not present or empty, using the default of "Classic". E/MCServer( 7367): [1f7e98|21:37:42] Loading plugin manager... E/MCServer( 7367): [1f7e98|21:37:42] Loading plugins E/MCServer( 7367): [1f7e98|21:37:42] cWebPlugin::cWebPlugin() E/MCServer( 7367): [1f7e98|21:37:43] Binding /help (core.help) E/MCServer( 7367): [1f7e98|21:37:43] Binding /pluginlist (core.pluginlist) E/MCServer( 7367): [1f7e98|21:37:43] Binding /tp (core.teleport) E/MCServer( 7367): [1f7e98|21:37:43] Binding /item (core.item) E/MCServer( 7367): [1f7e98|21:37:43] Binding /i (core.item) E/MCServer( 7367): [1f7e98|21:37:43] Binding /list (core.playerlist) E/MCServer( 7367): [1f7e98|21:37:43] Binding /who (core.playerlist) E/MCServer( 7367): [1f7e98|21:37:43] Binding /playerlist (core.playerlist) E/MCServer( 7367): [1f7e98|21:37:43] Binding /motd (core.motd) E/MCServer( 7367): [1f7e98|21:37:43] Binding /reload (core.reload) E/MCServer( 7367): [1f7e98|21:37:43] Binding /stop (core.stop) E/MCServer( 7367): [1f7e98|21:37:43] Binding /time (core.time) E/MCServer( 7367): [1f7e98|21:37:43] Binding /spawn (core.spawn) E/MCServer( 7367): [1f7e98|21:37:43] Binding /kick (core.kick) E/MCServer( 7367): [1f7e98|21:37:43] Binding /ban (core.ban) E/MCServer( 7367): [1f7e98|21:37:43] Binding /unban (core.unban) E/MCServer( 7367): [1f7e98|21:37:43] Binding /top (core.top) E/MCServer( 7367): [1f7e98|21:37:43] Binding /gm (core.changegm) E/MCServer( 7367): [1f7e98|21:37:43] Binding /gotoworld (core.gotoworld) E/MCServer( 7367): [1f7e98|21:37:43] Binding /coords (core.coords) E/MCServer( 7367): [1f7e98|21:37:43] Binding /viewdistance (core.viewdistance) E/MCServer( 7367): [1f7e98|21:37:43] Binding /regeneratechunk (core.regeneratechunk) E/MCServer( 7367): [1f7e98|21:37:43] Initialized Core v.8 E/MCServer( 7367): [1f7e98|21:37:43] Loaded 1 plugin(s) E/MCServer( 7367): [1f7e98|21:37:43] Loading MonsterConfig... E/MCServer( 7367): [1f7e98|21:37:43] cMonsterConfig: Must have both settings.ini and monsters.ini to configure attributes E/MCServer( 7367): using default attributes E/MCServer( 7367): E/MCServer( 7367): [1f7e98|21:37:43] Starting Authenticator... E/MCServer( 7367): [1f7e98|21:37:43] Starting worlds... E/MCServer( 7367): [1f7e98|21:37:43] Preparing spawn area in world "world"... E/MCServer( 7367): [a1ec8|21:37:43] Generating chunk [24, 0, 14] E/MCServer( 7367): [272e48|21:37:43] 0 chunks to load, 80 chunks to generate E/MCServer( 7367): [a1ec8|21:37:43] BioGenCache: 1 hits, 9 misses, saved 10.00 % E/MCServer( 7367): [a1ec8|21:37:43] BioGenCache: Avg cache chain length: 4.00 E/MCServer( 7367): [a1ec8|21:37:44] Generating chunk [24, 0, 15] E/MCServer( 7367): [a1ec8|21:37:44] HeiGenCache: 1 hits, 9 misses, saved 10.00 % E/MCServer( 7367): [a1ec8|21:37:44] HeiGenCache: Avg cache chain length: 3.00 I/DEBUG ( 7252): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** I/DEBUG ( 7252): Build fingerprint: 'htc_wwe/htc_bravo/bravo:2.3.3/GRI40/96875.1:user/release-keys' I/DEBUG ( 7252): pid: 7367, tid: 7383 >>> com.mcserver <<< I/DEBUG ( 7252): signal 7 (SIGBUS), code 128 (?), fault addr 00000000 I/DEBUG ( 7252): r0 06000000 r1 00000003 r2 06000000 r3 464356c4 I/DEBUG ( 7252): r4 00000000 r5 435df152 r6 0000ff00 r7 00ff0000 I/DEBUG ( 7252): r8 06000000 r9 464356c0 10 00000100 fp 00000001 I/DEBUG ( 7252): ip 00000000 sp 4640d600 lr 80c61acc pc 80bf0e10 cpsr 000f0030 I/DEBUG ( 7252): d0 656d6f6942534300 d1 0606060606060600 I/DEBUG ( 7252): d2 0606060606060601 d3 0606060606060600 I/DEBUG ( 7252): d4 0606060606060606 d5 0606060606060606 I/DEBUG ( 7252): d6 0606060606060606 d7 0606060606060606 I/DEBUG ( 7252): d8 00000000435352e1 d9 c2f00000420964d4 I/DEBUG ( 7252): d10 4360bb9c405f9230 d11 000000004360bb9c I/DEBUG ( 7252): d12 0000000000000000 d13 0000000000000000 I/DEBUG ( 7252): d14 0000000000000000 d15 0000000000000000 I/DEBUG ( 7252): d16 0000000000000000 d17 7e37e43c8800759c I/DEBUG ( 7252): d18 41cce1e043000000 d19 0000000000000000 I/DEBUG ( 7252): d20 3ff0000000000000 d21 8000000000000000 I/DEBUG ( 7252): d22 0000000000000000 d23 3ff0000000000000 I/DEBUG ( 7252): d24 3ff0000000000000 d25 0000000000000000 I/DEBUG ( 7252): d26 404e000000000000 d27 0000000000000000 I/DEBUG ( 7252): d28 0100010001000100 d29 4053000000000000 I/DEBUG ( 7252): d30 4053000000000000 d31 3ff0000000000000 I/DEBUG ( 7252): scr 20000012 I/DEBUG ( 7252): I/DEBUG ( 7252): #00 pc 003f0e10 /data/data/com.mcserver/lib/libmcserver.so (_ZN14cFastNBTWriter11AddIntArrayERKSsPKij) I/DEBUG ( 7252): #01 lr 80c61acc /data/data/com.mcserver/lib/libmcserver.so I/DEBUG ( 7252): I/DEBUG ( 7252): code around pc: I/DEBUG ( 7252): 80bf0df0 464b4019 0614cb04 43200e10 1c104680 I/DEBUG ( 7252): 80bf0e00 02044030 43204640 0a14403a 43221c02 I/DEBUG ( 7252): 80bf0e10 2201c504 d1004552 2900e084 2901d034 I/DEBUG ( 7252): 80bf0e20 2902d01f cb10d00d 06221c21 40310e20 I/DEBUG ( 7252): 80bf0e30 020a4310 403c4310 1c020a21 c504430a I/DEBUG ( 7252): I/DEBUG ( 7252): code around lr: I/DEBUG ( 7252): 80c61aac e513100c e3550001 e0830001 07c32001 I/DEBUG ( 7252): 80c61abc 0a000002 e1a01002 e1a02005 ebf65f10 I/DEBUG ( 7252): 80c61acc e5941000 e3a03000 e241200c e0820006 I/DEBUG ( 7252): 80c61adc e501600c e5823008 e5c0300c eaffffd8 I/DEBUG ( 7252): 80c61aec e59f0004 e08f0000 ebff29ce 00078c48 I/DEBUG ( 7252): I/DEBUG ( 7252): stack: I/DEBUG ( 7252): 4640d5c0 00028508 I/DEBUG ( 7252): 4640d5c4 00000001 I/DEBUG ( 7252): 4640d5c8 435df145 I/DEBUG ( 7252): 4640d5cc 80c61b98 /data/data/com.mcserver/lib/libmcserver.so I/DEBUG ( 7252): 4640d5d0 435df152 I/DEBUG ( 7252): 4640d5d4 46435e58 I/DEBUG ( 7252): 4640d5d8 00000400 I/DEBUG ( 7252): 4640d5dc 0000053e I/DEBUG ( 7252): 4640d5e0 00ff0000 I/DEBUG ( 7252): 4640d5e4 80c61acc /data/data/com.mcserver/lib/libmcserver.so I/DEBUG ( 7252): 4640d5e8 00010000 I/DEBUG ( 7252): 4640d5ec 46435bfc I/DEBUG ( 7252): 4640d5f0 00000100 I/DEBUG ( 7252): 4640d5f4 435df152 I/DEBUG ( 7252): 4640d5f8 df002777 I/DEBUG ( 7252): 4640d5fc e3a070ad I/DEBUG ( 7252): #00 4640d600 001f7534 I/DEBUG ( 7252): 4640d604 00010000 I/DEBUG ( 7252): 4640d608 00000000 I/DEBUG ( 7252): 4640d60c 00028508 I/DEBUG ( 7252): 4640d610 00000001 I/DEBUG ( 7252): 4640d614 00100000 I/DEBUG ( 7252): 4640d618 00000001 I/DEBUG ( 7252): 4640d61c 46435bfc I/DEBUG ( 7252): 4640d620 4640d674 I/DEBUG ( 7252): 4640d624 00000080 I/DEBUG ( 7252): 4640d628 00000000 I/DEBUG ( 7252): 4640d62c 80bf32b5 /data/data/com.mcserver/lib/libmcserver.so I/DEBUG ( 7252): 4640d630 4640d6bc I/DEBUG ( 7252): 4640d634 00000000 I/DEBUG ( 7252): 4640d638 00000000 I/DEBUG ( 7252): 4640d63c 00000000 I/DEBUG ( 7252): 4640d640 00000000 I/DEBUG ( 7252): 4640d644 4640d6bc E/MCServer( 7367): [a1ec8|21:37:45] Generating chunk [24, 0, 16] E/MCServer( 7367): [272e48|21:37:45] 0 chunks to load, 78 chunks to generate D/dalvikvm( 739): GC_CONCURRENT freed 486K, 50% free 3707K/7367K, external 0K/512K, paused 2ms+3ms E/MCServer( 7367): [a1ec8|21:37:46] Generating chunk [24, 0, 17] E/MCServer( 7367): [a1ec8|21:37:46] Generating chunk [24, 0, 18] E/MCServer( 7367): [a1ec8|21:37:47] Generating chunk [24, 0, 19] E/MCServer( 7367): [272e48|21:37:47] 0 chunks to load, 75 chunks to generate E/MCServer( 7367): [a1ec8|21:37:48] Generating chunk [24, 0, 20] E/MCServer( 7367): [272e48|21:37:49] 0 chunks to load, 74 chunks to generate I/DEBUG ( 7252): debuggerd committing suicide to free the zombie! I/BootReceiver( 185): Copying /data/tombstones/tombstone_04 to DropBox (SYSTEM_TOMBSTONE) I/DEBUG ( 7389): debuggerd: Jun 18 2012 03:43:40 D/dalvikvm( 185): GC_FOR_MALLOC freed 803K, 41% free 6972K/11719K, external 3394K/4057K, paused 82ms D/dalvikvm( 185): GC_FOR_MALLOC freed 548K, 43% free 6770K/11719K, external 3393K/4057K, paused 63ms D/dalvikvm( 3359): GC_CONCURRENT freed 124K, 46% free 3628K/6599K, external 0K/0K, paused 2ms+80ms E/InputDispatcher( 185): channel '40a2c950 com.mcserver/com.mcserver.MCServerActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x8 E/InputDispatcher( 185): channel '40a2c950 com.mcserver/com.mcserver.MCServerActivity (server)' ~ Channel is unrecoverably broken and will be disposed! I/WindowManager( 185): WINDOW DIED Window{40a2c950 com.mcserver/com.mcserver.MCServerActivity paused=false} I/ActivityManager( 185): Process com.mcserver (pid 7367) has died. D/Zygote ( 133): Process 7367 terminated by signal (7) This indicate something that happens on PC as well? Maybe Android is more sensitive to errors, or maybe it's only something that happens on Android Either way I can't run MCServer Gonna try compiling with -s -ggdb and -g now, maybe I can get some stack traces out of it
Well that didn't work.. it did give me the exact same cFastNBTWriter11AddIntArray thing in the log though
I commented out cFastNBTWriter::AddIntArray and it doesn't crash :/ ??? Commenting out a single line in AddIntArray makes it not crash O_o void cFastNBTWriter::AddIntArray(const AString & a_Name, const int * a_Value, size_t a_NumElements) { TagCommon(a_Name, TAG_IntArray); Int32 len = htonl(a_NumElements); m_Result.append((const char *)&len, 4); int * Elements = (int *)(m_Result.data() + m_Result.size()); m_Result.append(a_NumElements * 4, (char)0); for (size_t i = 0; i < a_NumElements; i++) { //Elements[i] = htonl(a_Value[i]); } }
I think I know, and I don't like the idea of it
If I remember correctly, ARM is alignment-sensitive architecture - if you're reading an int from the memory, you'd better make damn sure you're reading from an address divisible by 4. Otherwise an alignment exception is thrown (SIGBUS). What we have here is some arbitrary memory (AString's internal buffer), being written ints directly, without alignment. The compiler may have optimized something away (did you get warnings on strict aliasing?) and bam!, we have unaligned access. I suppose, if you take out the htonl() function call, leaving only "Elements[i] = a_Value[i];", it still crashes? How about replacing a_Value[i] with a constant, say, 12? I suppose, still crashing. Try rewriting it in this way: Code: void cFastNBTWriter::AddIntArray(const AString & a_Name, const int * a_Value, size_t a_NumElements) If it works, make it a preprocessor #if #else #endif block for arm / intel
11-12-2012, 07:25 AM
You are absolutely correct!
I didn't know this, I was trying so many things to figure out what's wrong. The last thing I checked was at which index of "Element" it crashes, and just as you expected it crashes in the first index (0). I will try your fix right now
11-12-2012, 07:28 AM
It worked
I changed it to this void cFastNBTWriter::AddIntArray(const AString & a_Name, const int * a_Value, size_t a_NumElements) { TagCommon(a_Name, TAG_IntArray); Int32 len = htonl(a_NumElements); m_Result.append((const char *)&len, 4); #if defined(ANDROID_NDK) m_Result.append(a_NumElements * 4, (char)0); for (size_t i = 0; i < a_NumElements; i++) { int Element = htonl(a_Value[i]); m_Result.append((const char *)&Element, 4); } #else int * Elements = (int *)(m_Result.data() + m_Result.size()); m_Result.append(a_NumElements * 4, (char)0); for (size_t i = 0; i < a_NumElements; i++) { Elements[i] = htonl(a_Value[i]); } #endif } thanks
Do you have any clue what this is about?
E/MCServer( 9173): [22:47:14] Preparing spawn area in world "world"... E/MCServer( 9173): [22:47:14] 396 chunks to load, 2 chunks to generate E/MCServer( 9173): [22:47:16] 126 chunks to load, 271 chunks to generate E/MCServer( 9173): [22:47:18] 0 chunks to load, 395 chunks to generate E/MCServer( 9173): [22:47:20] 0 chunks to load, 392 chunks to generate Everytime I start the server the world is regenerated :/ Nevermind, I thought "xxx chunks to load" meant that the chunks existed, but that's probably not true. I'm probably doing something wrong with reading region files |
« Next Oldest | Next Newest »
|