Andrew,
I found this issue a couple days ago. If you generate a drawing with my script and then try to copy some of the elements, QCAD will crash. It doesn't matter if you are in deBug mode or not, it happens either way.
If you generate the drawing, save it, close the drawing and then reopen, it works just fine. You can copy anything and paste to the same drawing or another. Saving without closing doesn't fix it.
I've attached my FMScripts for you to use. It's not ready for production release, but it works. To generate a drawing off the Fearless Makers menu select Adult Female Patterns > Bodice Front. The file chooser will open and then you can select the Lori0218.xml file, which is located in the xmlFiles folder, also in the FMScripts directory.
Hide the Reference layer, then select everything and try to copy it. I'm on a Mac OSX 10.9.5 and it crashes every single time, it's not intermittent. I haven't tried this in Windows or Linux.
Thanks,
Lori
QCAD Crash on Entity Copy
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
-
- Full Member
- Posts: 84
- Joined: Sat Nov 03, 2012 2:00 am
QCAD Crash on Entity Copy
- Attachments
-
- FMScripts.zip
- (138.46 KiB) Downloaded 502 times
Re: QCAD Crash on Entity Copy
The layers that are created by the script reference an invalid linetype (linetypeId is -1).
You can fix the problem by assigning a valid linetype ID to the layers. For example in FMBodiceFront.js:
You can fix the problem by assigning a valid linetype ID to the layers. For example in FMBodiceFront.js:
var linetypeId = gDocument.getLinetypeId("continuous"); var finalLayer = new RLayer(gDocument, 'Pattern', false, false, (new RColor("black")), linetypeId); ... var refLayer = new RLayer(gDocument, 'Reference', false, false, (new RColor("magenta")), linetypeId); ...Having said that, invalid linetypeIDs shouldn't lead to a crash. I've fixed this problem for the next release, so you'd only get a warning when copying.
-
- Full Member
- Posts: 84
- Joined: Sat Nov 03, 2012 2:00 am
Re: QCAD Crash on Entity Copy
Worked perfectly.
Thank you Andrew.
Thank you Andrew.