## jreality doesn't start reliably

Questions and problems about using polymake go here.

Moderator: Moderators

beew
Posts: 25
Joined: 13 Aug 2015, 20:41

### jreality doesn't start reliably

Hi,

Just installed polymake 2.14 on Ubuntu 15.04 64 bit on two machines.

On one machine (intel graphic), once in a while jreality doesn't start. Running codes like

Code: Select all

$c=cube(3);$c->VISUAL;
usually works but sometimes nothing happens and deleting the file ~/.polymake/pref.pl somehow fixes it and it works normally again.

On the other machine (amd graphic with open source driver) jreality started a few times (but blank, with no image) and then it never starts again.

Starting polymake with

Code: Select all

polymake -dd
shows that it gets stuck at
INFO:could not setup mac os handler, maybe not a mac
Otherwise there was no error.

(just ran this again on the amd machine, this time jreality started, the probability of it starting is about 1/10. But jreality doesn't show any cube)

beew
Posts: 25
Joined: 13 Aug 2015, 20:41

### Re: jreality doesn't start reliably

Problem seems to be related to java somehow getting stuck. If jreality doesn't show up killing java and re-running the VISUAL command it may work. I think jreality comes with its own bundled java. I am wondering if there is a way to use the system's java instead of bundled one perhaps by editing customize.pl? I mean precisely what I should put for
$JReality::Viewer::jogl_path and$JReality::Viewer::jogl_native_path?

assarf
Developer
Posts: 74
Joined: 12 Oct 2011, 15:52

### Re: jreality doesn't start reliably

We ship jogl binaries but no java. So your polymake uses your system java installation but the jogl libraries bundled with polymake. Since the latest release we updated the jogl version which fixed several visualization bugs (like the empty screen you described).

We are planning on releasing a updated 2.14 version (also with perl 5.22 support). In the meantime you may use/try the perpetual beta version, since those changes are already in there. Check: http://polymake.org/doku.php/perpetualbeta
no signature

beew
Posts: 25
Joined: 13 Aug 2015, 20:41

### Re: jreality doesn't start reliably

Hi, compiled 2.14r1 on Ubuntu 15.04 and 15.10, it is even worse than 2.14 in that jreality almost never starts.

Thanks.

assarf
Developer
Posts: 74
Joined: 12 Oct 2011, 15:52
Weird...

For older sources you may check github. Just checkout the right release.

beew
Posts: 25
Joined: 13 Aug 2015, 20:41

### Re: jreality doesn't start reliably

I have tried 2.14, 2.14r1 and the beta, jreality doesn't start with any version for Ubuntu 15.10 64 bit. java appears to be stuck and even "killall java" doesn't kill it, have to do "killall -9 java" to terminate. But I have tested with other java applications and they work without problem.

Polymake was complied against openjdk8. Can that be a problem?

blorenz
Developer
Posts: 109
Joined: 10 Jan 2011, 17:21

### Re: jreality doesn't start reliably

Polymake was complied against openjdk8. Can that be a problem?
I just rebuild my polymake against a fresh install of openjdk-1.8.0 and jreality works fine, so this should not be the problem.

I think the problem are the jogl libraries, and maybe a rather recent intel graphics? Could you give some more details on your hardware and it might be helpful if you could generate a debug log of a (non-working) java startup by running:

Code: Select all

polymake -dd 2> debug.log
Once the polymake shell appears please run:

Code: Select all

jreality(cube(3)->VISUAL);
Then you can exit polymake and attach the generated debug.log (or send it to lorenz (at) math.tu-berlin.de).

Note that the above needs to be done with polymake 2.14r1 or at least 2.15-beta1, as 2.14 and older versions wont generate the necessary jogl debug output.

Best,
Benjamin

beew
Posts: 25
Joined: 13 Aug 2015, 20:41

### Re: jreality doesn't start reliably

Hi, I have attached the debug log for 2.15 beta.

It is intel graphic but hardly recent. The graphic card is ironlake mobile, the laptop is about 5 years old.
Attachments
debug.log

beew
Posts: 25
Joined: 13 Aug 2015, 20:41

### Re: jreality doesn't start reliably

Hello, anyone out there?

blorenz
Developer
Posts: 109
Joined: 10 Jan 2011, 17:21

### Re: jreality doesn't start reliably

Hi,

sorry for the delay. The log indicates that the problem is in fact not jogl but a general startup issue of jreality (Also, I have a laptop with the same graphics chip and cant reproduce the problem). In the meantime we have fixed two race conditions in the java/jreality interface which we hope will solve your problems.

I have attached a patch, to apply please change to the polymake source directory and run:

Code: Select all

patch -p0 < /path/to/jreality_fix.diff
Afterwards rerun make (and make install) and try polymake again.

Benjamin
Attachments
jreality_fix.diff