Console app quits with "Illegal instruction"

Hello All,

I’m deploying a console app using Xojo 2016r3 on an x86 SBC with Buildroot ( Linux VEX-SOM 3.18.29 #1 SMP Mon Oct 17 15:45:14 CST 2016 i686 GNU/Linux)

But when I try to execute the built app, I get:

./testapp.bin

Illegal instruction

and that’s all. Any way to know what is happening?

thanks!

Have you tried remote debugging?

Hi Kem,

the Remote Debugger included with 2016r3 looks like isn’t compiled with 2016r3, so it complains of not being able to find the ICU library.

The test application built with Xojo2015r41 also complained of ICU so that’s why I upgraded to 2016r3 which should include ICU; but now it’s “Illegal Instruction”-ing me.

Can someone at Xojo perhaps compile the Remote Debugger with 2016r3 ?

Cheers!

Also: The test application includes no code except this!

System.DebugLog “HELLO”

It sounds like you need to install the 32-bit libraries in your Linux machine, or compile in 64-bit.

It’s a 32 bit processor (Vortex86EX); The weird thing is that now it doesn’t complain of not being able to find ICU, but “Illegal Instruction” is scary.

Would those last lines of running this app with strace help in any way find the “Illegal Instruction”? Incompatible x86 processor?!

For those who know this magic. thanks!

3483 read(3, “\34\257\4\10\0\0\0\0\0\0\0\0\306\205\4\10\326\205\4\10\346\205\4\10\366\205\4\10\6\206\4\10”…, 4096) = 4096
3483 mmap2(NULL, 319488, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb4e87000
3483 mprotect(0xb4e88000, 314948, PROT_READ|PROT_WRITE|PROT_EXEC) = 0
3483 read(3, “z<\276\25\0\0\0\211r,Ph\0\0\0\0h(\0\0\0R\350\272\7\0\0\213e\224\211E”…, 311296) = 311296
3483 read(3, “P\377u\330\350X\307\4\0\213e\2543\300\211E\330PPP\377u\310\350k\307\4\0\213e\2543”…, 4096) = 4096
3483 read(3, “\0Suspend\0DebugIdentifier\0Priorit”…, 4096) = 4096
3483 read(3, " value is out of range, valid va"…, 4096) = 4096
3483 read(3, “onstructor\0\1\1H1\0\0\20memoryGetCStri”…, 36864) = 36864
3483 read(3, “riant\0\1\1\240\221\3\0\16VariantToInt32\0\1\1F\224”…, 4096) = 4096
3483 brk(0x808f000) = 0x808f000
3483 read(3, “\1\0v=\0\0*j\1\0\270=\0\0\262j\1\0\372=\0\0Ak\1\0004>\0\0\35l”…, 49152) = 49152
3483 read(3, “on.Invoke%o%b\0Intr”…, 4096) = 3882
3483 close(3) = 0
3483 munmap(0xb77d5000, 4096) = 0
3483 open("/proc/self/cmdline", O_RDONLY) = 3
3483 fstat64(3, {st_mode=S_IFREG|0444, st_size=0, …}) = 0
3483 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb77d5000
3483 read(3, “./TEST_APP\0”, 1024) = 11
3483 — SIGILL {si_signo=SIGILL, si_code=ILL_ILLOPN, si_addr=0xb56265d5} —
3483 +++ killed by SIGILL +++

Current versions of Xojo require SSE2 support for x86 CPUs- it could be that the CPU in this particular board does not support the required instruction set.

See case <https://xojo.com/issue/37626> which specifically mentions the Vortex86EX as NOT having the required SSE support

How do you execute the app?

ouch. I also tried this on a board with Vortex DX2 CPU, same thing. can SSE be emulated or is there an older Xojo version I could use?

Dirk: I execute app like any other… the output above was with strace. otherwise just illegal operation and kaputt.

app works fine on a board with same OS but an AMD APU processor.

you could try 2014r1.1 but anything newer likely will have the same issue

I compile all my apps for my Linux host and have found all the latest Xojo versions after Xojo 2016 Release 1.1 give this error, so I edit in the latest, but build in that version. Code from the latest Xojo compilers work fine on my desktop versions of Linux e.g. Ubuntu, just not the server Ubuntu 14-15.

David: odd, though my issue is probably unrelated to this. not sure if Xojo could have a compiler option to exclude requirement for SSE instructions for console apps, but thats wishful thinking.

too bad, I switched to Gambas and it runs apps just fine on the Vortex processor. ported half of a 2000 line Xojo app to Ganbas in my first day of using it. Basic!