[infoCursorOverlayPrefs] Crash moving mouse in plugin gear or PreviewActionInterface

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[infoCursorOverlayPrefs] Crash moving mouse in plugin gear or PreviewActionInterface

emanuel
When developing actions, I had a lot of crashes when the user entered points using the mouse.

You can recreate the whole thing in the gear plugin.

After completing this action:
https://github.com/LibreCAD/LibreCAD/blob/master/librecad/src/plugins/intern/qc_actiongetpoint.cpp#L45

If I quickly move the mouse diagonally after clicking with the mouse in the drawing field, the whole LC crashes at this point:
https://github.com/LibreCAD/LibreCAD/blob/master/librecad/src/actions/drawing/rs_actiondefault.cpp#L252

I catch it like this, and it often occurs when developing.
****************************************************************************************************************************************
            if (infoCursorOverlayPrefs && infoCursorOverlayPrefs->enabled){
                if (!isShowEntityDescriptionOnHighlight()) {
                    infoCursorOverlayData.setZone2("");
                }
                RS_Snapper::forceUpdateInfoCursor(mouse);
            }
            else
            {
                qCritical() << "[RS_ActionDefault::mouseMoveEvent] ###FIXME infoCursorOverlayPrefs == NULL!!";
            }
            break;
****************************************************************************************************************************************

I have to provoke it in drawing mode. But it has often crashed at the point when moving the mouse at startup.

The actions are very fragile,
when I want to access points, they are often not there, or if you execute finish() and then query isFinished(), it sometimes crashes. Thank God I got my script GetRad and GetDist working the way I need them.

Reply | Threaded
Open this post in threaded view
|

Re: [infoCursorOverlayPrefs] Crash moving mouse in plugin gear or PreviewActionInterface

sand1024
hm.. that's quite a weird behavior, as for me - I've never seen it before (at least under Windows).
However, I suppose that the check for non-null infoCursorOverlayPrefs was added a couple of builds ago...  
Do you use the latest sources?

Anyway, I've added more aggressive initialization of that fields, so please try later on as this change will be merged.

As for actions for plugins.. well, potentially it might be that something is broken there, need to check this.
Actually, most these actions are waiting to be reviewed.

P.S - actually, for such kind of issues/dev discussions, I think it's better to rely on GitHub issues tracker (https://github.com/LibreCAD/LibreCAD/issues) rather than this forum that is rather a user-oriented.
Reply | Threaded
Open this post in threaded view
|

Re: [infoCursorOverlayPrefs] Crash moving mouse in plugin gear or PreviewActionInterface

emanuel
ok, thanks.

"Do you use the latest sources?"
>>> link is master