LibreCad Crashes When Opening File

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

LibreCad Crashes When Opening File

gee
LibreCad crashes when I attempt to open a .dxf file from "File" > "Open."  I am able to open the files from a right click drop down menu and everything seems to work fine, that is, unless I need to open a different file and need to use the "File" > "Open." method.  Then it crashes ...  everytime.  My OS is Ubuntu 12.04 and LibreCad version is 2.0.0beta5.  I noted the problem today after not using LibreCad for several months.  I uninstalled and reinstalled from the Ubuntu repository without correction and so then enabled the PPA for daily builds and updated the system in hopes of correcting but it did not. I ran LibreCad from the console with the following result:
gee@magnolia:~$ librecad --debug 2> lc.log
Aborted (core dumped)
LibreCad also crashes if I attempt to import a block.  I don't know where to go from here to try to solve the problem.  Any help is appreciated.
gee
Reply | Threaded
Open this post in threaded view
|

Update on LibreCad Crashes When Opening File

gee
Since my original post I have removed version 2.0 and the PPA for daily builds as this caused even more problems.  I have reinstalled version 1.0.1+nolibs-2 fromm the repository.  Now the "new problems" are gone, but the old one - LibreCad crashes when I attempt to open a .dxf file from "File" > "Open." - persists.
Any help is appreciated.
Reply | Threaded
Open this post in threaded view
|

Re: Update on LibreCad Crashes When Opening File

ozcad
openSUSE v12.2 32-bit
KDE 4.8.5 "release 2"

Versions 2.0.0beta1 and beta5 crash with segmentation error when opening .DXF files.
Running the Windows version under wine works fine, but it is several months since the Linux-native Librecad has worked.

If I reinstall older Librecad versions, the same .DXF files correctly open in v1/0/2xx and v1.0.3-1.1.

Given that the LibreCad developers are obviously not experiencing the problem (100% crash failure rate), it is likely to be some wrong or missing file/configuration/dependancy/64-32-bit in the systems of those who are affected by this problem.

I had suspected some older version files are still hanging around the system or Yast is getting some incompatible RPMs from some repository elsewhere.  I had similar problems with openSUSE repository versions conflicting with "official" websites (like VLC, FreeCAD, kaffeine) and had to clean out my system thoroughly, then select one source.  Having done that, I still can't make Librecad v2.x load or save any drawings at all.
Aside from the above, Librecad is a pleasure.
Reply | Threaded
Open this post in threaded view
|

Re: Update on LibreCad Crashes When Opening File

Rallaz
from where you have downloaded the LC RPM package ?
or you have compiled yourself ?

Reply | Threaded
Open this post in threaded view
|

Re: Update on LibreCad Crashes When Opening File

ozcad
RPM's:
    libdxflib-2_5_0_0_1-2.5.0.0.1-1.1.i586.rpm
    libdxfrw0-0.5.8-1.1.i586.rpm
    libmuparser2-2.2.2-1.1.i586.rpm
    librecad-2.0.0beta5-1.1.i586.rpm
    librecad-devel-2.0.0beta5-1.1.i586.rpm
    librecad-parts-2.0.0beta5-1.1.noarch.rpm

From:
    http://librecad.org/cms/home/installation/rpm-packages.html

(i.e. from you folks)

Thank you for the rapid response, I am impressed.

Q1: Do you use any registry-style features?  Can be hard to be sure one has cleaned it out completely.  I prefer and approve of your use of /home/xxx/.config/Librecad.  I notice that the "recent files" list tends to reflect the last linux/win program version to successfully run, makes me wonder if entanglement is occurring between linux/win versions.

Q2: Is there a Yast-style repository anywhere with your recent/latest version?  openSUSE is unfortunately several versions behind.

Jim A.
Reply | Threaded
Open this post in threaded view
|

Re: Update on LibreCad Crashes When Opening File

ozcad
I notice that "crash on file load" seems to be a common concern on Linux systems, yet it is apparently not replicated at all on the developer's systems, which seem to be 64-bit hardware, judging by the comments.

LibreCad also works fine under Windows XP and Linux+wine.  This implies that the problem may not be in the LibreCad source code, but in the 32-bit tool-chain.

This could be in the support libraries (e.g dxf, because we are loading a dxf file at crash-time) or differences between the 32-bit and 64-bit compilers or their include files.

The developers may need to install LibreCad on real 32-bit hardware to expose the problem.  Just a thought.
Reply | Threaded
Open this post in threaded view
|

Re: Update on LibreCad Crashes When Opening File

Rallaz
Hi Jim,
Added a new patch in libdxfrw source code.
All my pc's are 64bits and only can test 32 bits build in a virtual machine.
I updated the OS builds, download it from  http://librecad.org/cms/home/installation/rpm-packages.html

Or if you want to install from yast add:
http://download.opensuse.org/repositories/home:/Rallaz/openSUSE_12.2/
Reply | Threaded
Open this post in threaded view
|

Re: Update on LibreCad Crashes When Opening File

ozcad
Thanks for the repository suggested above, it saves a lot of effort.
The LibreCad version I download from it is 2.0.0rc1.git20130625-1.1

RPMs installed (I don't know if they are all necessary):
    librecad
    librecad-devel
    librecadparts
    dxflib-devel
    libdxflib-2.5.0.0.1-2.1.2
    libdxfrw-devel
    libdxfrw0

Calling from a Konsole terminal window to get a bit if diagnostic trail.
It starts running very quickly, less than 0.5 second delay.

Load the file:
    Select MenuBar -> File -> Open... (select file) -> OK

After a delay that depends on file size (0.1 ... 0.5 secs), LibreCad crashes, leaving the Konsole looking like:

jim@linux1-jim:~> librecad
Segmentation fault
jim@linux1-jim:~>

Side note:
My Windows(tm) version of LibreCad (under wine) is 2.0.0beta1.  It is working fine.
Reply | Threaded
Open this post in threaded view
|

Re: Update on LibreCad Crashes When Opening File

Rallaz
    librecad                   => the main program
    librecad-devel           => for develop LC plugins (not needed)
    librecadparts            => exanple files (not needed)
    dxflib-devel               => to build LC 1.0.x
    libdxflib-2.5.0.0.1-2.1.2  => needed to run LC 1.0.x
    libdxfrw-devel            => to build LC 2.0.x
    libdxfrw0                   => needed to run LC 2.0.x

Please, open konsole and type:
librecad --debug >out.log

Then compress and send me the created out.log file.
Reply | Threaded
Open this post in threaded view
|

Re: Update on LibreCad Crashes When Opening File

ozcad
This post was updated on .
A strange bag of results.

After starting up, the LibreCad grid dot X & Y spacing was uneven.
Checking Menu -> Edit -> Current Drawing preferences, I get
    X Spacing:  .57819e-313
    Y Spacing:  .03978e-312
... implying it is either wrongly iniz'd or not iniz'd or corrupted after iniz..

Update flash - I get a crash when I edit the above X&Y Spacing fields and attempt to apply them.

The restart is OK, so we go back to the old problem for now.

From Dolphin file manager (user mode) -> Menu -> Tools -> Open Terminal

In the new Konsole/bash window we get:
    jim@linux-jim:~/Documents/Junk>

We type:
    librecad --debug >junk.log

We get:
1. LibreCad fires up.

2. Over 1000 lines of diagnostic text chatter flashes up in the Konsole window.

3. The file junk.log is created, but is empty (zero bytes long).

4. Mouse activity within the LibreCad window causes more screen chatter,
    but nothing is written to the junk.log file.  (Weird).

5. After crashing on the load operation, the junk.log file is still empty.

BTW I suspect something is different with my modern Konsole/bash behaviour.
It has been many moons since I last did a diagnostic re-direction.

6. However, I can select Konsole window -> File -> Save Output As... (konsole.txt) -> Save

7. We get a file a 38.5 kbyte file named "konsole.txt" that seems to contain the right stuff.

8. So how do I get a copy to you?  It's OK, I just figured it out.

Not sure if this is a double posting, I changed to a new tabbed window in FireFox and
The page I was writing into disappeared.  This hints that my system is becoming unstable.
Re-booting now.
Reply | Threaded
Open this post in threaded view
|

Re: Update on LibreCad Crashes When Opening File

LordOfBikes
Administrator
Hi,

well done, finding a solution for the logfile yourself.

The error was in the command line, please use this next time:
librecad --debug 2>out.log

This will redirect the output into the file.

Armin
investing less than half an hour into Search function can save hours or days of waiting for a solution
Reply | Threaded
Open this post in threaded view
|

Re: Update on LibreCad Crashes When Opening File

ozcad
mechtute3.dxf

Using new updated command line technology:

    jim@linux-jim:~/Documents/Junk> librecad --debug 2>out.log
    Segmentation fault
    jim@linux-jim:~/Documents/Junk>

See attached "out.log" file - 81 kbytes.

Also the file "mechtute3.dxf" being loaded (in case it is dodgey).
Note that it may have been edited with QCad during my testing
Reply | Threaded
Open this post in threaded view
|

Re: Update on LibreCad Crashes When Opening File

cantcode
In reply to this post by ozcad
"...
Checking Menu -> Edit -> Current Drawing preferences, I get
    X Spacing:  .57819e-313
    Y Spacing:  .03978e-312
... implying it is either wrongly iniz'd or not iniz'd or corrupted after iniz..
..."

Don't know if this relates to this behaviour, but I had something similar going on when playing aroung with LCad.
Unfortunately I can not reproduce this behaviour.
I got super precise coordinates in the status bar (see image).

Image and video hosting by TinyPic
Reply | Threaded
Open this post in threaded view
|

Re: Update on LibreCad Crashes When Opening File

ozcad
I linked in 2 files but only 1 stuck.  So we will try that again.
out.log
Ta da!
Reply | Threaded
Open this post in threaded view
|

Re: Update on LibreCad Crashes When Opening File

LordOfBikes
Administrator
@ozcad, the DXF file you attached to your post, where is it from? How was it created?
Can you open this file with an older LC version?
For me, on Linux 64-Bit, this file crashes LC 2.0.0rc1 too, but only this file.

I've tried to open it with latest Autodesk TrueView, and it was discarded. TrueView says invalid or incomplete DXF input. So there must be something wrong with this file.

Regardless of the file is invalid or not, LC should not crash on opening an invalid or incomplete DXF file.
This has to be investigated.

Armin
investing less than half an hour into Search function can save hours or days of waiting for a solution
Reply | Threaded
Open this post in threaded view
|

Re: Update on LibreCad Crashes When Opening File

Rallaz
In reply to this post by ozcad
several things...

1. config file
You can find it in /home/<user>/.config/LibreCAD/LibreCAD.conf

2. crash
If the log is when you load the file mechtute3.dxf the crash is reading/adding header vars, I need more time to investigate.

3. mechtute3.dxf
Is a corrupted dxf file, you can edit it with kwrite or gedit
#line 2 => dxflib 3.1.0.0 seems last saved with qcad3
#line 163 => start section tables without ENDSEC record
#line 1311 =>  presence of *Paper_Space0 BLOCK_RECORD without block definition entry
#line 1379 => starts *Paper_Space block definition without *Model_Space ENDBLK entry.

I edited  mechtute3.dxf file by hand and attached it (mectuto.dxf), you can verify does not crash?
mectuto.dxf
Reply | Threaded
Open this post in threaded view
|

Re: Update on LibreCad Crashes When Opening File

ozcad
Goodness:
    Your "cleaned up" file "mectuto.dxf" can be read by my LibreCad 2.0.0beta1 (Windows version under Wine, compiled 2012, October 29).

Badness:
    LibreCad openSUSE 2.0.0rc1  (Native linux, compiled 2012, September 12) cannot read the same file.
    Note that the Menu -> Help -> Date of this version is older.

Nor can it save any file it has newly created - containing a few simple geometric entities such as lines or circles.
It's a total show-stopper.

Attached:
    My linux "LibreCAD.conf" file, immediately after a crash:

LibreCAD.conf

And yes, the file "mechtute3.dxf" has been edited (and quite happily) with QCAD3.  Being new to the CAD world, I only have a few .DXF files.  At this stage I think I probably need to get some new, small "known to be good" example .DXF files to test with to avoid giving you folks a deceptive trail of clues.

Jim A.
Reply | Threaded
Open this post in threaded view
|

Re: Update on LibreCad Crashes When Opening File

cantcode
on ubuntu12.04
Version: master
SCM Revision: 2.0.0rc1
Compiled on: Jun 27 2013

I can open the corrected file mectuto.dxf .

@ozcad
"Badness:
    LibreCad openSUSE 2.0.0rc1  (Native linux, compiled 2012, September 12) cannot read the same file.
    Note that the Menu -> Help -> Date of this version is older. "

Have you tried to open the file with a newer version of LCad?

"The LibreCad version I download from it is 2.0.0rc1.git20130625-1.1 "
or did you already tried to open the file with that version??
Reply | Threaded
Open this post in threaded view
|

Re: Update on LibreCad Crashes When Opening File

ozcad
Summarising state of things:

1. Current (problematic) version is:
        2.0.0rc1.git20130625-1.1
    from:
        http://librecad.org/cms/home/installation/rpm-packages.html
    ...which is the latest version I know about.

2. Current RPMS installed:
    librecad              2.0.0rc1.git20130625-1.1      => the main program
    librecadparts       2.0.0rc1.git20130625-1.1      => example files (not needed but useful test files)
    libdxfrw0             0.5.9-1.1                             => needed to run LC 2.0.x

3. It will not load any .DXF file, including the example files a3.dxf, screw.dxf, t-part.dxf and tux.dxf

4. It will not save any NEWly created .DXF file.

Total guesswork of course, this seems like a wild pointer problem (access to illegal address),
probably in the dxf support lib (all other LibreCad application-related functions work),
probably involving an innocent-looking conditionally compiled typecast which works for 64 bits but not 32 bits.

I think I may have to chip the rust off my debug/trace skills.  I am boasting of course, I don't have any skills.

Are there any newer versions I could try (preferably an RPM)?
Reply | Threaded
Open this post in threaded view
|

Re: Update on LibreCad Crashes When Opening File

Rallaz
I installed & updated OpenSUSE 12.2-32bits and lubuntu 12.10-32bits into a virtual machine.
Next I installed latest LibreCAD, from daily builds in lubuntu & from http://librecad.org/cms/home/installation/rpm-packages.html in OS.

Same test in both:
1. start LibreCAD
2. open corrupted mechtute3.dxf
3. save to mechtute4.dxf

result: layers attributes are lost, but do NOT crah
attached saved file mechtute4.dxf and a screenshot of opened file in OS-32bits.mechtute4.dxf



Installed packages to use LC in openSuse 12.2 and used versions:
Form librecad:
librecad-2.0.0rc1.git20130625-1.1.i586
librecad-parts-2.0.0rc1.git20130625-1.1.noarch
libdxfrw0-0.5.9-1.1.i586
From main repository:
libmuparser2-2.2.2-2.1.2.i586
libqt4-x11-4.8.1-2.16.1.i586
libqt4-4.8.1-2.16.1.i586
libgcc47-4.7.1_20120723.1.1.1.i586
libstdc++47-4.7.1_20120723.1.1.1.i586
glibc-2.15-22.17.1.i686

1234