Ticket #1756 (closed defect: fixed)

Opened 4 months ago

Last modified 3 months ago

Script input panel freezes GeoGebra

Reported by: zbynek Owned by: arnaud
Priority: major Milestone: GeoGebra 4.2
Component: GUI Keywords:
Cc: michael Estimate (h): 0
Progress (%): 100

Description

Pasting

SetCaption[γ,If[((η>180°)&&( p≟ 1)),""+round(γ-1°), If[((η<180°)&&(p≟ 1)),""+round(γ+1°),""+round(γ)]]]

into script input panel (i.e. OnUpdate) freezes GeoGebra.

Pasting just the If part is OK.

Also opening the script panel of geo, which has this in properties.

(Eclipse, with OpenJDK 1.7)

Change History

comment:1 Changed 4 months ago by zbynek

... also

ggbApplet.evalCommand("SetActiveView[1]");
var name=prompt('Username ?');
ggbApplet.writePNGtoFile("c:
Documents and Settings
"+name+"
Desktop
test.png",1,false,300);

comment:2 Changed 3 months ago by george

This may be my bug. The line numbering code I added a few weeks ago locks up when a script line wraps around. See http://www.geogebra.org/forum/viewtopic.php?f=22&t=25958

Line numbering has been turned off for now. I'll try to fix this as soon as I can.

@Zbynek/Arnaud: Please check that this is the true cause.

comment:3 Changed 3 months ago by arnaud

I've typed in the exact same (wrapping) line before and after applying [15582]

  • Before, GeoGebra freezes.
  • After, it's OK.

So the line numbering code is definitely involved in the freeze. George, I haven't had the time to look at your line numbering code. Could it be a deadlock?

comment:4 Changed 3 months ago by george

  • Status changed from new to closed
  • Progress (%) changed from 0 to 100
  • Resolution set to fixed

The line numbering code didn't handle word wrapped lines correctly and fell into an infinite repaint loop. Fixed in r15602.

Note: See TracTickets for help on using tickets.