libredwg icon indicating copy to clipboard operation
libredwg copied to clipboard

Broken Text Style write on win64 only

Open Dev7741 opened this issue 4 years ago • 128 comments
trafficstars

With font_file: arial.ttf (EED name "Arial", flag 34).

Dev7741 avatar Jun 03 '21 16:06 Dev7741

After opening DWG in AutoCAD 2013 version for "Text style" dialog "Font Name" and "Font Style" field coming as blank for "Standard" style. Please refer below image.

TextStyle

Dev7741 avatar Jun 03 '21 17:06 Dev7741

But how did you create this DWG exactly? DXF, Json, dwgadd? Can I have the source of this?

rurban avatar Jun 03 '21 18:06 rurban

I have created DWG using Json file on latest release build "0.12.4.4317". Please find attached Zip file contain JSON file.

Circle_Version_2000.zip

Dev7741 avatar Jun 06 '21 03:06 Dev7741

@rurban Are you able to reproduce the issue?

Dev7741 avatar Jun 14 '21 13:06 Dev7741

No, no time yet, sorry

rurban avatar Jun 14 '21 20:06 rurban

Any updates?

Dev7741 avatar Jun 30 '21 14:06 Dev7741

@rurban Any updates?

Dev7741 avatar Jul 20 '21 13:07 Dev7741

Hello,

I'm ready to donate $100 for getting all the details to resolve this issue? Can somebody provide me the donation link?

Thanks.

timoria21 avatar Jul 22 '21 06:07 timoria21

Not able to reproduce with AutoCAD r2018. See my style dialog gh346-style

after converting your json to a r2000 DWG with current master. The provided Arial.ttf font (via EED) is clearly properly selected The AutoCAD Importer also reports no STYLE error.

Since 0.12.4.4317 there were also quite a lot fixes.

rurban avatar Aug 09 '21 16:08 rurban

Hi,

I have checked on latest release build (0.12.4.4348) using same JSON file on AutoCAD 2013 and AutoCAD 2018(windows 10- 64 bit) however issue is reproducible on my machine. please see below snapshot. Error

Also reported text Style error. Please see below Error.

Reading handle 11 object type AcDbTextStyleTableRecord Error 34 (eWrongObjectType) Object discarded Reading handle 132 object type AcDbTextStyleTableRecord Error 34 (eWrongObjectType) Object discarded

on my machine Arial.ttf font file is at default location i.e. "C:\Windows\Fonts". Do we need to copy font file to other location?

Dev7741 avatar Aug 13 '21 05:08 Dev7741

This seems to be the problem:

Reading handle 11 object type AcDbTextStyleTableRecord
Error 34 (eWrongObjectType) Object discarded
Reading handle 132 object type AcDbTextStyleTableRecord
Error 34 (eWrongObjectType) Object discarded

the path is fine, I think

rurban avatar Aug 13 '21 07:08 rurban

Can you also attach the generated DWG and LOG file, please. Must be some windows thing then, I think. Doesnt look like a locale thing

rurban avatar Aug 14 '21 17:08 rurban

Please find attached SampleFiles.zip folder SampleFiles.zip . It contains: Original DWG file name: Circle_Original.dwg JSON file name: Circle_Test_2000.json Generated DWG file name: Circle_Newely_generate.dwg Log file name: LogFile.txt

Please let me know if more information is required.

Dev7741 avatar Aug 15 '21 07:08 Dev7741

I can repro it on windows. Some wrong size calculation!

rurban avatar Aug 15 '21 16:08 rurban

Any updates?

Dev7741 avatar Sep 07 '21 04:09 Dev7741

no sorry. I was on holidays, and haven't fixed my windows vm/machine yet

On Tue, Sep 7, 2021 at 6:48 AM Dev7741 @.***> wrote:

Any updates?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/LibreDWG/libredwg/issues/346#issuecomment-913987086, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAKGUOXGMAA5KFX4IPFO33UAWKP3ANCNFSM46BEVDQA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

-- Reini Urban

rurban avatar Sep 07 '21 08:09 rurban

Reini,

If you tell me what to check I can try by myself.

timoria21 avatar Sep 16 '21 14:09 timoria21

Debug into the handle corruption

rurban avatar Sep 16 '21 19:09 rurban

Did you find any handle corruption code. If you know any class or function where there is chance of handle corruption. Please let us know we will debug the particular code.

Dev7741 avatar Sep 24 '21 07:09 Dev7741

Hi Reini,

Can you please be more specific? Where in the code do I need to check?

Thank you.

timoria21 avatar Sep 28 '21 07:09 timoria21

Fixed one part. remaining error: make && programs/dwgwrite.exe -v1 -y Circle_Version_2000.json => Warning: Wrong object size: 19659 + 18 = 19679 != 19691: -12 off ... in encode.c:3925

rurban avatar Sep 30 '21 17:09 rurban

Fixed the 2nd part, no more corrupt handle sizes.

rurban avatar Oct 01 '21 16:10 rurban

Thanks for the fix.

We have merged the modified code at our end and observed that out of two error one is fixed and below error is reproducible at our end. Reading handle 11 object type AcDbTextStyleTableRecord Error 34 (eWrongObjectType) Object discarded

If possible could you please provide latest release build so we can check at our end.

Dev7741 avatar Oct 04 '21 10:10 Dev7741

Still working on the merge. mingw is broken a bit

rurban avatar Oct 04 '21 12:10 rurban

Thanks Reini, I feel we are very close to resolving the issue.

timoria21 avatar Oct 05 '21 10:10 timoria21

Is it good now?

rurban avatar Oct 05 '21 11:10 rurban

No, please go on with the merge.

timoria21 avatar Oct 05 '21 13:10 timoria21

Why the issue is now tagged "need info"? I was simply happy to see that you were doing progress on this.

timoria21 avatar Oct 05 '21 18:10 timoria21

David J. Harris @.***> schrieb am Di., 5. Okt. 2021, 20:20:

Why the issue is now tagged "need info"? I was simply happy to see that you were doing progress on this.

Because i need feedback if the problem is now solved or not.

rurban avatar Oct 05 '21 19:10 rurban

Hi,

I have checked on latest release build (0.12.4.4362) using same JSON file (Circle_Test_2000.json) on AutoCAD 2013(windows 10- 64 bit) however newly created drawing get crashed while opening drawing. Please see below message get displayed while opening drawing.

image

Please let us know if more information is required. Thanks

Dev7741 avatar Oct 06 '21 05:10 Dev7741