Illegal instruction starting web app

  1. last year

    Tim S

    3 Aug 2018 Pre-Release Testers, Xojo Pro Phoenix Arizona USA

    Hello all,

    I compiled stand-alone we app on ubuntu linux using 2017R3. This same computer and Xojo combination has been what I have been compiling this project on since it wont compile ever, on my regular windows project - and this is the work around Xojo gave me 2 years ago. Anyway the latest version compiles fine without error. However after I transfer it to the pi and try to run, I get an Illegal Instruction error. Nothing in the System Logs (syslog) either.

    Anyone have any ideas what the problem is? Previously compiled version runs fine.

    Thanks,
    Tim

  2. Christian S

    3 Aug 2018 Pre-Release Testers, Xojo Pro, XDC Speakers Germany

    FTP upload in ASCII mode corrupts file.
    Does it have the right file size?

  3. Tim S

    3 Aug 2018 Pre-Release Testers, Xojo Pro Phoenix Arizona USA

    Hi Christian,

    Thank you again for lugging the chocolates across the sea!

    Its not the upload method, I use webmin.... also slightly older versions of the same project, with the same Linux machine as the compiler, work. Something is obviously different but how to know WTF is wrong? Something is passing compile stage that shouldn't but I dunno what it is. Any ideas how to find it? BTW, the same code for windows works fine. There are very few differences between the OS' and nothing on them has changed (that I recall of course). But again, very very few. I think I added some forms and database code.

    Any ideas/direction would be appreciated!
    Thanks,
    Tim

  4. Look at the system logs. You may find a more detailed reason there.

  5. Ulrich B

    4 Aug 2018 Pre-Release Testers, Xojo Pro Europe (Germany, Berlin) · xo...

    Did you change the processor type in the build settings to ARM 32Bit?

  6. Tim S

    4 Aug 2018 Pre-Release Testers, Xojo Pro Phoenix Arizona USA

    Nothing in the logs -
    If I double click on the app, the OS asks if I want to execute or execute in terminal - I choose execute - which normally works. In this case nothing, and nothing in any of the logs.

    If I try to start with init.d, which works with all of the previous versions, that is where I see the illegal instruction. But again, nothing in any log at all.

    Double checked it was/is compiled for ARM

    Any other ideas? Or places to check for clues?
    Thanks,
    Tim

  7. Christian S

    4 Aug 2018 Pre-Release Testers, Xojo Pro, XDC Speakers Germany

    You can start it with lldb or gdb, run the app, get break at crash and print current stack trace.

  8. Tim S

    6 Aug 2018 Pre-Release Testers, Xojo Pro Phoenix Arizona USA

    One thing I noticed tonite, the linux IDE appears to hang on "linking" eventhough the new folder with the supporting folder/files and the executable is created.

    Does this mean anything? - bet it does...
    Tim

  9. Peter L

    6 Aug 2018 Pre-Release Testers, Xojo Pro Australia

    It is a Pi 2 or 3 isn’t it? I got that error when I used an older Pi. That’s when I discovered older Pis aren’t supported.

  10. George A

    6 Aug 2018 Pre-Release Testers, Xojo Pro

    Illegal instruction is usually when there is a compiler optimization that is not supported by the CPU . I've run into this when compiling libraries and apps in gcc before. So maybe Xojo (or some library or helper app you may be using) is using a certain CPU optimization that has instructions not supported by your processor.

  11. Tim S

    6 Aug 2018 Pre-Release Testers, Xojo Pro Phoenix Arizona USA

    Hi guys,
    Thanks for your responses!

    Its a pi 3.
    Optimizations are set to default (same as previously compiled versions)

    Tim

  12. George A

    6 Aug 2018 Pre-Release Testers, Xojo Pro
    Edited last year

    Maybe some internal LLVM optimization setting Xojo is using when building the app? Maybe one of the Xojo engineers can chime in.

  13. Tim S

    6 Aug 2018 Pre-Release Testers, Xojo Pro Phoenix Arizona USA

    Except that the same IDE, on the same Linux computer, with the same plugins just different code, won't run. The biggest PIA is that there are absolutely NO hints. No log files no nothing to see to even gleen a glimpse of what the problem is!

    Huge pain. A show stopper!

  14. 11 months ago

    Tim S

    7 Sep 2018 Pre-Release Testers, Xojo Pro Phoenix Arizona USA

    A month ago this happened and the only way to get around it was to literally rebuild the app in the Xojo IDE. Now it has happened again and have to do it all over. What a huge PIA! Cost me 3 days last time!

    Is there a preferred method for saving the project?

    The project format is Binary. All I did last time was to try to remember weeks of work then copy/paste from the newer project to the last known good. Doesn't really make a lot of sense to me especially since the project compiles fine on Windows to Windows. But since I cannot compile on Windows to ARM, I have to copy/move the project to a linux machine. Once there it compiles but won't run giving me an illegal instruction....

    Makes no sense to me why this is happening. Thoughts/suggestions etc would be appreciated!
    Tim

  15. Ralph A

    7 Sep 2018 Santa Monica, California
    Edited 11 months ago

    @Tim S
    Is there a preferred method for saving the project?

    The project format is Binary.

    Have you considered saving it in Xojo Project format (text)? This way you can use Version Control software like Git or Mercurial or SVN. If you do that, it's quite easy to roll back to a "good" state, and then build from there. I use the SourceTree UI with Mercurial.

  16. Tim S

    8 Sep 2018 Pre-Release Testers, Xojo Pro Phoenix Arizona USA

    Hi Ralph.

    Here's the thing, in Windows there is nothing wrong with the code. Even in Linux it compiles fine and runs fine in debug build mode. Only in these two recent cases does it get an illegal instruction when starting on the pi.

    - the *fix* is to start at the last good, then copy/paste from the latest to the last known good. No code is really changed, just pieced together. However, using text may be a better thing just so that VC can be used. I never had this happen prior to last month. Always worked fine copying the source from my windows machine to the linux machine then building for the Rasp Pi. It is a PIA to have to do that, but is better than not being able to compile to pi at all! This BTW was the *work around* provided by Xojo several *years* ago....

    Tim

or Sign Up to reply!