Free cookie consent management tool by TermsFeed Policy Generator

Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#2964 closed defect (done)

'Mathematical representation' does not work

Reported by: gkronber Owned by: gkronber
Priority: medium Milestone: HeuristicLab 3.3.16
Component: Problems.DataAnalysis.Symbolic.Views Version: trunk
Keywords: Cc:

Description (last modified by gkronber)

We got a bug report on the mailing list that the view for mathematical representation does not work correctly.

Steps to reproduce:

  1. Download HL 3.3.15 from website
  2. Start and open Genetic Programming - Symbolic Regression Sample
  3. Start algorithm and check results
  4. Select "Best training solution" -> Model
  5. Switch View to "Mathematical Representation" using ViewHost
  6. An error dialog occurs (below)

Potentially related to #2841.

Attachments (4)

MathJax error.png (6.2 KB) - added by gkronber 6 years ago.
Context Menu - Script Error.png (38.3 KB) - added by mkommend 6 years ago.
HL_blocked.png (16.5 KB) - added by gkronber 6 years ago.
MathJax_blocked.png (16.5 KB) - added by gkronber 6 years ago.

Download all attachments as: .zip

Change History (30)

comment:1 Changed 6 years ago by gkronber

  • Description modified (diff)

comment:2 Changed 6 years ago by gkronber

Probably, this can be solved by updating MathJax to a recent version.

comment:3 Changed 6 years ago by gkronber

  • Status changed from new to accepted

comment:4 Changed 6 years ago by gkronber

Systems for which the problem has been reported:

  1. Microsoft Windows 7 Home Premium SP1 and Internet Explorer version 11.0.9600.19180
  2. Microsoft Windows 10 Education and Internet Explorer 11.2248.14393.0
  3. Microsoft Windows 10 Education and Internet Explorer 11.665.16299.0
Last edited 6 years ago by gkronber (previous) (diff)

comment:5 Changed 6 years ago by gkronber

r16309: updated MathJax version to most recent version (2.7.5).

This solves the problem on my system (Microsoft Windows 10 Education and Internet Explorer 11.2248.14393.0)

Last edited 6 years ago by gkronber (previous) (diff)

comment:6 Changed 6 years ago by gkronber

  • Owner changed from gkronber to mkommend
  • Status changed from accepted to reviewing

Please check if "mathematical representation" still works on your system.

Changed 6 years ago by gkronber

comment:7 Changed 6 years ago by gkronber

  • Description modified (diff)

Changed 6 years ago by mkommend

comment:8 Changed 6 years ago by mkommend

Displaying equation with the new MathJax Version 2.7.5 works on both of my machines (Win10 and Win7). However, something is wrong in the view implementation (see screenshot below), because no context menu entry can be opened.

comment:9 Changed 6 years ago by mkommend

  • Owner changed from mkommend to gkronber
  • Status changed from reviewing to assigned

comment:10 Changed 6 years ago by gkronber

The original problem persists even after the update of MathJax to version 2.7.5.

The MathJax.zip file is extracted on the first start of HL after downloading. It seems that the automatic extraction does not work correctly (permissions?). When the MathJax.zip file is extracted manually, the view for "mathematical representation" works correctly.

Changed 6 years ago by gkronber

Changed 6 years ago by gkronber

comment:11 Changed 6 years ago by gkronber

Might also have to do with this

or with this

comment:13 Changed 6 years ago by mkommend

What about switching from IE to another browser for displaying web pages? For example http://cefsharp.github.io/ that is based on chromium.

This could also get rid of the context menu bug that has been introduced in that ticket. Apparently the detachEvent functionality is not used any more in the new MathJax version. Only in MathMenu.js line 382:

if (this.msieFixedPositionBug) {detachEvent("onresize",MENU.Resize)}

and one other occasion it is used. In the previous version it has been used approx 100 times.

comment:14 Changed 6 years ago by gkronber

The cefsharp nuget packages (with all dependencies) amount to over 400 MB. I think we should consider other options.

comment:16 Changed 6 years ago by gkronber

It seems it's possible to programmatically unblock a file

https://weblogs.asp.net/dixin/understanding-the-internet-file-blocking-and-unblocking

comment:17 Changed 6 years ago by gkronber

Did some more research:

  • Does not work: Download HL -> Unzip -> Run HeuristicLab 3.3.exe
  • Works: Download HL -> Unblock HeuristicLab.Zip -> Unzip -> Run HeuristicLab 3.3.exe
  • Does not work: Download HL -> Unzip -> Unblock MathJax.zip -> Run HeuristicLab 3.3.exe
  • Does not work: Download HL -> Unzip -> Unblock HeuristicLab 3.3.exe -> Run HeuristicLab 3.3.exe
  • Works: Download HL -> Unzip -> Unblock displayModelFrame.html -> Run HeuristicLab 3.3.exe

comment:18 Changed 6 years ago by gkronber

r16341: programmatically unblock (remove Zone.Identifier alternative stream) displayModelFrame.html to allow WebBrowser control to execute MathJax scripts.

comment:19 Changed 6 years ago by gkronber

r16342: added LaTeX expression for testing MathJax output

comment:20 Changed 6 years ago by gkronber

r16343: edited MathMenu.js in MathJax.zip and commented out code which caused problems:

      // if (MENU.msieFixedPositionBug) {
      //   //  MSIE can't do fixed position, so use a full-sized background
      //   //  and an onresize handler to update it (stupid, but necessary)
      //   div.width = div.height = 0; this.Resize();
      //   attachEvent("onresize",this.Resize);
      // } else {
        // otherwise, use a fixed position DIV to cover the viewport
        bg.style.position = "fixed";
      // }

...

 /* if (this.msieFixedPositionBug) {detachEvent("onresize",MENU.Resize)} */

comment:21 Changed 6 years ago by gkronber

  • Owner changed from gkronber to mkommend
  • Status changed from assigned to reviewing

comment:22 Changed 6 years ago by jkarder

  • Version changed from 3.3.15 to trunk

comment:23 Changed 6 years ago by mkommend

  • Owner changed from mkommend to gkronber
  • Status changed from reviewing to readytorelease

Reviewed changes r16309, r16341, r16342, r16343 and test the functionality. Everything works as expected on my machine.

comment:24 Changed 6 years ago by gkronber

r16492: merged r16309, r16341, r16342, r16343 from trunk to stable

comment:25 Changed 6 years ago by gkronber

  • Resolution set to done
  • Status changed from readytorelease to closed

comment:26 Changed 5 years ago by gkronber

r17169: update mergeinfo: r16309, r16341, r16342, r16343 have been merged to stable (see r16492)

Note: See TracTickets for help on using tickets.