QCAD Bugtracker

  • Status Closed
  • Percent Complete
    100%
  • Task Type Bug Report
  • Category QCAD (main)
  • Assigned To
    Andrew
  • Operating System All
  • Severity Medium
  • Priority Very Low
  • Reported Version Development
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: QCAD Bugtracker
Opened by Anonymous Submitter - 05.08.2011
Last edited by Anonymous Submitter - 08.08.2011

FS#157 - rotate causes uncaught exception

  1. draw line
  2. Modify → Rotate
    • center point: line end point
    • delete original
    • angle 90°
Uncaught exception at scripts/Modify/Rotate/Rotate.js:117: Error: :-1:-1: Wrong number/types of arguments
for RDocumentInterface.applyOperation().
<native>(undefined) at -1
<anonymous>(event = RCoordinateEvent(0xbfffd478), preview = false) at scripts/Modify/Rotate/Rotate.js:117
<anonymous>(event = RCoordinateEvent(0xbfffd478)) at
/home/martin/workspace/rsframework/scripts/Modify/../EAction.js:1197
<global>() at -1
117	                di.applyOperation(this.getOperation(false));
Closed by  Anonymous Submitter
08.08.2011 15:27
Reason for closing:  Fixed
Admin
Andrew commented on 05.08.2011 13:34

I cannot reproduce that.
Can you try again?
If the debugger shows, what is the return value of "this.getOperation(false)"?
If that is undefined, can you try to step into this.getOperation(false) and see where it fails?

Anonymous Submitter commented on 05.08.2011 13:45
.eval this.getOperation(false)==undefined
 
qsdb> this.centerPoint == undefined
true
Admin
Andrew commented on 05.08.2011 13:51

Committed potential fix. The tool might not do anything anymore though, if this.centerPoint is NULL.

Anonymous Submitter commented on 05.08.2011 14:23

nope, still the same

Anonymous Submitter commented on 08.08.2011 14:27

similar problem with scale:

Uncaught exception at scripts/Modify/Scale/Scale.js:123: Error: :-1:-1: Wrong number/types of arguments for RDocumentInterface.applyOperation().
<native>(undefined) at -1
<anonymous>(event = RCoordinateEvent(0xbfffd478), preview = false) at scripts/Modify/Scale/Scale.js:123
<anonymous>(event = RCoordinateEvent(0xbfffd478)) at /home/martin/workspace/rsframework/scripts/Modify/../EAction.js:1197
<global>() at -1
123	                di.applyOperation(op);
 
Admin
Andrew commented on 08.08.2011 14:35

I still cannot reproduce this here.

I've added some debugging output to Rotate.js. Can you pls post the output here? Thx.

Edit: I've also added some fail safe code, it might not show the same symptoms anymore.

Anonymous Submitter commented on 08.08.2011 14:47

doesn't crash anymore, but does nothing now

Debug:    updateScenes... 
Debug:    updateGuiActions... 
Debug:    notifyListenersSlot... 
Debug:    setActiveSubwindow... 
Warning:  QScriptEngine::newVariant(): changing class of non-QScriptObject not supported
Warning:  RScriptHandlerEcma::createActionDocumentLevel():  "scripts/Snap/Auto/Auto.js" : Engine is busy. Aborting... 
Warning:  RScriptHandlerEcma::createActionDocumentLevel():  "scripts/Snap/RestrictOff/RestrictOff.js" : Engine is busy. Aborting... 
Debug:    Rotate.setState: setting this.centerPoint to undefined 
Debug:    Rotate.pickCoordinate: setting this.centerPoint to  RVector(12, 16, 0)  
Debug:    updateScenes... 
Debug:    updateGuiActions... 
Debug:    notifyListenersSlot... 
Warning:  RScriptHandlerEcma::createActionDocumentLevel():  "scripts/Snap/Auto/Auto.js" : Engine is busy. Aborting... 
Warning:  RScriptHandlerEcma::createActionDocumentLevel():  "scripts/Snap/RestrictOff/RestrictOff.js" : Engine is busy. Aborting... 
Debug:    setActiveSubwindow... 
Debug:    Rotate.setState: setting this.centerPoint to undefined 
Debug:    Rotate.getOperation: failed, this.centerPoint is not valid 
Debug:    updateScenes... 
Debug:    updateGuiActions... 
Debug:    notifyListenersSlot... 
Debug:    setActiveSubwindow... 
Debug:    Rotate.setState: setting this.centerPoint to undefined 
Debug:    updateScenes... 
Debug:    updateGuiActions... 
Debug:    notifyListenersSlot... 
Warning:  QScriptEngine::newVariant(): changing class of non-QScriptObject not supported
Warning:  QScriptEngine::newVariant(): changing class of non-QScriptObject not supported
Debug:    setActiveSubwindow... 
Admin
Andrew commented on 08.08.2011 14:58

Thanks. I can reproduce it now. Looks like under Linux there's a focus change when the dialog opens. I can simulate that by switching applications. Will try to fix.

Admin
Andrew commented on 08.08.2011 15:01

rotate should be fixed now, please confirm, then I'll fix scale

Anonymous Submitter commented on 08.08.2011 15:01

yes, the dialog is surrounded with a blue border, means it has he focus (the focus taken away from the main window)

Anonymous Submitter commented on 08.08.2011 15:03

rotate is OK now

Admin
Andrew commented on 08.08.2011 15:12

OK, updated scale as well.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing