Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Gideros Player on iOs Trouble — Gideros Forum

Gideros Player on iOs Trouble

VenorcisVenorcis Member
edited February 2014 in Bugs and issues
Hey,

After a lot of work on certificates and such, I got the Gideros Player app (with custom plug-ins, media and notifications) 'working' on my iPhone 5. This means: the app starts, Gideros Studio recognizes it, and all files are uploaded to it. However, when it starts running, the following error is produced:
"lib/display.lua:1: unexpected symbol near '�'" (the last character is displayed as a questionmark')
What is happening here?!

Thanks,
-Vincent

Comments

  • Oh, and xcode reports the error like this:
    'unexpected symbol near '\275'"
  • The same seems to happen on the OS X local player as well. Is this an encoding issue or something? The files come from a shared folder on Windows...
  • hmm quite possible, you need to make sure that you save your files as ASCII and not UTF, or if UTF, then without BOM (Byte Order Mark)

    I usually use such feature in Nodepad++ to select encoding in which to save file
  • @ar2rsawseen They are already ANSI/ASCII, and UTF-8 without BOM also does not work. I forgot to mention that everything works fine in the Windows and/or Android player. Even inspecting the file through a HEX editor does not show anything weird at the start of the files...
  • VenorcisVenorcis Member
    edited February 2014
    @ar2rsawseen There seems to be a problem in the way either Gideros Studio passes the files to the iOs/Mac player or how the iOs/Mac player reads them? The files seem perfectly fine...
  • Ok, I was just referring to this post:
    http://www.instructables.com/answers/What-causes-these-strange-characters-to-appear/

    Could you please attach one file causing the trouble as example? :)
  • Sure, here it is (had to change the extension because .lua is not allowed?)
    But I'm pretty sure the issue is not in the file...
    txt
    txt
    display.txt
    28K
  • @ar2rsawseen A short recap for you:
    - Project works fine on Windows Gideros Player and compiled Android Gideros Player
    - Files themselves do not seem to contain any extra characters or something, and the encoding is correct
    - Unexpected symbol errors occur in both the iOS Gideros Player (launched on an OS X Gideros Studio or Windows Gideros studio; that doesn't matter) and the Mac OS Gideros Player.
    Thus, I think the Gideros Player for iOS/OS X contains some error in storing/reading the files?
    It would be helpful if this could be fixed soon, as this halts all progress on our app right now (i.e. releasing an iOS version)
  • atilimatilim Maintainer
    edited February 2014
    Also can you delete the files at $TMPDIR/gideros? And can you delete Gideros Player app and install it again? So that cached player files will be cleared. This may solve the problem.
  • ar2rsawseenar2rsawseen Maintainer
    edited February 2014
    I've tried adding BOM to test file and behavior is the same.
    "lib/display.lua:1: unexpected symbol near 'ï"

    But file you provided indeed does not contain it.
    And also if it is BOM, then it should also not work on Windows.
    On Gideros side there is nothing added to the files. There has never been a similar problem.

    So does the error happens only with this one file? What changes do you make/editors you use on the files on Mac?

    Also you can test files, by typing in the console
    $ file display.lua
    And it should output if file is ascii or UTF and if it has BOM, like this:
    UTF-8 Unicode (with BOM) text, with no line terminators
    or
    ASCII English text, with CRLF line terminators
  • @atilim I've already tried deleting the player app and reïnstalling it; that had no effect
    @ar2rsawseen No, every file has this issue; display.lua just seems the first to be run. I don't think this issue is host-specific though, because as mentioned in my last post, this problem even occurs when I try to run the project from a Windows Gideros studio. Again both Mac and iOs player show this issue on exactly the same files run from exactly the same Gideros Studio, whilst the Windows and Android players do not. Really strange :(
  • VenorcisVenorcis Member
    edited February 2014
    @atilim @ar2rsawseen I've tried again deleting the app and trying to launch from Windows Gideros Studio, and then again deleting the app and trying to launch from Mac Gideros Studio, but no effect. Might it at least be possible to add some check or something to at least circumvent this problem? I'm sorry it's really weird but again it's halting our progress as well.
    Edit: and again, this happens on Mac Gideros Player (with Mac Studio of course) as well, so...
  • VenorcisVenorcis Member
    edited February 2014
    @atilim @ar2rsawseen And one more addition: when I do convert a file to UTF-8 (with BOM), I get this error: "unexpected symbol near 'char(127)'", instead of this one: "unexpected symbol near '�'" (with ASCII/UTF8-nobom)
  • amaximovamaximov Member
    edited February 2014
    Sorry to bump in here but that is the display lua lib I made! Nice to see you using it :)

    On another note, I have recently submitted Android and iOS versions of my app that use that Lua file and everything works fine with Gideros 2014.01 on my Mac Mini OS X Mavericks.

    This is a wild guess, but check if you had exported your projects with non encrypted assets and then exported encrypted assets. Maybe export assets only does not change the project's "asset encryption" property and is causing problems when requiring lua files. I remember having issues with an "encrypted assets" custom Gideros player.
  • @amaximov Yeah it is certainly not in your nice library; any file (even from example projects) causes this issue. Thanks for the suggestion; I've always had encryption on at all times, but I'm gonna play around with that a little now to see what I can find
  • @amaximov Holy ****. Exporting a Gideros project (without assets for the player) WITHOUT encryption turned on exports a different version of libgideros.a. Using this version fixed my problem, even though I have encryption turned on at all times.
    @atilim @ar2rsawseen I guess the encryption setting is not respected when sending files to the player app? Whilst I can understand this, this info really needs to be included in the tutorial of how to build a custom Gideros Player....
  • @Venorcis aha, I see what you mean, you can either create player for encrypted or plain files. Will add it to the docs ;)
  • Xcode pops this error 'unexpected symbol near' for a lua file, but the file does not have bom characters (verified). Did it with and without encryption but the problem persists. How do you fix it?
    Loon Games LinkedIn Facebook Twitter - "Something bit me, gaah!"
  • @aditya there could be different ways:
    1) you have exported Player project as with encryption, but using files which are not encrypted (Basically if you want to use app as a player, always export it without encryption, or else it won't work as player)
    2) you have exported player without encryption, but you are using lua files with encryption
    3) lua file is just messed up (either by opening it up in editor which ads BOM, or corrupted through download, etc.)
Sign In or Register to comment.