Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
Can't find crash reason — Gideros Forum

Can't find crash reason

unlyingunlying Guru
edited September 2016 in Bugs and issues
Hi!

My app crashes and i can't understand why. Crashlog doesn't appear in crashlytics.
I took log from logcat. If anybody can help me what happens and how to fix that - it will be great :)
My app is com.debia.bukvar
Here whole log:
http://pastebin.com/TJPvZ6Je

Thanks

Comments

  • Checked on both 2016.8.2 and 2016.8.1 versions. Same result.
    I really need help :( It can affect everybody.
  • No, looks like it is my fault, because it happens on 2015.9 too. But can't understand a reason. I'm just using app for a while and it crashes. Can't reproduce that from desktop player.
  • And it doesn't crash with desktop export. But it crashes on Android devices
  • I'm testing some demos with 2016.8.2. It may be the same reason with jdbc's race demo. Before the run , just remove testffi.lua
    https://github.com/jdbc2012/race

    The player crashes, can anyone check this with 2016.8.2 ?
  • hgy29hgy29 Maintainer
    @unlying,

    I had a look at the crash log but unfortunately it doesn't say much. It just says that C++ libs detected some error and aborted the program, without telling which error occured.
    This is probably due to some memory error, out of memory or structure corruption, but hard to tell what or why...
    I'll google a bit more to see if there is any way to get the original error message somehow..
  • @hgy29 thanks.
    Googled a bit.
    Found this one http://stackoverflow.com/questions/23541535/fatal-signal-6-sigabrt-code-6-on-first-launch
    It says that possible problem is with utf. I'm using utf in this project. So may it relate?
  • Same happens if i run project in Gideros Player. Gideros player crashes :( Without any log to output
  • @unlying did you try exporting in win32 and then run the "console enabled" version?
    Maybe it outputs something useful there
  • @pie but there is no unexpected behaviour on desktop. It happens on Android.
  • whops, I'm sorry I thought that you were referring to gideros player desktop with your last post :)
    I suspect that gideros android player would crash at the same point where your app crashes; however you can get logcat if you run a "no asset" custom player from eclipse and then launch your app on it.
  • It can happen in different part of application, but always during change scene.
  • collectgarbage("count") value can be 5000 and can be 100 000
  • jdbcjdbc Member
    edited September 2016
    I'm testing some demos with 2016.8.2. It may be the same reason with jdbc's race demo. Before the run , just remove testffi.lua
    https://github.com/jdbc2012/race

    The player crashes, can anyone check this with 2016.8.2 ?
    My outrun demo does not work properly with 2016.08.2 version but it works ok with some previous version.

    I am not sure what Gideros version I will use, testing now with Gideros 201606.
  • Do we have any possibility to push more information about crash? I really need to fix this asap and i don't know what to do:(
  • Checked on iOS
    2016-09-22 22:14:28.466 bukvar[1544:604823] Received memory warning.
    2016-09-22 22:14:32.659 bukvar[1544:604823] Received memory warning.
    2016-09-22 22:14:34.091 bukvar[1544:604823] Received memory warning.
    Message from debugger: Terminated due to memory issue
    So it is about memory. Ok, to be honest, i have never care about memory. I thought that framework should handle it for me. I know that it is my fault :)
    Do you have any advice how to handle this? I have really big project with 650+ sound files and 550+ images.
  • As far as I know (unless you're filling memory with other things) the only way to reduce memory consumption is to load files as they are needed and remove them asap from memory.
    I don't think that your problem is the image/sfxs file number, but how many of them are loaded together, or how "big" they are.
  • I think Memory warning means there is a memory leak in your app. It is not about how many files you have in your app.
  • Yes, sure :) I didn't mean that problem is in number of files, but in number of files that i should use in 1 launch.
    And that's what i'm asking - What is the easiest way to stop memory leak?
  • For example, to remove all images and sounds from memory during scene transition.
    I know that it sounds like a magic, but i believe in wonders :)
  • @unlying I don't know what you're doing, but do you really need all of these files together? :) Do you use texturepacks?

    About memory leaks, the first thing is to understand where it happens: bhLeaky can help
    http://giderosmobile.com/forum/discussion/comment/20247#Comment_20247

    Then you try to fix it... :D (the hardest thing) it may be caused by anything, but in my experience it is usually something that is created and not removed correctly after its use.

    You can use this function to check in real time how much memory you're using, and if your changes in code are doing something:
    			function monitorMem()
    						gc()
    						local mem = math.floor(collectgarbage("count"))
    						local texM = application:getTextureMemoryUsage()
    						print( "Memory:" .. mem  )
    						print("TextureMemory:", texM )
    			end


  • To answer your other post:
    I use "removed from stage event" listening to the sprite scene
    http://docs.giderosmobile.com/reference/gideros/Sprite/Event.REMOVED_FROM_STAGE#Event.REMOVED_FROM_STAGE
  • Changed everything global to self.

    Doesn't help me :(

    @pie Thanks, i tried bhLeaky, but it always saying:
    *** OBJECT SNAPSHOT message here ***
    SceneManager has 1 instances
    *** OBJECT SNAPSHOT END ****

    Can't understand what does it mean and why it is only about scenemanager.
  • Have you tried checking filenames? Sometimes you will find that on the windows player it will accept any case for a filename but on the device it will require the exact case to be the same as the actual filename.
  • Generally it will be an issue with SceneMaager because the crash most likely happened whilst SceneManager was changing scenes.
  • piepie Member
    edited October 2016
    @unlying this is curious: using bhleaky I see every class I have placed on stage, and their instances count. It seems here that you are using only SceneManager, and since it has a single instance it should not be the problem.

    If you are reloading the same scene with different parameters maybe scenemanager is not able remove completely the previously created scene: to avoid that add a "transition scene": something to give scenemanager the time to remove your previous scene completely before starting to load the next one.

  • If you add event to an object in a scene, Scenemanager wont be able to remove that item from the scene therefore, scene wont be get collected by garbage. So remove all events from the items on scene at onExit event of scene.
  • Other possibilities
    You can check possible zero division calculations,
    Timer.new(duration,func) , I've made a mistake before. During a timer is active "duration" variable must not be changeable if it is GiderosPlayer crashes

    Another GiderosPlayer terminal output, I think this error may be different issue

    terminate called after throwing an instance of 'std::length_error'
    what(): vector::_M_default_append
Sign In or Register to comment.