XojoScript crash on Ubuntu Server

I’m tearing my hair out about this one, and would appreciate any suggestions. I’ve build a very simple web app – one page, one button on that page. When I click that button, it builds a string consisting of 5 lines of XojoScript (4 of which are DIM statements), then tries to run the script.

The app (and its much more complex older sibling) runs fine on port 8080 as a standalone web app on Mac OS X 10.8.5. But on a 32-bit Amazon Ubuntu Linux instance (Ubuntu Server 12.04.3 LTS, AWS instance ID i-4fc2ea37), it dumps core when it hits the XojoScript run method.

At first I thought this was a 64- vs 32-bit problem (even though I’d installed the 32-bit libraries), so I spun up a 32-bit instance and tried it there. No such luck.

Am I missing something obvious here? Should I be building this on Linux because I’m trying to run on Linux, instead of building on Mac? I’ve stripped this project down to bare essentials, so I can post it if necessary.

Thanks for any help.

Couple of ideas:

Have you looked at the server’s logs for any hints as to why it’s crashing?

Do you have code in the Session.UnhandledException and App.UnhandledException events to deal with exceptions?

There’s nothing in the syslog about it, other than some debug statements I write so I know exactly where it’s crashing. I’ll try adding code to those events, though, didn’t think to try that. Thanks.

@Greg: syslog still didn’t show anything, even after adding those UnhandledException events. I’ve also wrapped the “run” method in try/catch, but that also doesn’t fire.

In var/log, there’s a file called “apport.log” which contains this single line pertaining to my app:

called for pid 1685, signal 4

Signal 4 is “illegal instruction”

Any suggestions re next steps?

Thanks!

Run ldd on your app from the command line:

ldd MyApplication

That will tell you if there are any missing dependencies.

Oh, and this XojoScript… what’s the 5th line?

Here’s the output from ldd:

linux-gate.so.1 =>  (0xb77a3000)
libdl.so.2 => /lib/i386-linux-gnu/tls/i686/nosegneg/libdl.so.2 (0xb7795000)
libpthread.so.0 => /lib/i386-linux-gnu/tls/i686/nosegneg/libpthread.so.0 (0xb777a000)
libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xb7695000)
libm.so.6 => /lib/i386-linux-gnu/tls/i686/nosegneg/libm.so.6 (0xb7668000)
libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xb764a000)
libc.so.6 => /lib/i386-linux-gnu/tls/i686/nosegneg/libc.so.6 (0xb74a1000)
/lib/ld-linux.so.2 (0xb77a4000)

And (if it helps) here’s the output of ldd -v

linux-gate.so.1 =>  (0xb7763000)
libdl.so.2 => /lib/i386-linux-gnu/tls/i686/nosegneg/libdl.so.2 (0xb7755000)
libpthread.so.0 => /lib/i386-linux-gnu/tls/i686/nosegneg/libpthread.so.0 (0xb773a000)
libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xb7655000)
libm.so.6 => /lib/i386-linux-gnu/tls/i686/nosegneg/libm.so.6 (0xb7628000)
libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xb760a000)
libc.so.6 => /lib/i386-linux-gnu/tls/i686/nosegneg/libc.so.6 (0xb7461000)
/lib/ld-linux.so.2 (0xb7764000)

Version information:
./xojoscript_crash:
	libstdc++.so.6 (CXXABI_1.3) => /usr/lib/i386-linux-gnu/libstdc++.so.6
	libdl.so.2 (GLIBC_2.1) => /lib/i386-linux-gnu/tls/i686/nosegneg/libdl.so.2
	libdl.so.2 (GLIBC_2.0) => /lib/i386-linux-gnu/tls/i686/nosegneg/libdl.so.2
	libc.so.6 (GLIBC_2.4) => /lib/i386-linux-gnu/tls/i686/nosegneg/libc.so.6
	libc.so.6 (GLIBC_2.1) => /lib/i386-linux-gnu/tls/i686/nosegneg/libc.so.6
	libc.so.6 (GLIBC_2.0) => /lib/i386-linux-gnu/tls/i686/nosegneg/libc.so.6
/lib/i386-linux-gnu/tls/i686/nosegneg/libdl.so.2:
	ld-linux.so.2 (GLIBC_PRIVATE) => /lib/ld-linux.so.2
	libc.so.6 (GLIBC_PRIVATE) => /lib/i386-linux-gnu/tls/i686/nosegneg/libc.so.6
	libc.so.6 (GLIBC_2.1.3) => /lib/i386-linux-gnu/tls/i686/nosegneg/libc.so.6
	libc.so.6 (GLIBC_2.1) => /lib/i386-linux-gnu/tls/i686/nosegneg/libc.so.6
	libc.so.6 (GLIBC_2.0) => /lib/i386-linux-gnu/tls/i686/nosegneg/libc.so.6
/lib/i386-linux-gnu/tls/i686/nosegneg/libpthread.so.0:
	ld-linux.so.2 (GLIBC_2.1) => /lib/ld-linux.so.2
	ld-linux.so.2 (GLIBC_PRIVATE) => /lib/ld-linux.so.2
	ld-linux.so.2 (GLIBC_2.3) => /lib/ld-linux.so.2
	libc.so.6 (GLIBC_2.3.2) => /lib/i386-linux-gnu/tls/i686/nosegneg/libc.so.6
	libc.so.6 (GLIBC_2.1.3) => /lib/i386-linux-gnu/tls/i686/nosegneg/libc.so.6
	libc.so.6 (GLIBC_2.1) => /lib/i386-linux-gnu/tls/i686/nosegneg/libc.so.6
	libc.so.6 (GLIBC_PRIVATE) => /lib/i386-linux-gnu/tls/i686/nosegneg/libc.so.6
	libc.so.6 (GLIBC_2.0) => /lib/i386-linux-gnu/tls/i686/nosegneg/libc.so.6
	libc.so.6 (GLIBC_2.2) => /lib/i386-linux-gnu/tls/i686/nosegneg/libc.so.6
/usr/lib/i386-linux-gnu/libstdc++.so.6:
	libm.so.6 (GLIBC_2.0) => /lib/i386-linux-gnu/tls/i686/nosegneg/libm.so.6
	ld-linux.so.2 (GLIBC_2.3) => /lib/ld-linux.so.2
	libgcc_s.so.1 (GCC_4.2.0) => /lib/i386-linux-gnu/libgcc_s.so.1
	libgcc_s.so.1 (GLIBC_2.0) => /lib/i386-linux-gnu/libgcc_s.so.1
	libgcc_s.so.1 (GCC_3.3) => /lib/i386-linux-gnu/libgcc_s.so.1
	libgcc_s.so.1 (GCC_3.0) => /lib/i386-linux-gnu/libgcc_s.so.1
	libc.so.6 (GLIBC_2.4) => /lib/i386-linux-gnu/tls/i686/nosegneg/libc.so.6
	libc.so.6 (GLIBC_2.3.4) => /lib/i386-linux-gnu/tls/i686/nosegneg/libc.so.6
	libc.so.6 (GLIBC_2.1) => /lib/i386-linux-gnu/tls/i686/nosegneg/libc.so.6
	libc.so.6 (GLIBC_2.3) => /lib/i386-linux-gnu/tls/i686/nosegneg/libc.so.6
	libc.so.6 (GLIBC_2.1.3) => /lib/i386-linux-gnu/tls/i686/nosegneg/libc.so.6
	libc.so.6 (GLIBC_2.3.2) => /lib/i386-linux-gnu/tls/i686/nosegneg/libc.so.6
	libc.so.6 (GLIBC_2.0) => /lib/i386-linux-gnu/tls/i686/nosegneg/libc.so.6
	libc.so.6 (GLIBC_2.2) => /lib/i386-linux-gnu/tls/i686/nosegneg/libc.so.6
/lib/i386-linux-gnu/tls/i686/nosegneg/libm.so.6:
	ld-linux.so.2 (GLIBC_PRIVATE) => /lib/ld-linux.so.2
	libc.so.6 (GLIBC_2.1.3) => /lib/i386-linux-gnu/tls/i686/nosegneg/libc.so.6
	libc.so.6 (GLIBC_2.0) => /lib/i386-linux-gnu/tls/i686/nosegneg/libc.so.6
	libc.so.6 (GLIBC_PRIVATE) => /lib/i386-linux-gnu/tls/i686/nosegneg/libc.so.6
/lib/i386-linux-gnu/libgcc_s.so.1:
	libc.so.6 (GLIBC_2.2.4) => /lib/i386-linux-gnu/tls/i686/nosegneg/libc.so.6
	libc.so.6 (GLIBC_2.1.3) => /lib/i386-linux-gnu/tls/i686/nosegneg/libc.so.6
	libc.so.6 (GLIBC_2.0) => /lib/i386-linux-gnu/tls/i686/nosegneg/libc.so.6
/lib/i386-linux-gnu/tls/i686/nosegneg/libc.so.6:
	ld-linux.so.2 (GLIBC_2.3) => /lib/ld-linux.so.2
	ld-linux.so.2 (GLIBC_PRIVATE) => /lib/ld-linux.so.2
	ld-linux.so.2 (GLIBC_2.1) => /lib/ld-linux.so.2

I’ve just sent a note to William to get his opinion, since he’s our Linux guru. I don’t see anything out of the ordinary.

You are uploading the Libs directory right?

Yes, everything in the local Build directory is being ftp’d using Transmit.

Using binary mode right ?

@Norman: Transmit is pretty smart about modes. Also, I’m using SFTP, which according to the Transmit docs is always binary:

“FTP is the only protocol that distinguishes between ASCII and binary files. Other protocols, such as SFTP, always create a byte-for-byte (binary mode) copy of the file.”

Can you paste the script’s code? and does running just a script that calls print also crash?

[quote=46256:@Charles Weger]@Norman: Transmit is pretty smart about modes. Also, I’m using SFTP, which according to the Transmit docs is always binary:

“FTP is the only protocol that distinguishes between ASCII and binary files. Other protocols, such as SFTP, always create a byte-for-byte (binary mode) copy of the file.”[/quote]
Fair enough - its just one of those things that has tripped people up before

@Norman: yes, I’ve made all those kind of mistakes before, for sure.
@Joe: good call. If I take out my 5 lines of script, and put in just a print statement, there’s no crash. The script is being built dynamically, so it’s kind of hard to show, but in essence the lines it winds up creating are these:

Dim foo As Double = 3.14159
Dim x As Integer = 10
Dim y As Integer = 21
Dim z As String = “this is a string test”
result = str(x + y)

Where ‘result’ is a property on the XojoScript class.

I can zip up the source and send it somewhere if that would be helpful; there’s nothing proprietary in it at this point.

Yeah, that’d be most helpful.

Is there a way to attach a file in this forum, or do you want me to file a bug report, or … ?

Bug report is best.

Interesting. I can’t create a case in Feedback (v2.0.0 163). The Case menu is disabled. I’ve tried logging out and back in, still the same. Maybe it’s tired and I’m late?

Scratch that. Forgot that I needed to do a search before it lets me make a new case.

OK, bug report 30797 filed.

I want to say thanks to all the Xojo guys who have helped me on this. Even though it’s not resolved yet, I’m SUPER impressed with the ability to post a problem at 10 pm, and have not one but FOUR company experts chime in to help. I don’t get this kind of service anywhere else, with any other software or hardware product.

So thank you!
Heading to bed now, will check more tomorrow.