runtime error in the javascript evaluator when 'opening into' file.

Bug #1190191 reported by Marten de Vries
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenTeacher
Status tracked in 3.x
3.x
Fix Released
High
Marten de Vries

Bug Description

Steps to reproduce:

- Start OT (a version that has open into support, so the current trunk).
- Open a file
- Open a file into that file
- See a crash in the console:
Traceback (most recent call last):
  File "modules/org/openteacher/enterers/words/words.py", line 307, in data
    return self._compose(word.get("answers", []))
  File "modules/org/openteacher/wordsString/javaScriptComposer/javaScriptComposer.py", line 48, in compose
    return self._js["compose"](*args, **kwargs)
  File "modules/org/openteacher/javaScript/evaluator/evaluator.py", line 449, in wrapper
    jsArgs = self._getJsArgs(args, kwargs)
  File "modules/org/openteacher/javaScript/evaluator/evaluator.py", line 434, in _getJsArgs
    return [self._toJSValue(arg) for arg in args]
  File "modules/org/openteacher/javaScript/evaluator/evaluator.py", line 353, in _toJSValue
    if jsObj.engine() == self._engine:
RuntimeError: super-class __init__() of type QScriptValue was never called
(multiple times, presumably for every word in the file)
- See that the QTableView isn't properly updated either.

Reproduced this on both my main pc and my Windows VM.

Interesting to research: the normal open function seems not to be affected by this while the open into function is.

Tags: file words
Revision history for this message
Marten de Vries (marten-de-vries) wrote :

'Interesting to research: the normal open function seems not to be affected by this while the open into function is.'
That last idea let to the solution. (deepcopy.copy() not working on Qt objects). Added regression tests & fixed.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.