Images + Display Text suddenly being black boxes!

I'm super close to get my latest app out on Google Play, but i seem to have found a bug. My app can basically create and delete rows from some kind of "tableview". But sometimes when i've just created a row, some of the images and the text randomly transforms into ugly black boxes. This appears only on my Android Device. (This is the actual .apk file, and not the GameSalad Viewer)

Here's some screenshots:
http://i.imgur.com/ioka5GM.png
http://i.imgur.com/hiLg4jZ.png

I hope somebody knows this bug, and how to fix it. Would really save my day :)

- Jaytee

Comments

  • MantoManto Member Posts: 796
    Do you have a black box image in your project?
  • JayteeJaytee Member Posts: 79
    edited October 2013
    Nope.. :-?
  • JayteeJaytee Member Posts: 79
    Anyone...? :-S
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited October 2013
    Black or white boxes on adhoc versions are often caused by a timing problem in the rules. Basically, a change attribute self.Image behavior is initiated at the same time that a table value is being changed. This results in the change attribute expression being invalid. The result? A black or white box.

    Sometimes this can be fixed by adding an after 0.1 timer to the behavior.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • JayteeJaytee Member Posts: 79
    @tatiang thanks for the reply! but what do i do with the text? do i also have to put in an after 0.1 timer on there?
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Without seeing your rules, it's hard for me to know. But for example if you had these rules:

    When [condition]
         Change attribute self.Image

    When [some other condition]
         Change table value

    You would then add a timer so that it looks like this:
    When [condition]
         Timer after 0.1 seconds [run to completion checked]
              Change attribute self.Image

    When [some other condition]
    Change table value

    I don't know if that will solve it but it's worth a try.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • DigiChainDigiChain Member, PRO Posts: 1,288
    Did you get to the bottom of this?

    I've just published an update of a game with a 'Display Text' added. It's not reading from a table - the text is typed directly into the 'display text' rule. No timers, nothing - just display a line of text in a scene.

    Works fine on the viewer, but I have a black box displayed in the published version (iphone version).
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    @DigiChain, again without seeing the project file it's difficult to know.

    Try creating a new blank scene, moving it to the first scene in the project, and then add a displayText with the same expression as the one that is causing the black box. Run an adhoc of it and see if the problem happens there.

    If you'd like me to take a look at it, you can .zip up the file and PM me with the download link.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • JayteeJaytee Member Posts: 79
    Right now i'm communicating with a bugfixer-guy from GameSalad... Maybe he can help :)
  • vikingviking Member, PRO Posts: 322

    @Jaytee Did you find out what caused this or found a way to fix it? I have the same problem. I have an actor that display text from a table. When I look at the text in the creator it always shows up perfect. However, on the device the text some times appear the way it should and other times it just shows a black box where the text was supposed to be. It is odd because it is always the same table cell that goes black. I tried to delete all the text in the cell and then copy and paste it back in, but the problem persists.

    I will try to delete all the text in the table, then save the file. Load the file again and then enter the text manually instead of copy and paste the text into the cell.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    @viking This can be caused by bad table indexes. So if you are trying to display a table cell value and that row doesn't exist, for example.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • vikingviking Member, PRO Posts: 322

    @tatiang Thanks for the suggestion. However, I don't think this is the problem since this actor displays the text correctly in some cases and in others it displays a black box. I noticed that the two cells that cause the black boxes have text that is a bit longer than the other cells that do not display the error, so I am checking now if extra long text string can cause this problem.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited April 2015

    Also make sure there are no invalid characters (e.g. accents, symbols, etc.) in the cells.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • vikingviking Member, PRO Posts: 322

    Wow! Turns out it was the extra length of the text in the two particular cells in the table that messed up GameSalad. I shortened the text and now the black box is gone. Good to know :)

Sign In or Register to comment.