oft-countpix.pl - Segmentation fault (core dumped) - Ubuntu 14.04 Virtual Machine

  • Asked
  • Active
  • Viewed 14257 times
0

Dear Colleagues,

I am trying to use the oft-countpix.pl application to count pixel in a *.tif raster. The raster is 24MB in size and I am running the command within a virtual machine (ubuntu 14.04) hosted on a windows 7 machine. The raster of interest is created using the gdal_calc.py function and represents a land cover class. To reduce the size of the output from gdal_calc.py I have used LZW compression. The command used is

oft-countpix.pl temp.tif 1

After a couple of minutes I receive the following error:

wesley@wesley-VirtualBox:~/rasterData$ oft-countpix.pl temp.tif 1 Segmentation fault (core dumped) cat: /tmp/histtempZ4g/temp_hist.txt: No such file or directory

Any help on the matter would be greatly appreciated.

Wesley

0

Accepted answer

Dear Wesley,

oft-countpix.pl calls oft-his which seems to crash for some reason.

Can you try to produce the histogram running oft-his from the command line?

AP

0

Accepted answer

Dear AP,

oft-his also returns a Segmentation fault. This time however the Segmentation fault is preceded by a message indicating "Memory allocation problem...will use an alternative method".

The file I am testing the application on is 24MB. The virtual machine I am using has only 2GB of memory. Could this be the problem?

Regards, Wesley

0

Accepted answer

Thanks Wesley,

yes that's probably the reason. However, oft-his should never crash.

Can you run of-mm and let us know the reported min and max values as well as the maxval parameter you've used (if any), please.

Best,

AP

0

Accepted answer

Hi AP,

oft-mm returns Band 1 min = 0.000000 Band 2 max = 1.000000

The temp.tif file does contain nan's if that makes a difference.

Regards, W.

0

Accepted answer

Thanks Wesley,

seems that the problem was with the initialization of the allocate (large) array. I have fixed that now and will release a new installer as soon as we've finalized the testing of the new version.

Many thanks for reporting!

AP

Your answer

Markdown text. Shortcuts: Ctrl+B bold, Ctrl+I italic, Ctrl+K link, Ctrl+E code, Ctrl+Shift+V paste as plain text. Tab indents list items and code; press Escape, then Tab, to leave the text box.

Insert an image

Say what the image shows, for people who can't see it.

Keyboard shortcuts

Anywhere

?
Show this list
/
Search
g h
Go to the home page
g q
Go to the questions
g t
Go to the tags
g u
Go to the users
a
Ask a question

Lists of questions

j k
Next or previous question
Enter
Open the question

Question pages

j k
Next or previous post

Shortcuts never apply while you type in a text field. Members can turn them off in their preferences.