CloudCompare crashes when saving LAZ file

If you are allergic to bug trackers, you can post here any remarks, issues and potential bugs you encounter
bidskii
Posts: 6
Joined: Thu Jan 07, 2016 4:12 am

CloudCompare crashes when saving LAZ file

Post by bidskii »

Hi all,

I am trying to segment a LAZ point cloud and then save the segmented section. However, CloudCompare crashes with the following error whenever I try to do so

Code: Select all

CloudCompare: ../qCC/ccQCustomPlot.h:271: virtual void QCPHiddenArea::draw(QCPPainter*): Assertion `x2 >= rect.x()' failed.
Aborted (core dumped)
I clone the git repo today and compiled with liblas support enabled. I am running Ubuntu 14.04 with gcc-5.3.0.

Steps taken to cause problem
1) Open LAZ file.
2) Use segmentation (Edit -> Segment) tool, select a rectangular area of the cloud.
3) Hide remaining sections of the cloud (leaving only the segmented region visible).
4) Highlight (in the DB Tree) the segmented region of the cloud.
5) Save as a LAZ cloud using the original resolution.
6) CloudCompare crashes.

Is this an actual bug or have I done something incredibly stupid?

Regards
Bidski
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: CloudCompare crashes when saving LAZ file

Post by daniel »

Hi,

I just tried on Windows and I couldn't reproduce the issue. But I guess it's probably a GUI/display issue as it involves ccQCustomPlot (it's the component that draws the histogram of the current scalar field in the Properties dialog).

Moreover the crash occurs because of an 'assertion' (assert). This means that you are compiling the project in debug mode? Not sure what will happen in release mode but you would probably avoid this issue (as assertions don't crash in release mode).

Can you test/answer the following:
- does it happen with any LAZ file? And only with LAZ file?
- If you hide the current scalar field (use the 'Colors' field of the Properties dialog) does the crash still occur?
Daniel, CloudCompare admin
bidskii
Posts: 6
Joined: Thu Jan 07, 2016 4:12 am

Re: CloudCompare crashes when saving LAZ file

Post by bidskii »

It appears I was mistaken.
I also had a ASCII point cloud loaded, but since I was saving the LAZ cloud at the time it didn't seem important. However, today it was also crashing when performing the segmentation so it it is likely related to how it is trying to redraw the screen after the segmentation has been performed.

It turns out that the crash is somehow related to segmenting the ASCII point cloud as having this file loaded by itself and segmenting it causes the issue. This also happens regardless of whether or not a scalar field is active.

After recompiling in release mode (I originally just let cmake do whatever its default was) the assertion no longer triggers (although it probably still fails) and the generated results seem reasonable (I am currently unable to verify the exported results, but the visual results look correct).

Sorry for the confusion.
Bidski
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: CloudCompare crashes when saving LAZ file

Post by daniel »

That's a bit weird. The crash always occur on the same assert?

Anyway, thanks for the feedback.
Daniel, CloudCompare admin
bidskii
Posts: 6
Joined: Thu Jan 07, 2016 4:12 am

Re: CloudCompare crashes when saving LAZ file

Post by bidskii »

daniel wrote:That's a bit weird. The crash always occur on the same assert?
Does indeed always appear to be the same assert.
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: CloudCompare crashes when saving LAZ file

Post by daniel »

Just to confirm the issue: can you actually deactivate the scalar field (i.e. by selecting 'None' in the 'Active' drop-down list of the 'Scalar field' section of the properties) and not simply hide the scalar field with the 'Colors' option? Sorry about this.
Daniel, CloudCompare admin
bidskii
Posts: 6
Joined: Thu Jan 07, 2016 4:12 am

Re: CloudCompare crashes when saving LAZ file

Post by bidskii »

daniel wrote:Just to confirm the issue: can you actually deactivate the scalar field (i.e. by selecting 'None' in the 'Active' drop-down list of the 'Scalar field' section of the properties) and not simply hide the scalar field with the 'Colors' option? Sorry about this.
Sorry about the long delay.

I just loaded up an ASCII cloud by itself, and upon selecting the cloud (in the DB tree window under the expanded folder) in order to allow me to deactivate the scalar field the crash occurs.

However, this is not occurring for every ASCII cloud that I have.
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: CloudCompare crashes when saving LAZ file

Post by daniel »

Something is really broken in your compiled version... Maybe Qt? What version are you using?

Otherwise there have been a lot of modifications this past days so it may be worth updating your repo (just in case - and I saw that Luca slightly updated ccQCustomPlot).
Daniel, CloudCompare admin
bidskii
Posts: 6
Joined: Thu Jan 07, 2016 4:12 am

Re: CloudCompare crashes when saving LAZ file

Post by bidskii »

daniel wrote:Something is really broken in your compiled version... Maybe Qt? What version are you using?

Otherwise there have been a lot of modifications this past days so it may be worth updating your repo (just in case - and I saw that Luca slightly updated ccQCustomPlot).
I am using Qt4. I will update my repo and recompile. Will let you know if the problem persists.
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: CloudCompare crashes when saving LAZ file

Post by daniel »

Qt 4.8?
Daniel, CloudCompare admin
Post Reply