Can't run NMETemplate in Android Emulator and Witstech A81E

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Can't run NMETemplate in Android Emulator and Witstech A81E

dimanux
Hi all, sorry for my English, I'm from Russia :)

I compiled NMETemplate with android target and tested it on Android Emulator (2.1-update1). After changing of screen orientation the app was closed. On Witstech A81E application was closed immediately after white screen appearing. I have attached a log to the message. It is possible to fix it? Or I'm doing something wrong?

Reply | Threaded
Open this post in threaded view
|

Re: Can't run NMETemplate in Android Emulator and Witstech A81E

singmajesty
Hmm, that's strange.

It is possible that NME is doing something that the Android emulator is not processing correctly, but it isn't good that the application is crashing on your device!

What version of Android does your device use? Do you know what CPU instructions it uses (ARMv6, ARMv7, etc) and if it is compatible with the Android NDK?
Reply | Threaded
Open this post in threaded view
|

Re: Can't run NMETemplate in Android Emulator and Witstech A81E

Gamehaxe
Hi,
Yes, the android emulator is not really supported since I do most of my
"emulation" in flash or desktop hxcpp.
I could be that it can't even create an opengl context.

Hugh

> Hmm, that's strange.
>
> It is possible that NME is doing something that the Android emulator is  
> not
> processing correctly, but it isn't good that the application is crashing  
> on
> your device!

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Can't run NMETemplate in Android Emulator and Witstech A81E

singmajesty
The information I am finding points to Android not supporting OpenGL ES in  
its emulator.

As for debugging, I totally agree:


1.) Use Flash to test your application logic. It's fast and easy to debug

2.) Use CPP for the desktop to test C++ instead of Flash. This will help  
test or display some C++ specific behaviors

3.) Use your device (webOS, Android, iOS) to test C++, on your target  
mobile platform, or just in your hand


Fortunately all of these targets are fast, but I find my work to go even  
faster if I rely first on Flash or CPP on the desktop.




On Tue, 30 Aug 2011 09:28:36 -0700, Gamehaxe <[hidden email]> wrote:

> Hi,
> Yes, the android emulator is not really supported since I do most of my
> "emulation" in flash or desktop hxcpp.
> I could be that it can't even create an opengl context.
>
> Hugh
>
>> Hmm, that's strange.
>>
>> It is possible that NME is doing something that the Android emulator is  
>> not
>> processing correctly, but it isn't good that the application is  
>> crashing on
>> your device!
>


--
Using Opera's revolutionary email client: http://www.opera.com/mail/

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Can't run NMETemplate in Android Emulator and Witstech A81E

dimanux
Thanks for answers and advices :)
My device is A81E (specification, android 2.2, ARM A8). And there is a log from cmd of running nme on this device. After application was installed one frame rendered (even with bitmap data) and immediately closed... Help me, please :) I want to start nme on this tablet.
Reply | Threaded
Open this post in threaded view
|

Re: Can't run NMETemplate in Android Emulator and Witstech A81E

dimanux
I found a problem in NME_SOURCE/project/android/AndroidFrame.cpp:

void AndoidRequestRender()
{
        jclass cls = gEnv->FindClass("org/haxe/nme/MainView");
   jmethodID mid = gEnv->GetStaticMethodID(cls, "renderNow", "()V");
   if (mid == 0)
       return;
    gEnv->CallStaticObjectMethod(cls, mid );
}

There is wrong method type calling with function CallStaticObjectMethod... It must be CallStaticVoidMethod. After replacing it with:

void AndoidRequestRender()
{
        jclass cls = gEnv->FindClass("org/haxe/nme/MainView");
   jmethodID mid = gEnv->GetStaticMethodID(cls, "renderNow", "()V");
   if (mid == 0)
       return;
   gEnv->CallStaticVoidMethod(cls, mid);
}

application run excellent on my A81E! :)
Reply | Threaded
Open this post in threaded view
|

Re: Can't run NMETemplate in Android Emulator and Witstech A81E

singmajesty
I am so glad it is working!

Thank you! I have tested and committed this change to the NME repository  
so it will be fixed in the next release.

Have a great day!



On Fri, 02 Sep 2011 13:49:48 -0700, dimanux <[hidden email]> wrote:

> I found a problem in NME_SOURCE/project/android/AndroidFrame.cpp:
>
> void AndoidRequestRender()
> {
>         jclass cls = gEnv->FindClass("org/haxe/nme/MainView");
>    jmethodID mid = gEnv->GetStaticMethodID(cls, "renderNow", "()V");
>    if (mid == 0)
>        return;
>     gEnv->CallStaticObjectMethod(cls, mid );
> }
>
> There is wrong method type calling with function  
> CallStaticObjectMethod...
> It must be CallStaticVoidMethod. After replacing it with:
>
> void AndoidRequestRender()
> {
>         jclass cls = gEnv->FindClass("org/haxe/nme/MainView");
>    jmethodID mid = gEnv->GetStaticMethodID(cls, "renderNow", "()V");
>    if (mid == 0)
>        return;
>    gEnv->CallStaticVoidMethod(cls, mid);
> }
>
> application run excellent on my A81E! :)
>
> --
> View this message in context:  
> http://haxe.1354130.n2.nabble.com/Can-t-run-NMETemplate-in-Android-Emulator-and-Witstech-A81E-tp6735446p6755290.html
> Sent from the Haxe mailing list archive at Nabble.com.
>


--
Using Opera's revolutionary email client: http://www.opera.com/mail/

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Can't run NMETemplate in Android Emulator and Witstech A81E

Jan_Flanders


On Sat, Sep 3, 2011 at 1:49 AM, Joshua Granick <[hidden email]> wrote:
 it will be fixed in the next release.

Are there any plans to get the nightly nme builds back up?

http://haxe.cmt.tc/libs/nme/windows/


Jan

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Can't run NMETemplate in Android Emulator and Witstech A81E

singmajesty
That's a good question!

Nightly builds would be nice. Last I heard, Cauê Waneck was working on  
setting some up.

On the other hand, it sounds like he's also porting Haxe to Java, C# and  
working on HxGL

Busy guy! We're all thankful to have him ;)




On Fri, 02 Sep 2011 17:49:01 -0700, Jan Flanders <[hidden email]> wrote:

> On Sat, Sep 3, 2011 at 1:49 AM, Joshua Granick
> <[hidden email]>wrote:
>
>>  it will be fixed in the next release.
>>
>> Are there any plans to get the nightly nme builds back up?
>
> http://haxe.cmt.tc/libs/nme/windows/
>
>
> Jan


--
Using Opera's revolutionary email client: http://www.opera.com/mail/

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Can't run NMETemplate in Android Emulator and Witstech A81E

Gamehaxe
In reply to this post by dimanux
Thanks for the fix.
Hugh

> I found a problem in NME_SOURCE/project/android/AndroidFrame.cpp:
>
> void AndoidRequestRender()
> {
>         jclass cls = gEnv->FindClass("org/haxe/nme/MainView");
>    jmethodID mid = gEnv->GetStaticMethodID(cls, "renderNow", "()V");
>    if (mid == 0)
>        return;
>     gEnv->CallStaticObjectMethod(cls, mid );
> }
>
> There is wrong method type calling with function  
> CallStaticObjectMethod...
> It must be CallStaticVoidMethod. After replacing it with:
>
> void AndoidRequestRender()
> {
>         jclass cls = gEnv->FindClass("org/haxe/nme/MainView");
>    jmethodID mid = gEnv->GetStaticMethodID(cls, "renderNow", "()V");
>    if (mid == 0)
>        return;
>    gEnv->CallStaticVoidMethod(cls, mid);
> }
>
> application run excellent on my A81E! :)
>
> --
> View this message in context:  
> http://haxe.1354130.n2.nabble.com/Can-t-run-NMETemplate-in-Android-Emulator-and-Witstech-A81E-tp6735446p6755290.html
> Sent from the Haxe mailing list archive at Nabble.com.

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: Can't run NMETemplate in Android Emulator and Witstech A81E

Cauê W.
In reply to this post by singmajesty
2011/9/2 Joshua Granick <[hidden email]>
That's a good question!

Nightly builds would be nice. Last I heard, Cauê Waneck was working on setting some up.

Hey! Yeah, I had set up the windows builds, I don't know what happened. I'll check them right now. I already have all the infrastructure ready to do all the builds (but linux32, even though I can build them in a linux64 if I can get it right), I just need to find some time to  actually build the first time. The svn check/build/upload is already ready.

On the other hand, it sounds like he's also porting Haxe to Java, C# and working on HxGL

Busy guy! We're all thankful to have him ;)

hahah you're very kind : )
I'm very proud to be a part of this community, and it seems everybody's busy to make it better ;)

--
haXe - an open source web programming language
http://haxe.org