You are not logged in.

#1 2016-10-13 16:10:42

navi_se
Member
Registered: 2015-07-06
Posts: 139

[Stata 14] Xstata segfaults

I have posted over the folks at STATALIST, but maybe some usere here has already experienced/solved this.

I have installed Stata 14 on my machine  and I get a segfault before I get too see anything of the gui when using any of the

./xstata*

This is what I get from dmesg

[2354112.506634] xstata[16499]: segfault at 7ffc5fb8afe8 ip 00000000016e263c sp 00007ffc5fb8afe0 error 6 in xstata[400000+1ceb000]
[2354127.147166] xstata[16559]: segfault at 7ffd5bcceff8 ip 00007f3a78938090 sp 00007ffd5bccf000 error 6 in libgdk_pixbuf-2.0.so.0.3600.0[7f3a7891d000+25000]
[2354638.700170] xstata[19603]: segfault at 7ffd65dccff8 ip 00007f17b58a8ba5 sp 00007ffd65dccfe0 error 6 in libpng16.so.16.2.0[7f17b589d000+54000]

I tried to install older version of the libraries mentioned in the error from the archive, that is, gdk-pixbuf, gtk and glib as well as libpng ( I have the most recent version of all of them installed) but that didn't work. Unfortunately, googling did yield no help as no one using linux seems to have incurred in this issue. I saw that AW has an issue/patch for older stata, but I don't think that's applicable.

Stata post

Offline

#2 2016-10-13 16:21:50

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,530
Website

Re: [Stata 14] Xstata segfaults

navi_se wrote:

I have installed Stata 14 on my machine...

How?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2016-10-13 16:26:41

navi_se
Member
Registered: 2015-07-06
Posts: 139

Re: [Stata 14] Xstata segfaults

The way STATA recommends: download files, put them in a folder under

/usr/local/

and run their two script and feeding them the license information and then adding the folder to $PATH.

CLI stata works fine, but seeing plots from there is a pain as it requires to save and export them to pdf everytime, so I wanted to use the GUI (but if someone knows how to pipe them to X and show them in a Window the same way R does, then I would also be done).

My setup uses Xmonad, but I checked with XFCE and the same error occurs.

Last edited by navi_se (2016-10-13 16:28:49)

Offline

#4 2016-10-13 16:28:56

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,530
Website

Re: [Stata 14] Xstata segfaults

Sorry I don't know anything about STATA, is this a proprietary product?  I asked how you installed it so others could try to replicate your error.  But saying you did it the way STATA recommends does not help me replicate this.

Can I download and install this? If so, make it easy for me to help you, don't expect me to go googlng for STATA downloads and installation recommendations.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2016-10-13 16:39:47

navi_se
Member
Registered: 2015-07-06
Posts: 139

Re: [Stata 14] Xstata segfaults

Ah, sorry, replicating this requires someone who has access to the product, since stata is proprietary.

Installation doesn't go beyond what I described tho and their script doesn't do much apart from extracting the files in the folder and writing a file with the licence infos.

Is maybe any other way/command that I can use to try and pinpoint the source of the error? Terminal is silent and all I know comes from dmesg. I guess there must be some version of libpng and libgdk_pixbuf for which this works, but I dunno how to locate them.

I don't know if the bug reported on the wiki as anything to do with what I am experiencing, but it mentions libpng here (link to the page with the fix).

Offline

#6 2016-10-13 16:47:16

navi_se
Member
Registered: 2015-07-06
Posts: 139

Re: [Stata 14] Xstata segfaults

I have tried again running the fix for libpng described in the earlier link. The final step for it requires

 $ sudo ln -sf /usr/local/stata-png-fix/stata-png-fixed.sh /usr/local/bin/xstata

but I guess that didn't work because I have xstata already in my $PATH.

Running the link from inside bin  instead of calling xstata

 $/usr/local/bin/xstata

still causes a seg fault but seems to get rid of one of the error messages in dmesg relating to libpng.

Last edited by navi_se (2016-10-13 16:50:09)

Offline

#7 2016-10-13 16:47:34

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,530
Website

Re: [Stata 14] Xstata segfaults

In that case STATA is probably built against very old libs and this may be hard to track down without help from the vendor.  Does STATA give a list of versioned depenencies?  Or do they give a certain version of a major distro that the binary is made for?

And strace should give useful information, but often in cases like this tracking down all the many old libs that may be needed could be a real hassle.  It might be easier to set up a vm or nspawn instance with a distro supported by the STATA vendor.

Otherwise get creative with your other approach of using the CLI version and just finding a way to display the generated plots.  If STATA can execute system commands (something like an `exec` or `system` or `shell` command) then this should be pretty easy: just wrap your plot commands in in a function that 1) plots to a file, and 2) runs feh/mupdf or some other viewer to display that file.  But again, I've never used STATA myself (I just use R).


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#8 2016-10-14 13:49:00

navi_se
Member
Registered: 2015-07-06
Posts: 139

Re: [Stata 14] Xstata segfaults

Unfortunately I am stuck with STATA as I have to teach it, so I ended up following your last advice and wrote this little thing

program define pgraph
graph export `1'.`2'
shell llpp `1'.`2' & disown
end

so that

. do pgraph.do
. pgraph file pdf

which prints the last graph to file and opens it using llpp and then sent an email to stata tech support.

Thanks for your help!

Last edited by navi_se (2016-10-14 13:55:15)

Offline

Board footer

Powered by FluxBB