User Tag List

Results 1 to 2 of 2

Thread: APP Crash related to CText

  1. #1
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    May 2017
    Location
    Nantes
    Posts
    204
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)

    Exclamation APP Crash related to CText

    Hi @Fernando,

    I'm getting an increasing number of crash reports related to CTEXT (log bellow).

    I reproduced this bug on the app, but it's random. There is no procedure to reproduce it, just use the app, and at some time we get this crash.
    The crash occurs on screens that have worked perfectly before the crash, and that works perfectly after the crash (next time we launch the app).

    I tryed to analyse the crash and it occures in CTextSurface.java line:305 ( textCanvas.setBitmap(textBitmap) ). It's surprising as there is a check in line 261 that should have avoid this crash... (well i'm not a developper, so maybe there are things that i didn't notice ... )

    To avoid this anoying crash i added a quick fix to shunt that code when the var is null :

    if(textCanvas != null && textBitmap != null)
    textCanvas.setBitmap(textBitmap);
    else {
    Log.Log("||||||||||||||||||||||||||||||||||||||||| |||||||||||||||||||||||||||||||||||||||||||||||||| ||||||||||||||||||||||||Debug: Null evité"+s);
    return;
    };


    The result, is that the app don't crash any more, but i can see in the app the moments that it should have crashed, because there are strings not appearing time to time.

    Can you check this problem please, as my users will become angry because some strings are missing...

    Could this behavior be related to some memory management problem where objects are destroyed ? or concurent executions where the object is used before it's really fully created ?
    In Fusion i don't use automatic destroy option, it's disabled on all objects.
    But i use a very important number of text objects (probably hundreds ...)

    The app is available on the play store : https://play.google.com/store/apps/d....wemiam.wemiam

    java.lang.NullPointerException:
    at OpenGL.CTextSurface.manualDrawText (CTextSurface.java:305)
    at OpenGL.CTextSurface.setText (CTextSurface.java:249)
    at Objects.CText.draw (CText.java:231)
    at Objects.CText.spriteDraw (CText.java:327)
    at Sprites.CSpriteGen.winDrawSprites (CSpriteGen.java:1372)
    at Sprites.CSpriteGen.spriteDraw (CSpriteGen.java:1391)
    at RunLoop.CRun.screen_Update (CRun.java:3077)
    at RunLoop.CRun.f_GameLoop (CRun.java:5549)
    at RunLoop.CRun.doRunLoop (CRun.java:597)
    at Application.CRunApp.loopFrame (CRunApp.java:1084)
    at Application.CRunApp.playApplication (CRunApp.java:808)
    at Application.CRunTimerTask.run (CRunTimerTask.java:53)
    at android.os.Handler.handleCallback (Handler.java:883)
    at android.os.Handler.dispatchMessage (Handler.java:100)
    at android.os.Looper.loop (Looper.java:237)
    at android.app.ActivityThread.main (ActivityThread.java:7948)
    at java.lang.reflect.Method.invoke (Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsC aller.run (RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1075)
    © 2021 Google

    Thanks,
    Haoujey

  2. #2
    Clickteam Clickteam
    Fernando's Avatar
    Join Date
    Dec 2006
    Posts
    6,789
    Mentioned
    298 Post(s)
    Tagged
    4 Thread(s)
    what version are you using, what are the size of your text, and most important please send me a small mfa that reproduce the problem without any property data,
    Regards,


    Fernando Vivolo

    ... new things are coming ...

Similar Threads

  1. extensions compilation crash related to gradle
    By haoujey in forum Android Export Module 2.5
    Replies: 7
    Last Post: 25th May 2020, 03:11 PM
  2. extensions compilation crash related to gradle
    By haoujey in forum Extension Development
    Replies: 0
    Last Post: 24th May 2020, 08:42 AM
  3. Crash related to Admob Interstitial
    By DaveC in forum Android Export Module 2.5
    Replies: 3
    Last Post: 22nd February 2015, 08:46 PM
  4. Xcode Bad Access error in ctext.m
    By StingRay in forum iOS Export Module Version 2.0
    Replies: 0
    Last Post: 27th April 2012, 02:57 PM
  5. Crash related to runtime created backdrops
    By crusher in forum iOS Export Module Version 2.0
    Replies: 3
    Last Post: 12th December 2011, 06:31 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •