← All bug reports

FS#530sporadic unwanted close of QCad

Type
Bug
Status
Closed
Resolution
Fixed
Category
QCAD (main)
Severity
Medium
Priority
Low
Reported version
3 RC4
Operating system
Ubuntu Linux
Reported
2012-03-30 by stefan
Closed
2012-04-06 by andrew

Using the move and scale tools, QCad sometimes (reason unknown so far) crashes in RC4 (never seen that in RC2).

Comments (8)

stefan 2012-04-01

on another machine (also running XUbuntu), copy+paste seems to work, but pressing ESC after successful insertion will instantly crash QCad RC4

stefan 2012-04-01

same with line tool: sometimes pressing ESC multiple times will instantly crash RC4

stefan 2012-04-02

This is really weird. The behaviour is in no way reproducible and sometimes occurs even on window-change (ctrl+tab). Normally, I would suspect my local RAM, but it occurs on two independent machines and only with RC4 (not with RC2).

andrew 2012-04-02

Yes, I am aware of these problems. It's caused by ECMAScripts being interrupted by system events.
These system events (focus in, focus out, mouse click, key press, etc) might trigger C++ or ECMAScript code that for example deletes an object the first script was relying on which leads to crashes.

This is most likely to happen when something is being terminated (e.g. after pressing Escape for tool termination or Ctrl-W for closing).

I've discovered today that switching off the Qt debugger (Preferences - Scripting) at the very least improves (if not fixes) the situation here.

I'd be extremely thankful for feedback of people who can confirm / deny that observation on their systems.

Thanks!

stefan 2012-04-02

40 minutes without this problem after disabling the debugger. :-) I will report after more testing (will take some time).

andrew 2012-04-02

Thanks for the report. Looks promising :)

It also starts to make some sense:
Scripts should normally not be interrupted by system events. But the debugger is notified whenever a function starts or ends (even if the debugger window is not shown). The debugger might allow for event processing during those notifications which I would consider to be a Qt bug.

stefan 2012-04-05

I had some time to do some tests, no "unwanted close" with disabled debugger so far. :-)
I will report after more tests.

stefan 2012-04-06

After several hours of testing, there was no unwanted close of QCad with disabled debugger. :-)
(should the de-bugger ;-) introduce such a bug?)

Closure comment

Most likely fixed by disabling debugger (RC5)