Closed allamassal closed 6 years ago
Could replicate the error again and give us the log file? We can't debug the issue without that information
Okay, it just happened again. Let me copy the log file:
Traceback (most recent call last): File "mceutils.py", line 56, in _alertException File "editortools\brush.py", line 751, in mouseUp IndexError: list index out of range Any help would be a godsend at this point because I am working on a project that heavily uses the brush tool and I keep getting this error.
What version are you using?
In the current master branch, this is the relevant function.
def mouseUp(self, evt, pos, direction):
"""
Called on releasing the Mouse Button.
Creates Operation object and passes it to the leveleditor.
"""
if not self.draggedPositions:
return
op = BrushOperation(self)
self.editor.addOperation(op)
if op.canUndo:
self.editor.addUnsavedEdit()
self.editor.invalidateBox(op.dirtyBox())
self.lastPosition = self.draggedPositions[-1]
self.draggedPositions = []
There's only one list access in this function where that error could be thrown. The only way for this to throw an out of range error is if the list has a length of zero, which I can't see happening with the check at the top of the function.
I am using 1.5.6.0.
@allamassal Which brush setting are you using?
I was using the spherical brush setting, in Fill mode.
I'm able to replicate the bug, haven't got it to happen consistently yet.
Fixed via c71f53c
Title says enough. This is too confusing for me. EDIT: The error was just 3 lines in the console, one line pointing to the tools_brush.py file or whatever it is. Sadly I opened MCEdit again, overwriting the logfile, so I have to replicate this again to get the exact error.