This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Problems building HelloWorld with EdgeLib 4.0


Problems building HelloWorld with EdgeLib 4.0

Postby ibisum » Aug 4, 2011 @ 9:43pm

Hello!

First of all I'd just like to say how excited I am that Android is now supported on Edgelib. I'm very eager to get some of my Edgelib-using projects running on the Android platform.

I've tried this evening to get a HelloWorld application running .. and for the most part, give or take a fair bit of missing information in the Tutorial page (mostly about dealing with keysigning and setting up the paths properly in android.ini), it seems like its possible ..

When I try to run my application on the simulator, however, I get the following error:

Code: Select all









10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 
26 
27 
28 
29 
30 
31 
32 
33 
34 
35 
36 
37 
38 
39 
40 
41 
42 
43 
44 
45 
46 
47 
48 
49 
50 
51 
52 
53 
54 
55 
56 
57 
58 
59 
60 
61 
62 
63 
64 
65 
66 
67 
68 
69 
70 
71 
72 
73 
74 
75 
76 
77 
78 
79 
80 
81 
82 
83 
84 
85 
86 
08-04 20:31:04.518: DEBUG/dalvikvm(722): Trying to load lib /data/data/com.untitled/lib/libHelloWorld.so 0x40514550
08-04 20:31:04.518: DEBUG/dalvikvm(722): Added shared lib /data/data/com.untitled/lib/libHelloWorld.so 0x40514550
08-04 20:31:04.518: DEBUG/dalvikvm(722): No JNI_OnLoad found in /data/data/com.untitled/lib/libHelloWorld.so 0x40514550, skipping init
08-04 20:31:04.730: DEBUG/EDGE(722): resume
08-04 20:31:05.138: WARN/dalvikvm(722): JNI WARNING: 0x40517cb8 is not a valid JNI reference
08-04 20:31:05.138: WARN/dalvikvm(722):              in Lnl/elements/edgelib/EdgelibView;.onNewBuffer ([IIII)(CallVoidMethodV)
08-04 20:31:05.138: INFO/dalvikvm(722): "main" prio=5 tid=1 RUNNABLE
08-04 20:31:05.138: INFO/dalvikvm(722):   | group="main" sCount=0 dsCount=0 obj=0x4001f1a8 self=0xce48
08-04 20:31:05.138: INFO/dalvikvm(722):   | sysTid=722 nice=0 sched=0/0 cgrp=default handle=-1345006528
08-04 20:31:05.138: INFO/dalvikvm(722):   | schedstat=( 578245055 717712519 111 )
08-04 20:31:05.138: INFO/dalvikvm(722):   at nl.elements.edgelib.EdgelibView.onNewBuffer(Native Method)
08-04 20:31:05.138: INFO/dalvikvm(722):   at nl.elements.edgelib.EdgelibView.checkView(EdgelibView.java:69)
08-04 20:31:05.138: INFO/dalvikvm(722):   at nl.elements.edgelib.EdgelibView.onDraw(EdgelibView.java:80)
08-04 20:31:05.148: INFO/dalvikvm(722):   at android.view.View.draw(View.java:6880)
08-04 20:31:05.148: INFO/dalvikvm(722):   at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
08-04 20:31:05.148: INFO/dalvikvm(722):   at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
08-04 20:31:05.148: INFO/dalvikvm(722):   at android.view.View.draw(View.java:6883)
08-04 20:31:05.148: INFO/dalvikvm(722):   at android.widget.FrameLayout.draw(FrameLayout.java:357)
08-04 20:31:05.158: INFO/dalvikvm(722):   at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
08-04 20:31:05.158: INFO/dalvikvm(722):   at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
08-04 20:31:05.158: INFO/dalvikvm(722):   at android.view.View.draw(View.java:6883)
08-04 20:31:05.158: INFO/dalvikvm(722):   at android.widget.FrameLayout.draw(FrameLayout.java:357)
08-04 20:31:05.158: INFO/dalvikvm(722):   at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1862)
08-04 20:31:05.158: INFO/dalvikvm(722):   at android.view.ViewRoot.draw(ViewRoot.java:1522)
08-04 20:31:05.158: INFO/dalvikvm(722):   at android.view.ViewRoot.performTraversals(ViewRoot.java:1258)
08-04 20:31:05.158: INFO/dalvikvm(722):   at android.view.ViewRoot.handleMessage(ViewRoot.java:1859)
08-04 20:31:05.158: INFO/dalvikvm(722):   at android.os.Handler.dispatchMessage(Handler.java:99)
08-04 20:31:05.169: INFO/dalvikvm(722):   at android.os.Looper.loop(Looper.java:123)
08-04 20:31:05.169: INFO/dalvikvm(722):   at android.app.ActivityThread.main(ActivityThread.java:3647)
08-04 20:31:05.169: INFO/dalvikvm(722):   at java.lang.reflect.Method.invokeNative(Native Method)
08-04 20:31:05.169: INFO/dalvikvm(722):   at java.lang.reflect.Method.invoke(Method.java:507)
08-04 20:31:05.169: INFO/dalvikvm(722):   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
08-04 20:31:05.169: INFO/dalvikvm(722):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
08-04 20:31:05.169: INFO/dalvikvm(722):   at dalvik.system.NativeStart.main(Native Method)
08-04 20:31:05.169: ERROR/dalvikvm(722): VM aborting
08-04 20:31:05.278: INFO/DEBUG(30): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
08-04 20:31:05.278: INFO/DEBUG(30): Build fingerprint: 'generic/sdk/generic:2.3.1/GSI11/93351:eng/test-keys'
08-04 20:31:05.289: INFO/DEBUG(30): pid: 722, tid: 722  >>> com.untitled <<<
08-04 20:31:05.289: INFO/DEBUG(30): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadd00d
08-04 20:31:05.289: INFO/DEBUG(30):  r0 fffffebc  r1 deadd00d  r2 00000026  r3 00000000
08-04 20:31:05.289: INFO/DEBUG(30):  r4 81da45c8  r5 81d866e8  r6 81d866e8  r7 40517cb8
08-04 20:31:05.289: INFO/DEBUG(30):  r8 beab33c8  r9 418fc66c  10 00000000  fp 41ad9cec
08-04 20:31:05.289: INFO/DEBUG(30):  ip 81da4728  sp beab3300  lr afd19375  pc 81d45a02  cpsr 20000030
08-04 20:31:05.499: INFO/DEBUG(30):          #00  pc 00045a02  /system/lib/libdvm.so
08-04 20:31:05.499: INFO/DEBUG(30):          #01  pc 000376fc  /system/lib/libdvm.so
08-04 20:31:05.508: INFO/DEBUG(30):          #02  pc 000386a0  /system/lib/libdvm.so
08-04 20:31:05.508: INFO/DEBUG(30):          #03  pc 000386d2  /system/lib/libdvm.so
08-04 20:31:05.508: INFO/DEBUG(30):          #04  pc 0003fa36  /system/lib/libdvm.so
08-04 20:31:05.508: INFO/DEBUG(30):          #05  pc 00051762  /data/data/com.untitled/lib/libHelloWorld.so
08-04 20:31:05.508: INFO/DEBUG(30):          #06  pc 00051820  /data/data/com.untitled/lib/libHelloWorld.so
08-04 20:31:05.518: INFO/DEBUG(30):          #07  pc 00051e16  /data/data/com.untitled/lib/libHelloWorld.so
08-04 20:31:05.518: INFO/DEBUG(30):          #08  pc 00017d34  /system/lib/libdvm.so
08-04 20:31:05.518: INFO/DEBUG(30): code around pc:
08-04 20:31:05.518: INFO/DEBUG(30): 81d459e0 447a4479 ed0cf7d1 20004c09 ee34f7d1
08-04 20:31:05.518: INFO/DEBUG(30): 81d459f0 447c4808 6bdb5823 d0002b00 49064798
08-04 20:31:05.531: INFO/DEBUG(30): 81d45a00 700a2226 eea0f7d1 0004361f 000451dd
08-04 20:31:05.531: INFO/DEBUG(30): 81d45a10 0005ebd2 fffffebc deadd00d b510b40e
08-04 20:31:05.531: INFO/DEBUG(30): 81d45a20 4c0a4b09 447bb083 aa05591b 6b5bca02
08-04 20:31:05.531: INFO/DEBUG(30): code around lr:
08-04 20:31:05.539: INFO/DEBUG(30): afd19354 b0834a0d 589c447b 26009001 686768a5
08-04 20:31:05.539: INFO/DEBUG(30): afd19364 220ce008 2b005eab 1c28d003 47889901
08-04 20:31:05.539: INFO/DEBUG(30): afd19374 35544306 d5f43f01 2c006824 b003d1ee
08-04 20:31:05.539: INFO/DEBUG(30): afd19384 bdf01c30 000281a8 ffffff88 1c0fb5f0
08-04 20:31:05.539: INFO/DEBUG(30): afd19394 43551c3d a904b087 1c16ac01 604d9004
08-04 20:31:05.539: INFO/DEBUG(30): stack:
08-04 20:31:05.539: INFO/DEBUG(30):     beab32c0  00000015
08-04 20:31:05.548: INFO/DEBUG(30):     beab32c4  afd18407  /system/lib/libc.so
08-04 20:31:05.548: INFO/DEBUG(30):     beab32c8  afd4270c  /system/lib/libc.so
08-04 20:31:05.548: INFO/DEBUG(30):     beab32cc  afd426b8  /system/lib/libc.so
08-04 20:31:05.548: INFO/DEBUG(30):     beab32d0  00000000
08-04 20:31:05.548: INFO/DEBUG(30):     beab32d4  afd19375  /system/lib/libc.so
08-04 20:31:05.548: INFO/DEBUG(30):     beab32d8  0000ce48  [heap]
08-04 20:31:05.548: INFO/DEBUG(30):     beab32dc  afd183d9  /system/lib/libc.so
08-04 20:31:05.548: INFO/DEBUG(30):     beab32e0  40517cb8  /dev/ashmem/dalvik-heap (deleted)
08-04 20:31:05.548: INFO/DEBUG(30):     beab32e4  0005ebd2  [heap]
08-04 20:31:05.558: INFO/DEBUG(30):     beab32e8  81d866e8  /system/lib/libdvm.so
08-04 20:31:05.558: INFO/DEBUG(30):     beab32ec  81d866e8  /system/lib/libdvm.so
08-04 20:31:05.558: INFO/DEBUG(30):     beab32f0  40517cb8  /dev/ashmem/dalvik-heap (deleted)
08-04 20:31:05.558: INFO/DEBUG(30):     beab32f4  afd18437  /system/lib/libc.so
08-04 20:31:05.558: INFO/DEBUG(30):     beab32f8  df002777
08-04 20:31:05.568: INFO/DEBUG(30):     beab32fc  e3a070ad
08-04 20:31:05.568: INFO/DEBUG(30): #00 beab3300  40517cb8  /dev/ashmem/dalvik-heap (deleted)
08-04 20:31:05.568: INFO/DEBUG(30):     beab3304  81d37701  /system/lib/libdvm.so
08-04 20:31:05.568: INFO/DEBUG(30): #01 beab3308  40517cb8  /dev/ashmem/dalvik-heap (deleted)
08-04 20:31:05.568: INFO/DEBUG(30):     beab330c  81d386a5  /system/lib/libdvm.so
08-04 20:31:07.398: DEBUG/Zygote(32): Process 722 terminated by signal (11)
86 lines; 4 keywds; 712 nums; 1031 ops; 3 strs; 0 coms    Syntactic Coloring v0.4 - Dan East  



The bit I think is causing the problem is this:

Code: Select all

08-04 20:31:04.518: DEBUG/dalvikvm(722): No JNI_OnLoad found in /data/data/com.untitled/lib/libHelloWorld.so 0x40514550, skipping init
1 lines; 0 keywds; 8 nums; 12 ops; 0 strs; 0 coms    Syntactic Coloring v0.4 - Dan East  



What does this mean - have I signed the wrong .apk file perhaps? I'm using the one that was created for me by EdgeBuilder in c:\projects\helloworld\release\Android\HelloWorld-unsigned.apk, and doing the standard keysigning steps mentioned in the Android documentation (1. Generate keys with keytool, 2. Sign the .apk with jarsigner, 3. using zipalign and creating "HelloWorld.apk") ..

Anyone have some clues/hints for me? Much thanks in advance for any assistance you can provide, and much thanks to the creators of EdgeLib for getting us this far! I think I'm pretty close here ..
ibisum
pm Member
 
Posts: 4
Joined: Aug 4, 2011 @ 9:36pm


Re: Problems building HelloWorld with EdgeLib 4.0

Postby Dan East » Aug 6, 2011 @ 1:06am

I don't know anything about the edge library specifically, but I have got my 2Dex game engine running perfectly under Android. The simulator is the slowest I've ever seen for any platform - ever. If you have an actual device then you're better off debugging on it. It even deploys and launches several times faster than the simulator.

JNI_OnLoad is just the entry point in the library, equivalent to DllMain for Windows DLLs. Edge may not implement a JNI_OnLoad, in which case the fact that it is missing would be expected. However if it does implement the function then you have a build issue in which some sources are not being compiled and linked.

It sounds like a C++ function in the .so is trying to call back into Java (via JNI), and the JNI environment or class object that is being passed is invalid.
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Re: Problems building HelloWorld with EdgeLib 4.0

Postby ibisum » Aug 8, 2011 @ 11:34am

Okay, I just want to say that the 'tutorial' at http://edgelib.com/index.php?node=1452 is awful. Truly awful. Beware all attempts to make progress by reading that 'tutorial', as it is not functional.


There are missing steps - editing the android.ini file is *important* (paths must be updated), and the paths referred to in the tutorial do not exist for the average, beginning user (gp2x resource path for an Android target? wtf?).

What I have done:

1. Installed all pre-requirements properly, thusly:
Code: Select all



    c:\programme\Android\android-ndk-r6
    c:\programme\Android\android-sdk
    c:\programme\Android\apache-ant-1.8.2
3 lines; 0 keywds; 3 nums; 10 ops; 0 strs; 0 coms    Syntactic Coloring v0.4 - Dan East  

(Eclipse too, though its not needed)

Note that I'm on German-language windows, thus "Program Files" = "Programme". I don't think this matters much, but it is a curious difference.

2. Installed EdgeLib, thusly:
Code: Select all

    c:\projects\Edge
1 lines; 0 keywds; 0 nums; 1 ops; 0 strs; 0 coms    Syntactic Coloring v0.4 - Dan East  


3. Created a 'hello world' application, as stated in the tutorial^WGetting Started With Android page, thusly:

Code: Select all

    c:\projects\helloworld\code\helloworld.cpp
1 lines; 0 keywds; 0 nums; 2 ops; 0 strs; 0 coms    Syntactic Coloring v0.4 - Dan East  

4. Created the "HelloWorld" project using the EdgeLib Builder Tool. Note: DO NOT USE SPACES IN THE PROJECT NAME!! This is important, otherwise the Builder will fail due to the space being mis-interpreted as an argument separator. You will get "World.so not found" errors, otherwise..

5. In the EdgeLib Builder Tool, I also had to set the following items up, not described in the 'tutorial':

i. Tools -> Options, "EDGELIB installation path", it is set to c:\projects\Edge (default location from EdgeLib installer)
ii. Project->Properties - Selected platforms, "Android" is selected. Name is "HelloWorld" (NO SPACES!!!)
iii. Project->Library/include paths->Include paths, "C:\projects\Edge\include" - without this, edgemain.h cannot be discovered.
iv. Project->Library/include paths->Library paths, "C:\projects\Edge\lib\android" - without this, libedge.a cannot be found.
v. Edited C:\projects\Edge\tools\edgebuilder\platforms\android.ini file, added the following in "General options":

Code: Select all





    androidndkpath = "C:\programme\Android\android-ndk-r6"
    androidsdkpath = "C:\programme\Android\android-sdk"
    javapath = "C:\programme\Java\jdk1.6.0_26"
    antpath = "C:\programme\Android\apache-ant-1.8.2"
    edgepath = "C:\projects\Edge"
5 lines; 0 keywds; 0 nums; 5 ops; 5 strs; 0 coms    Syntactic Coloring v0.4 - Dan East  

Please note that edgepath was *NOT* described, I worked out that %edgepath was not being set anywhere, even though the commandinstall call to "fixpath.bat" *requires* it. EDGE People, please take note!!!

Note also that I have set JAVA_HOME to the proper location, as well as adding all the bin/platform-tools/tools directories to my PATH properly, so that from the cmd line, "ant" works, "adb" works, "android" works, etc.

6. I then added the helloworld.cpp file to the Project, did "Build All", it produced the libHelloWorld.so library, and then "Build Setup", and it produced the unsigned "HelloWorld-unsigned.apk" file that is presumably linked properly and so on.

HOWEVER!!!! This file is not signed with keys, or set up for proper install - an additional step is required to make this APK work on Android - rather than do all that manually (like I did on Friday, using jarsign and zipalign and all that), I simply went into Eclipse, made a new project, imported the sources from C:\projects\helloworld\release\Android\project, added the "edge.jar" file to the project, then built and ran the project from Eclipse - which then fired up the Android emulator, and properly signed and installed the .apk file.

When I run "HelloWorld" on the emulator, the Activity starts, I get the Activity title, and then it immediately quits. No "Hello World", etc.

This is the output when I try to run the application:

Code: Select all









10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 
26 
27 
28 
29 
30 
31 
32 
33 
34 
35 
36 
37 
38 
39 
40 
41 
42 
43 
44 
45 
46 
47 
48 
49 
50 
51 
52 
53 
54 
55 
56 
57 
58 
59 
60 
61 
62 
63 
64 
65 
66 
67 
68 
69 
70 
71 
72 
73 
74 
75 
76 
77 
78 
79 
80 
81 
82 
83 
84 
85 
86 
87 
88 
89 
90 
91 
92 
93 
94 
95 
96 
08-08 10:03:40.128: INFO/ActivityManager(67): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.untitled/.HelloWorld } from pid 136
08-08 10:03:40.469: INFO/ActivityManager(67): Start proc com.untitled for activity com.untitled/.HelloWorld: pid=352 uid=10035 gids={1015}
08-08 10:03:41.641: DEBUG/dalvikvm(352): Trying to load lib /data/data/com.untitled/lib/libHelloWorld.so 0x40515050
08-08 10:03:41.687: DEBUG/dalvikvm(352): Added shared lib /data/data/com.untitled/lib/libHelloWorld.so 0x40515050
08-08 10:03:41.687: DEBUG/dalvikvm(352): No JNI_OnLoad found in /data/data/com.untitled/lib/libHelloWorld.so 0x40515050, skipping init
08-08 10:03:41.857: DEBUG/EDGE(352): resume
08-08 10:03:42.107: WARN/dalvikvm(352): JNI WARNING: 0x405187b8 is not a valid JNI reference
08-08 10:03:42.107: WARN/dalvikvm(352):              in Lnl/elements/edgelib/EdgelibView;.onNewBuffer ([IIII)(CallVoidMethodV)
08-08 10:03:42.107: INFO/dalvikvm(352): "main" prio=5 tid=1 RUNNABLE
08-08 10:03:42.107: INFO/dalvikvm(352):   | group="main" sCount=0 dsCount=0 obj=0x4001f1a8 self=0xce48
08-08 10:03:42.107: INFO/dalvikvm(352):   | sysTid=352 nice=0 sched=0/0 cgrp=default handle=-1345006528
08-08 10:03:42.107: INFO/dalvikvm(352):   | schedstat=( 362690273 741153202 61 )
08-08 10:03:42.107: INFO/dalvikvm(352):   at nl.elements.edgelib.EdgelibView.onNewBuffer(Native Method)
08-08 10:03:42.107: INFO/dalvikvm(352):   at nl.elements.edgelib.EdgelibView.checkView(EdgelibView.java:69)
08-08 10:03:42.107: INFO/dalvikvm(352):   at nl.elements.edgelib.EdgelibView.onDraw(EdgelibView.java:80)
08-08 10:03:42.107: INFO/dalvikvm(352):   at android.view.View.draw(View.java:6880)
08-08 10:03:42.107: INFO/dalvikvm(352):   at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
08-08 10:03:42.107: INFO/dalvikvm(352):   at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
08-08 10:03:42.107: INFO/dalvikvm(352):   at android.view.View.draw(View.java:6883)
08-08 10:03:42.117: INFO/dalvikvm(352):   at android.widget.FrameLayout.draw(FrameLayout.java:357)
08-08 10:03:42.117: INFO/dalvikvm(352):   at android.view.ViewGroup.drawChild(ViewGroup.java:1646)
08-08 10:03:42.117: INFO/dalvikvm(352):   at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373)
08-08 10:03:42.117: INFO/dalvikvm(352):   at android.view.View.draw(View.java:6883)
08-08 10:03:42.117: INFO/dalvikvm(352):   at android.widget.FrameLayout.draw(FrameLayout.java:357)
08-08 10:03:42.117: INFO/dalvikvm(352):   at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1862)
08-08 10:03:42.117: INFO/dalvikvm(352):   at android.view.ViewRoot.draw(ViewRoot.java:1522)
08-08 10:03:42.117: INFO/dalvikvm(352):   at android.view.ViewRoot.performTraversals(ViewRoot.java:1258)
08-08 10:03:42.117: INFO/dalvikvm(352):   at android.view.ViewRoot.handleMessage(ViewRoot.java:1859)
08-08 10:03:42.117: INFO/dalvikvm(352):   at android.os.Handler.dispatchMessage(Handler.java:99)
08-08 10:03:42.117: INFO/dalvikvm(352):   at android.os.Looper.loop(Looper.java:123)
08-08 10:03:42.117: INFO/dalvikvm(352):   at android.app.ActivityThread.main(ActivityThread.java:3647)
08-08 10:03:42.117: INFO/dalvikvm(352):   at java.lang.reflect.Method.invokeNative(Native Method)
08-08 10:03:42.117: INFO/dalvikvm(352):   at java.lang.reflect.Method.invoke(Method.java:507)
08-08 10:03:42.117: INFO/dalvikvm(352):   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
08-08 10:03:42.117: INFO/dalvikvm(352):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
08-08 10:03:42.117: INFO/dalvikvm(352):   at dalvik.system.NativeStart.main(Native Method)
08-08 10:03:42.117: ERROR/dalvikvm(352): VM aborting
08-08 10:03:42.217: INFO/DEBUG(30): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
08-08 10:03:42.227: INFO/DEBUG(30): Build fingerprint: 'generic/sdk/generic:2.3.1/GSI11/93351:eng/test-keys'
08-08 10:03:42.227: INFO/DEBUG(30): pid: 352, tid: 352  >>> com.untitled <<<
08-08 10:03:42.227: INFO/DEBUG(30): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadd00d
08-08 10:03:42.227: INFO/DEBUG(30):  r0 fffffebc  r1 deadd00d  r2 00000026  r3 00000000
08-08 10:03:42.227: INFO/DEBUG(30):  r4 81da45c8  r5 81d866e8  r6 81d866e8  r7 405187b8
08-08 10:03:42.227: INFO/DEBUG(30):  r8 bec0d420  r9 418fc66c  10 418fc654  fp 42596f38
08-08 10:03:42.227: INFO/DEBUG(30):  ip 81da4728  sp bec0d358  lr afd19375  pc 81d45a02  cpsr 20000030
08-08 10:03:42.487: INFO/DEBUG(30):          #00  pc 00045a02  /system/lib/libdvm.so
08-08 10:03:42.487: INFO/DEBUG(30):          #01  pc 000376fc  /system/lib/libdvm.so
08-08 10:03:42.487: INFO/DEBUG(30):          #02  pc 000386a0  /system/lib/libdvm.so
08-08 10:03:42.498: INFO/DEBUG(30):          #03  pc 000386d2  /system/lib/libdvm.so
08-08 10:03:42.498: INFO/DEBUG(30):          #04  pc 0003fa36  /system/lib/libdvm.so
08-08 10:03:42.498: INFO/DEBUG(30):          #05  pc 00051762  /data/data/com.untitled/lib/libHelloWorld.so
08-08 10:03:42.498: INFO/DEBUG(30):          #06  pc 00051820  /data/data/com.untitled/lib/libHelloWorld.so
08-08 10:03:42.498: INFO/DEBUG(30):          #07  pc 00051e16  /data/data/com.untitled/lib/libHelloWorld.so
08-08 10:03:42.507: INFO/DEBUG(30):          #08  pc 00017d34  /system/lib/libdvm.so
08-08 10:03:42.507: INFO/DEBUG(30): code around pc:
08-08 10:03:42.507: INFO/DEBUG(30): 81d459e0 447a4479 ed0cf7d1 20004c09 ee34f7d1
08-08 10:03:42.507: INFO/DEBUG(30): 81d459f0 447c4808 6bdb5823 d0002b00 49064798
08-08 10:03:42.507: INFO/DEBUG(30): 81d45a00 700a2226 eea0f7d1 0004361f 000451dd
08-08 10:03:42.507: INFO/DEBUG(30): 81d45a10 0005ebd2 fffffebc deadd00d b510b40e
08-08 10:03:42.507: INFO/DEBUG(30): 81d45a20 4c0a4b09 447bb083 aa05591b 6b5bca02
08-08 10:03:42.507: INFO/DEBUG(30): code around lr:
08-08 10:03:42.507: INFO/DEBUG(30): afd19354 b0834a0d 589c447b 26009001 686768a5
08-08 10:03:42.507: INFO/DEBUG(30): afd19364 220ce008 2b005eab 1c28d003 47889901
08-08 10:03:42.507: INFO/DEBUG(30): afd19374 35544306 d5f43f01 2c006824 b003d1ee
08-08 10:03:42.507: INFO/DEBUG(30): afd19384 bdf01c30 000281a8 ffffff88 1c0fb5f0
08-08 10:03:42.507: INFO/DEBUG(30): afd19394 43551c3d a904b087 1c16ac01 604d9004
08-08 10:03:42.507: INFO/DEBUG(30): stack:
08-08 10:03:42.507: INFO/DEBUG(30):     bec0d318  00000015
08-08 10:03:42.507: INFO/DEBUG(30):     bec0d31c  afd18407  /system/lib/libc.so
08-08 10:03:42.507: INFO/DEBUG(30):     bec0d320  afd4270c  /system/lib/libc.so
08-08 10:03:42.507: INFO/DEBUG(30):     bec0d324  afd426b8  /system/lib/libc.so
08-08 10:03:42.507: INFO/DEBUG(30):     bec0d328  00000000
08-08 10:03:42.507: INFO/DEBUG(30):     bec0d32c  afd19375  /system/lib/libc.so
08-08 10:03:42.507: INFO/DEBUG(30):     bec0d330  0000ce48  [heap]
08-08 10:03:42.507: INFO/DEBUG(30):     bec0d334  afd183d9  /system/lib/libc.so
08-08 10:03:42.507: INFO/DEBUG(30):     bec0d338  405187b8  /dev/ashmem/dalvik-heap (deleted)
08-08 10:03:42.507: INFO/DEBUG(30):     bec0d33c  0005ebd2  [heap]
08-08 10:03:42.507: INFO/DEBUG(30):     bec0d340  81d866e8  /system/lib/libdvm.so
08-08 10:03:42.507: INFO/DEBUG(30):     bec0d344  81d866e8  /system/lib/libdvm.so
08-08 10:03:42.507: INFO/DEBUG(30):     bec0d348  405187b8  /dev/ashmem/dalvik-heap (deleted)
08-08 10:03:42.507: INFO/DEBUG(30):     bec0d34c  afd18437  /system/lib/libc.so
08-08 10:03:42.507: INFO/DEBUG(30):     bec0d350  df002777
08-08 10:03:42.507: INFO/DEBUG(30):     bec0d354  e3a070ad
08-08 10:03:42.507: INFO/DEBUG(30): #00 bec0d358  405187b8  /dev/ashmem/dalvik-heap (deleted)
08-08 10:03:42.507: INFO/DEBUG(30):     bec0d35c  81d37701  /system/lib/libdvm.so
08-08 10:03:42.507: INFO/DEBUG(30): #01 bec0d360  405187b8  /dev/ashmem/dalvik-heap (deleted)
08-08 10:03:42.507: INFO/DEBUG(30):     bec0d364  81d386a5  /system/lib/libdvm.so
08-08 10:03:44.837: INFO/BootReceiver(67): Copying /data/tombstones/tombstone_08 to DropBox (SYSTEM_TOMBSTONE)
08-08 10:03:44.876: DEBUG/Zygote(32): Process 352 terminated by signal (11)
08-08 10:03:44.886: ERROR/InputDispatcher(67): channel '40676748 com.untitled/com.untitled.HelloWorld (server)' ~ Consumer closed input channel or an error occurred.  events=0x8
08-08 10:03:44.886: ERROR/InputDispatcher(67): channel '40676748 com.untitled/com.untitled.HelloWorld (server)' ~ Channel is unrecoverably broken and will be disposed!
08-08 10:03:44.899: INFO/ActivityManager(67): Process com.untitled (pid 352) has died.
08-08 10:03:44.899: INFO/WindowManager(67): WIN DEATH: Window{40676748 com.untitled/com.untitled.HelloWorld paused=false}
08-08 10:03:45.239: WARN/InputManagerService(67): Got RemoteException sending setActive(false) notification to pid 352 uid 10035
08-08 10:03:47.037: WARN/KeyCharacterMap(136): No keyboard for id 0
08-08 10:03:47.046: WARN/KeyCharacterMap(136): Using default keymap: /system/usr/keychars/qwerty.kcm.bin
96 lines; 9 keywds; 793 nums; 1162 ops; 5 strs; 0 coms    Syntactic Coloring v0.4 - Dan East  



So, to my eyes, it looks like the libHelloWorld.so library is not being properly built .. or .. something.

Any assistance from the Edge people is very much appreciated - I report this problem not to make a fuss about the quality of Edge, but to assist others in using this potentially very useful tool. Anything I can do to make this project work, and to get my first Edge project on Android actually functioning, I will report to this thread for future reference .. in the meantime, however, I'm stumped.
ibisum
pm Member
 
Posts: 4
Joined: Aug 4, 2011 @ 9:36pm


Re: Problems building HelloWorld with EdgeLib 4.0

Postby ibisum » Aug 8, 2011 @ 1:56pm

Additional Discovery: The problem appears to be related to the order in which the build commands are executed.

To continue debugging this issue, I investigated the "build.bat" file, which I told EdgeLib Build Tool to output, instead of executing the steps. I modified the resulting file, very subtly, thus:

Code: Select all









10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
C:\WINDOWS\system32\cmd.exe /if not exist "C:\projects\helloworld\release\Android\HelloWorld.java" "C:\projects\Edge\tools\edgebuilder\bin\genresource.exe" "C:\projects\Edge\tools\edgebuilder\templates\androidmain.ini" "C:\projects\helloworld\release\Android\HelloWorld.java" $domain$=com.untitled $caption$= $binname$=HelloWorld
"C:\Programme\Android\android-sdk\tools\android.bat" create project -"HelloWorld" -t android-3 -"C:\projects\helloworld\release\Android\project" -a HelloWorld -"com.untitled"

C:\WINDOWS\system32\cmd.exe /if not exist "C:\projects\helloworld\release\Android\project\" mkdir "C:\projects\helloworld\release\Android\project"
C:\WINDOWS\system32\cmd.exe /if not exist "C:\projects\helloworld\release\Android\project\bin\" mkdir "C:\projects\helloworld\release\Android\project\bin"
C:\WINDOWS\system32\cmd.exe /if not exist "C:\projects\helloworld\release\Android\project\bin\classes\" mkdir "C:\projects\helloworld\release\Android\project\bin\classes"
C:\WINDOWS\system32\cmd.exe /if not exist "C:\projects\helloworld\release\Android\project\libs\" mkdir "C:\projects\helloworld\release\Android\project\libs"
C:\WINDOWS\system32\cmd.exe /if not exist "C:\projects\helloworld\release\Android\project\libs\armeabi" mkdir "C:\projects\helloworld\release\Android\project\libs\armeabi"
C:\WINDOWS\system32\cmd.exe /if not exist "C:\projects\helloworld\release\Android\project\assets\" mkdir "C:\projects\helloworld\release\Android\project\assets"
C:\WINDOWS\system32\cmd.exe /if exist "C:\projects\helloworld\release\Android\project\build.xml" del //"C:\projects\helloworld\release\Android\project\libs\*"
rem "C:\Programme\Android\android-sdk\tools\android.bat" create project -"HelloWorld" -t android-3 -"C:\projects\helloworld\release\Android\project" -a HelloWorld -"com.untitled"
C:\WINDOWS\system32\cmd.exe /C copy /"C:\projects\helloworld\release\Android\HelloWorld.java" "C:\projects\helloworld\release\Android\project\src\com\untitled\HelloWorld.java"
C:\WINDOWS\system32\cmd.exe /if exist "C:\projects\helloworld\release\Android\AndroidManifest.xml" copy /"C:\projects\helloworld\release\Android\AndroidManifest.xml" "C:\projects\helloworld\release\Android\project\AndroidManifest.xml"
C:\WINDOWS\system32\cmd.exe /if exist "C:\projects\helloworld\release\Android\build.properties" copy /"C:\projects\helloworld\release\Android\AndroidManifest.xml" "C:\projects\helloworld\release\Android\project\build.properties"
"C:\projects\Edge\tools\edgebuilder\bin\fixpath.bat" "C:\projects\helloworld\release\Android\project\bin\classes" "C:\Programme\Java\jdk1.6.0_26\bin\jar" xvf "C:\projects\Edge\lib\android\edge.jar"
C:\WINDOWS\system32\cmd.exe /C copy "C:\projects\helloworld\release\Android\HelloWorld.so" "C:\projects\helloworld\release\Android\project\libs\armeabi\libHelloWorld.so"
"C:\Programme\Android\apache-ant-1.8.2\bin\ant.bat" -buildfile "C:\projects\helloworld\release\Android\project\build.xml" release
C:\WINDOWS\system32\cmd.exe /C copy /"C:\projects\helloworld\release\Android\project\bin\*.apk" "C:\projects\helloworld\release\Android\"

19 lines; 10 keywds; 2 nums; 67 ops; 44 strs; 0 coms    Syntactic Coloring v0.4 - Dan East  



If you compare this with a 'normal' build.bat emitted from the Edge Build Tool, you will see that the call to "android.bat" to create the project is done *after* copying a lot of the other files already into place - this fails, since the call to "android create project" expects the destination directory to be *empty*.

I moved the call to "android create project" to the top of the cmd list so that it was the first thing that was done, then the other files are copied in place .. after running this modified build.bat myself from the command line, I was able to install the .APK and it ran fine.

So, I think this is a bug that didn't get discovered by the EdgeLib developers - it seems very odd to me that the "create project" step is done after having already populated the project tree. Perhaps this sheds some light on the issues I have experienced trying to get this to work ..



EDIT: As written, this build.bat file won't work. All call-outs to external .bat files need to have "call " prefixed .. so thats another bug that has to be fixed. I hand-edited the file, added "call " to the .bat calls, and now the full script runs properly, generates a proper .apk. I then go into the Android\project directory and do "ant install", and I get my new app ..
ibisum
pm Member
 
Posts: 4
Joined: Aug 4, 2011 @ 9:36pm


Re: Problems building HelloWorld with EdgeLib 4.0

Postby maskin » Aug 9, 2011 @ 8:07am

Yeah! I build it too. But working only HelloWorld.
Other samples Like Animate3D and Fountain are still not working :(
maskin
pm Member
 
Posts: 32
Joined: Dec 8, 2006 @ 10:06am


Re: Problems building HelloWorld with EdgeLib 4.0

Postby edge » Aug 16, 2011 @ 3:55pm

Hey guys. We are working on a few fixes and plan to release the 4.01 update soon. Thanks for your patience!

Wouter
EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Re: Problems building HelloWorld with EdgeLib 4.0

Postby edge » Aug 16, 2011 @ 5:26pm

We've created a new build script that should address the following issues:
- Software installation paths including spaces
- Integrated signing
- Helloworld should now properly build and run without manual intervention.

android.ini.txt
(7.42 KiB) Downloaded 404 times


To get the EDGELIB Builder operational, replace android.ini with the attached version (rename file first from android.ini.txt to android.ini) and modify the paths as appropriate. Start EDGELIB Builder, create the project as desired, then make sure the paths listed under tools->options and project->properties are correct. The environment variables that should be set is JAVA_HOME (which should point to the jdk of choice), and the "C:\Program Files\java\jdk\bin" folder (replace jdk with actual name) should be appended to the PATH environment variable.

When everything is as expected, restart EDGELIB Builder to make sure all changes take effect before building. There are some issues with certain settings partially updating.

We've also confirmed a regression where accessing resources may occasionally lead to the VM aborting. We will post an update to fix that as soon as possible.

Marcel
EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Re: Problems building HelloWorld with EdgeLib 4.0

Postby edge » Aug 26, 2011 @ 12:52pm

Last night we released EDGELIB 4.01 which contains a couple of fixes for creating Android builds.

Please let us know if it resolves your issues!

Kind regards,
Wouter
EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Re: Problems building HelloWorld with EdgeLib 4.0

Postby ibisum » Aug 26, 2011 @ 1:58pm

Thank you, I will download this and check it out tonight ..
ibisum
pm Member
 
Posts: 4
Joined: Aug 4, 2011 @ 9:36pm


Re: Problems building HelloWorld with EdgeLib 4.0

Postby maskin » Aug 27, 2011 @ 10:41am

All works. Animate3D is building. BUT:
1. No support of GL in Android. If I try build Animate3D with macrodef EGL_USEGL project build not complette. Wihout it all builds correctly.
2. On Android device Animate3D works, but when I rotate device - application silent down
maskin
pm Member
 
Posts: 32
Joined: Dec 8, 2006 @ 10:06am


Re: Problems building HelloWorld with EdgeLib 4.0

Postby Dan East » Aug 28, 2011 @ 4:09am

I know nothing about EdgeLib, but in regards to the orientation change, the OpenGL context is recreated, thus all textures, VBOs, etc, need to be uploaded again before you attempt to bind and render with them. You can disable automatic orientation changes in the Android project's Manifest (AndroidManifest.XML).
Again, I have no idea how much of this EdgeLib hides away or manages, but when developing for Android directly these are issues that must be addressed. Also note that I found orientation changes also purge SoundPool and MediaPlayer resources too.

XML excerpt to disable automatic orientation changes / events. The android:screenOrientation and android:configChanges attributes are what you need to add.
Code: Select all





<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true">
     <activity android:name="MyActivity"
          android:screenOrientation="portrait"
          android:configChanges="orientation|keyboardHidden"
...
5 lines; 0 keywds; 0 nums; 18 ops; 6 strs; 0 coms    Syntactic Coloring v0.4 - Dan East  
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Re: Problems building HelloWorld with EdgeLib 4.0

Postby maskin » Aug 29, 2011 @ 11:41am

I know that screen rotate can be disabled from AndroidManifest. In case of my previous post - silent down of application it's a bug! I don't want make some part-time fixes, I want have stable SDK.
maskin
pm Member
 
Posts: 32
Joined: Dec 8, 2006 @ 10:06am


Return to EDGELIB


Sort


Forum Description

Powerful and affordable C++ middleware solution covering true multi-platform 2D, 3D and network features for Apple iPhone, Windows Mobile, Symbian S60, UIQ, Linux and Windows desktop.

Moderator:

edge

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron