Windows Phone 8, iOS build error

33 views
Skip to first unread message

Piotr

unread,
Mar 22, 2015, 5:43:26 AM3/22/15
to codenameone...@googlegroups.com
Hi,

after a few months I finished moving quite a big project (1MB of source code) from j2me to CN1.
On simulator the most futures is working but I cannot manage built problems. After a week of study posts and other source I would like to ask about help.

Thirst I started to build for Windows Phone 8, error log is bellow:
Executing: java -Xmx1024m -jar win_xmlvm.jar --in=C:\Users\Shai\AppData\Local\Temp\build8001563752495956973xxx\classes --resource=C:\Users\Shai\AppData\Local\Temp\build8001563752495956973xxx\FMap_App\FMap_App\res/ --out=C:\Users\Shai\AppData\Local\Temp\build8001563752495956973xxx\FMap_App\FMap_App\src --target=csharp --app-name=FMap_App Exception in thread "main" java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at com.simontuffs.onejar.Boot.run(Boot.java:306)
    at com.simontuffs.onejar.Boot.main(Boot.java:159)
Caused by: com.android.dx.cf.code.SimException: not an array type: I
    at com.android.dx.cf.code.BytecodeArray.parseInstruction(BytecodeArray.java:793)
    at com.android.dx.cf.code.Simulator.simulate(Simulator.java:99)
    at com.android.dx.cf.code.Ropper.processBlock(Ropper.java:678)
    at com.android.dx.cf.code.Ropper.doit(Ropper.java:633)
    at com.android.dx.cf.code.Ropper.convert(Ropper.java:250)
    at org.xmlvm.proc.out.DEXmlvmOutputProcess.processMethod(DEXmlvmOutputProcess.java:958)
    at org.xmlvm.proc.out.DEXmlvmOutputProcess.process(DEXmlvmOutputProcess.java:673)
    at org.xmlvm.proc.out.DEXmlvmOutputProcess.generateDEXmlvmFile(DEXmlvmOutputProcess.java:423)
    at org.xmlvm.proc.out.DEXmlvmOutputProcess.generateDEXmlvmFile(DEXmlvmOutputProcess.java:373)
    at org.xmlvm.proc.out.DEXmlvmOutputProcess.processPhase1(DEXmlvmOutputProcess.java:345)
    at org.xmlvm.proc.XmlvmProcessImpl.forwardOrProcessPhase1(XmlvmProcessImpl.java:209)
    at org.xmlvm.proc.XmlvmProcessImpl.forwardOrProcessPhase1(XmlvmProcessImpl.java:206)
    at org.xmlvm.proc.XmlvmProcessImpl.forwardOrProcessPhase1(XmlvmProcessImpl.java:206)
    at org.xmlvm.proc.XmlvmProcessImpl.forwardOrProcessPhase1(XmlvmProcessImpl.java:206)
    at org.xmlvm.proc.XmlvmProcessor.process(XmlvmProcessor.java:157)
    at org.xmlvm.proc.XmlvmProcessor.process(XmlvmProcessor.java:137)
    at org.xmlvm.Main.main(Main.java:53)
    ... 6 more
Caused by: java.lang.IllegalArgumentException: not an array type: I
    at com.android.dx.rop.type.Type.getComponentType(Type.java:789)
    at com.android.dx.cf.code.Simulator$SimVisitor.visitNoArgs(Simulator.java:326)
    at com.android.dx.cf.code.BytecodeArray.parseInstruction(BytecodeArray.java:541)
    ... 22 more


so next I try to build for iOS and I find more detail i error log (very long 8M but useful :):
CompileC build/FMap_App.build/Release-iphoneos/FMap_App.build/Objects-normal/armv7/native_ca_weblite_codename1_net_impl_NativeSocketImplCodenameOne.o ../build/xcode/src/app/native_ca_weblite_codename1_net_impl_NativeSocketImplCodenameOne.m normal armv7 objective-c com.apple.compilers.llvmgcc42
    cd /var/folders/p7/d3z112yd0156kxkm2p21p8ym0000gn/T/build7421620736056166452xxx/dist
    setenv LANG en_US.US-ASCII
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc-4.2 -x objective-c -arch armv7 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -Os -Wreturn-type -w -DALL_INTERIOR_POINTERS -DGC_THREADS -DTHREAD_LOCAL_ALLOC -DPARALLEL_MARK -DUSE_MMAP -DUSE_MUNMAP -DNO_DYLD_BIND_FULLY_IMAGE -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -gdwarf-2 -fvisibility=hidden -mno-thumb -miphoneos-version-min=4.3 -iquote /var/folders/p7/d3z112yd0156kxkm2p21p8ym0000gn/T/build7421620736056166452xxx/dist/build/FMap_App.build/Release-iphoneos/FMap_App.build/FMap_App-generated-files.hmap -I/var/folders/p7/d3z112yd0156kxkm2p21p8ym0000gn/T/build7421620736056166452xxx/dist/build/FMap_App.build/Release-iphoneos/FMap_App.build/FMap_App-own-target-headers.hmap -I/var/folders/p7/d3z112yd0156kxkm2p21p8ym0000gn/T/build7421620736056166452xxx/dist/build/FMap_App.build/Release-iphoneos/FMap_App.build/FMap_App-all-target-headers.hmap -iquote /var/folders/p7/d3z112yd0156kxkm2p21p8ym0000gn/T/build7421620736056166452xxx/dist/build/FMap_App.build/Release-iphoneos/FMap_App.build/FMap_App-project-headers.hmap -I/var/folders/p7/d3z112yd0156kxkm2p21p8ym0000gn/T/build7421620736056166452xxx/dist/build/Release-iphoneos/include -I../build/xcode/src/lib/boehmgc/libatomic_ops/src -I../build/xcode/src/lib/boehmgc/libatomic_ops/src/.deps -I../build/xcode/src/lib/boehmgc/libatomic_ops/src/atomic_ops -I../build/xcode/src/lib/boehmgc/libatomic_ops/src/atomic_ops/sysdeps -I../build/xcode/src/lib/boehmgc/libatomic_ops/src/atomic_ops/sysdeps/armcc -I../build/xcode/src/lib/boehmgc/libatomic_ops/src/atomic_ops/sysdeps/gcc -I../build/xcode/src/lib/boehmgc/libatomic_ops/src/atomic_ops/sysdeps/hpc -I../build/xcode/src/lib/boehmgc/libatomic_ops/src/atomic_ops/sysdeps/ibmc -I../build/xcode/src/lib/boehmgc/libatomic_ops/src/atomic_ops/sysdeps/icc -I../build/xcode/src/lib/boehmgc/libatomic_ops/src/atomic_ops/sysdeps/msftc -I../build/xcode/src/lib/boehmgc/libatomic_ops/src/atomic_ops/sysdeps/sunc -I../build/xcode/src/lib/boehmgc/include -I../build/xcode/src/lib/boehmgc/include/extra -I../build/xcode/src/lib/boehmgc/include/private -I/var/folders/p7/d3z112yd0156kxkm2p21p8ym0000gn/T/build7421620736056166452xxx/dist/build/FMap_App.build/Release-iphoneos/FMap_App.build/DerivedSources/armv7 -I/var/folders/p7/d3z112yd0156kxkm2p21p8ym0000gn/T/build7421620736056166452xxx/dist/build/FMap_App.build/Release-iphoneos/FMap_App.build/DerivedSources -F/var/folders/p7/d3z112yd0156kxkm2p21p8ym0000gn/T/build7421620736056166452xxx/dist/build/Release-iphoneos -DNS_BLOCK_ASSERTIONS=1 -c /var/folders/p7/d3z112yd0156kxkm2p21p8ym0000gn/T/build7421620736056166452xxx/dist/../build/xcode/src/app/native_ca_weblite_codename1_net_impl_NativeSocketImplCodenameOne.m -o /var/folders/p7/d3z112yd0156kxkm2p21p8ym0000gn/T/build7421620736056166452xxx/dist/build/FMap_App.build/Release-iphoneos/FMap_App.build/Objects-normal/armv7/native_ca_weblite_codename1_net_impl_NativeSocketImplCodenameOne.o
/var/folders/p7/d3z112yd0156kxkm2p21p8ym0000gn/T/build7421620736056166452xxx/dist/../build/xcode/src/app/native_ca_weblite_codename1_net_impl_NativeSocketImplCodenameOne.m:13: error: expected ')' before 'JAVA_LONG'

How I understand problems is with compile CN1Sockets lib, so for test I remove it from code and for iOS server get:

iOS Build Error Sun Mar 22 2015 09:41:31 GMT+0100 (CET)

but in log there is nothing special and at the end we can find:

** BUILD SUCCEEDED **

codesign --keychain /Users/administrator/Library/Keychains/login.keychain -f -vv --entitlements /var/folders/p7/d3z112yd0156kxkm2p21p8ym0000gn/T/Entitlements737883487104301189.plist -s iPhone Distribution: Shai Almog dist/build/Release-iphoneos/FMap_App.app
iPhone Distribution: Shai Almog: ambiguous (matches "iPhone Distribution: Shai Almog (Q5GHSKAL2F)" and "iPhone Distribution: Shai Almog (Q5GHSKAL2F)" in /Users/administrator/Library/Keychains/login.keychain)
full log is in here: https://drive.google.com/file/d/0B_J2xdfDrOC8TzBqQ3dzejEzWFk/view?usp=sharing

In the windows build still the same error, nothing change.

My question:

1. Why the library CN1Sockets generates errors on iOS build? The errors is not in native part but java, so it should be ok because on simulator it is working?

2. Why server build (without CN1Sockets lib) fails despite no error in log?

3. How can I find out problem for Windows build? In my code I use arrays in many places but only one dimension.

PS. I try to make local build (xmlvm) to find out answer our self but it is not working similar to server so it is not very helpful - I make another post about that issue.




Shai Almog

unread,
Mar 22, 2015, 2:46:27 PM3/22/15
to codenameone...@googlegroups.com
Hi,
you are building without a valid certificate. For some reason building without a certificate fails with native code. We looked at this but are still stumped as to why.
We didn't spend too much time on it though since building without a certificate isn't something that you are supposed to do and if you do choose to do this you might as well use the old VM which doesn't have that issue.
Reply all
Reply to author
Forward
0 new messages