Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Backwards Capable? — Gideros Forum

Backwards Capable?

antixantix Member
edited July 2017 in General questions
I have been upgrading one of my games and have discovered that when it is run on a device, it crashes on startup. Of course it runs fine in the windows player and I would much prefer if it crashed there with some meaningful error message so I didn't have to export to device, test, re export, etc etc (and try to decipher ADB debug text). After three hours (and much french) I decided I better make a post here..

Big parts of retaining players in your games is releasing new content and updating / fixing bugs. These become big pain points for developers when code that was previously fine, will no longer run on a device. I think some thought needs to be directed at making sure older projects aren't broken totally with every two Gideros releases.

To test this theory I installed Corona (boo hiss) and compiled and ran an old prototype on both my phone and tablet. Now this project ran fine and this is a project that I created before I switched to Gideros, some 20 months ago. In my opinion, Gideros needs to be this good when it comes to backwards compatibility.

I suppose I could start an excel spreadsheet to keep track of what version of Gideros any particular game would export with and then keep those versions installed in different folders for the times I need to update old games but it seems a bit extreme to have to go down that path.

What do other people think about this issue? Is it in fact an issue? Or am I the only person who can't compile older code?

Also.. Would somebody be able to enlighten me as to what the following is trying to tell me so I can get this project working again? Many thanks in advance :)
art/runtime/check_jni.cc:65] JNI DETECTED ERROR IN APPLICATION: obj == null
art/runtime/check_jni.cc:65]     in call to CallVoidMethodV
art/runtime/check_jni.cc:65]     from void com.giderosmobile.android.player.GiderosApplication.nativeDrawFrame()
art/runtime/check_jni.cc:65] "GLThread 1021" prio=5 tid=13 Runnable
art/runtime/check_jni.cc:65]   | group="main" sCount=0 dsCount=0 obj=0x12c22170 self=0xb8c4e4f8
art/runtime/check_jni.cc:65]   | sysTid=21657 nice=0 cgrp=default sched=0/0 handle=0xb8c4eaf0
art/runtime/check_jni.cc:65]   | state=R schedstat=( 0 0 0 ) utm=32 stm=6 core=1 HZ=100
art/runtime/check_jni.cc:65]   | stack=0xaf76a000-0xaf76c000 stackSize=1036KB
art/runtime/check_jni.cc:65]   | held mutexes= "mutator lock"(shared held)
art/runtime/check_jni.cc:65]   native: #00 pc 00004e64  /system/lib/libbacktrace_libc++.so (UnwindCurrent::Unwind(unsigned int, ucontext*)+23)
art/runtime/check_jni.cc:65]   native: #01 pc 00003665  /system/lib/libbacktrace_libc++.so (Backtrace::Unwind(unsigned int, ucontext*)+8)
art/runtime/check_jni.cc:65]   native: #02 pc 00256401  /system/lib/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, int, char const*, art::mirror::ArtMethod*)+84)
art/runtime/check_jni.cc:65]   native: #03 pc 00238fbf  /system/lib/libart.so (art::Thread::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const+158)
art/runtime/check_jni.cc:65]   native: #04 pc 000b199b  /system/lib/libart.so (art::JniAbort(char const*, char const*)+610)
art/runtime/check_jni.cc:65]   native: #05 pc 000b20d5  /system/lib/libart.so (art::JniAbortF(char const*, char const*, ...)+68)
art/runtime/check_jni.cc:65]   native: #06 pc 001acf9b  /system/lib/libart.so (art::JNI::CallVoidMethodV(_JNIEnv*, _jobject*, _jmethodID*, std::__va_list)+598)
art/runtime/check_jni.cc:65]   native: #07 pc 00009280  /data/app/com.antix.breaky_wall-1/lib/arm/libads.so (_JNIEnv::CallVoidMethod(_jobject*, _jmethodID*, ...)+52)
art/runtime/check_jni.cc:65]   native: #08 pc 00008658  /data/app/com.antix.breaky_wall-1/lib/arm/libads.so (GAds::setKey(char const*, gads_Parameter*)+232)
art/runtime/check_jni.cc:65]   native: #09 pc 000098c4  /data/app/com.antix.breaky_wall-1/lib/arm/libads.so (???)
art/runtime/check_jni.cc:65]   native: #10 pc 000119a4  /data/app/com.antix.breaky_wall-1/lib/arm/liblua.so (???)
art/runtime/check_jni.cc:65]   native: #11 pc 00012f1c  /data/app/com.antix.breaky_wall-1/lib/arm/liblua.so (???)
art/runtime/check_jni.cc:65]   native: #12 pc 0000ac98  /data/app/com.antix.breaky_wall-1/lib/arm/liblua.so (???)
art/runtime/check_jni.cc:65]   native: #13 pc 0000ac08  /data/app/com.antix.breaky_wall-1/lib/arm/liblua.so (lua_call+32)
art/runtime/check_jni.cc:65]   native: #14 pc 001cf231  /data/app/com.antix.breaky_wall-1/lib/arm/libgideros.so (???)
-- cut the rest off.. it's 43K!!!

Comments

  • antixantix Member
    edited July 2017
    After disabling gaming, iab, and ads plugins it works on the device. When re enabling the plugins, it crashes again. So is this all plugin related?

    When did this all change I wonder. I look back through release notes and can't really see anything that hints that I need to change any code related to these plugins. The examples for the plugins are still from the dark ages so there's no clues there either :(

    My last game (Exetor) used the new plugin system where it is exported into the APK and it worked fine. The code in Breaky Wall is the exact same code but now with a newer version of Gideros it does not work.
  • antixantix Member
    edited July 2017
    I have created a test project with the following code..
    require "ads"
     
    admob = Ads.new("admob")
    --[[
    --admob:enableTesting()
    admob:addEventListener(Event.AD_RECEIVED, function()
    GAME.adReady = true
    --print("Admob AD_RECEIVED")
    end)
    admob:addEventListener(Event.AD_FAILED, function(e)
    --print("Admob AD_FAILED", e.error)
    end)
    admob:addEventListener(Event.AD_ACTION_BEGIN, function()
    --print("Admob AD_ACTION_BEGIN")
    end)
    admob:addEventListener(Event.AD_ACTION_END, function()
    --print("Admob AD_ACTION_END")
    end)
    admob:addEventListener(Event.AD_DISMISSED, function()
    --print("Admob AD_DISMISSED")
    end)
    --]]
     
    application:setBackgroundColor(0x008800)
    I export it and include the ads plugin and ADB shows the following error...
    07-03 08:33:13.134 29406-29431/? E/AndroidRuntime: FATAL EXCEPTION: GLThread 1322
    Process: com.yourdomain.yourapp, PID: 29406
    java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.lang.Class.newInstance()' on a null object reference
    at com.giderosmobile.android.plugins.ads.Ads.initialize(Ads.java:210)
    at com.giderosmobile.android.player.GiderosApplication.nativeDrawFrame(Native Method)
    at com.giderosmobile.android.player.GiderosApplication.onDrawFrame(GiderosApplication.java:669)
    at com.giderosmobile.android.GiderosRenderer.onDrawFrame(mtestActivity.java:406)
    at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1522)
    at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1239)
    547-623/? E/WifiStateMachine: WifiStateMachine CMD_START_SCAN source -2 txSuccessRate=0.00 rxSuccessRate=0.13 targetRoamBSSID=any RSSI=-53
    547-623/? E/WifiStateMachine: WifiStateMachine starting scan for "Antix Development 5G"WPA_PSK with 2437,5180
    547-623/? E/WifiStateMachine: WifiStateMachine CMD_START_SCAN source -2 txSuccessRate=0.00 rxSuccessRate=0.00 targetRoamBSSID=any RSSI=-52
    547-623/? E/WifiStateMachine: WifiStateMachine starting scan for "Antix Development 5G"WPA_PSK with 2437,5180
    547-623/? E/WifiStateMachine: WifiStateMachine CMD_START_SCAN source -2 txSuccessRate=0.00 rxSuccessRate=0.02 targetRoamBSSID=any RSSI=-51
    547-623/? E/WifiStateMachine: WifiStateMachine starting scan for "Antix Development 5G"WPA_PSK with 2437,5180
    547-623/? E/WifiStateMachine: WifiStateMachine CMD_START_SCAN source -2 txSuccessRate=0.00 rxSuccessRate=0.00 targetRoamBSSID=any RSSI=-52
    547-623/? E/WifiStateMachine: WifiStateMachine starting scan for "Antix Development 5G"WPA_PSK with 2437,5180
  • SinisterSoftSinisterSoft Maintainer
    iab was changed by google - so try it with that disabled, let me know if it works.

    If it does then make sure that your iab calls work sequentially, make sure one ends before you start the next one.
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • antixantix Member
    edited July 2017
    @SinisterSoft, to test I am only trying ads first, which crashes on the device (full code in my post above) :(

    For ads to work I just select the ads plugin, nothing else when exporting right?
  • hgy29hgy29 Maintainer
    Hi @antix,
    By the look of your error log, it looks like gideros doesn't find the admob framework within ads plugin. Can your confirm you ticked admob support in ads plugin properties ?

    Likes: antix

    +1 -1 (+1 / -0 )Share on Facebook
  • antixantix Member
    @hgy29 well that is embarrassing :D

    Okay I haven't checked anything in there! No wonder it doesn't flipping work!

    What a meat head I am sometimes! I will test later but it will likely function again :)
  • hgy29hgy29 Maintainer
    Yes, in gideros you can have the ads plugin configured without any actual ad provider support, I suppose gideros should warn you somehow...

    Likes: antix

    +1 -1 (+1 / -0 )Share on Facebook
  • antixantix Member
    No problem, I just need to remember to check if the plugin has options that need to be set!
  • SinisterSoftSinisterSoft Maintainer
    The other thing is that a lot of ads providers also need google play services and an id code for play services to work. You should specify the version of play services too.

    Likes: antix

    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
    +1 -1 (+1 / -0 )Share on Facebook
  • antixantix Member
    @SinisterSoft thanks.

    I finally got it working so now I am updating it on the Play Store. That's one down, two to go.

    Likes: SinisterSoft

    +1 -1 (+1 / -0 )Share on Facebook
Sign In or Register to comment.