This project has moved. For the latest updates, please go here.

two LTYPE tables with same name leads app to crash

May 6, 2013 at 12:10 PM
Hi,

I came across a particular dxf file in which two LTYPE tables had same name as DASHED. And this was making my application to crash. Is this a bug or there should be distinct names? I guess it is a bug as the same file opens and works perfectly with AutoCAD and other dxf viewer.

It creates problem while reading the dxf file.

Please have a look

Thanks
Coordinator
May 6, 2013 at 5:33 PM
Yes, actually this is not a pure bug with the library since two linetypes with the same name should not be allowed. If this happens, a question arises ¿what linetype definition should we use? AutoCad importing process is more permissive, and this is not the first time a problem like this has appeared. I will make a workaround for this bug for the next update, also any other table object should be checked for possible duplicities, from now on the first one will be used.

Daniel
May 7, 2013 at 8:21 AM
Hi,

I just went through the code, and saw where it was crashing. And I realized, that the name of the table is being passed as a key while inserting the table. My question is why not the handle be passed as a key along with the table LTYPE object? May be that could solve this problem? Just a guess. Am not sure.

Thanks

Regards
Rakesh Patil
May 7, 2013 at 5:51 PM
Hi,

I digged up the code, and realized why you are using table name as a key. So when can the next update be expected?

Thanks
Coordinator
May 8, 2013 at 7:54 PM
Edited May 9, 2013 at 1:43 AM
Today I have updated the code, I have neither dead lines nor schedules, I do this on my free time but I try to fix bugs as soon as possible.

Try to load that buggy file again, the problem should be fixed. Now you can report this bug to the program that generated this dxf, as two table objects, this includes line types, can not have the same name (case insensitive). AutoCad just skips the duplicate line type, and this is what I am doing now.

Daniel
May 9, 2013 at 4:38 AM
Thanks a lot Daniel. I will check it. Thanks a lot.
May 9, 2013 at 5:41 PM
Thank Daniel, it is working... :-)