Bug #518

bug in gmtmath

Added by Mike almost 4 years ago. Updated 6 months ago.

Status:In ProgressStart date:2014-02-14
Priority:NormalDue date:
Assignee:Paul% Done:

20%

Category:-
Target version:Candidate for next bugfix release
Affected version:5.x-svn Platform:Mac OS X

Description

System config: mid-2012 Macbook Air, Mac OS X 10.7.5

gmtmath appears to be unable to compute quantiles in gmt5. Here is a simple example illustrating the bug.

gmt4% gmtmath -T0/100/1 T 99 PQUANT -Sl =
100.000000 99.000000

% gmtswitch gmt5
gmt5% gmtmath -T0/100/1 T 99 PQUANT -Sl =
ERROR: Caught signal number 11 (Segmentation fault) at
0 libgmt.5.dylib 0x000000010a147414 table_PQUANT + 580
1 ? 0x0000000000000038 0x0 + 56
Stack backtrace:
0 libgmt.5.dylib 0x000000010a0192f2 sig_handler + 338
1 libsystem_c.dylib 0x00007fff8fe8acfa _sigtramp + 26
2 ?
0x0000000000000000 0x0 + 0
3 libgmt.5.dylib 0x000000010a14ef45 GMT_gmtmath + 10645
4 libgmt.5.dylib 0x000000010a028092 GMT_Call_Module + 210
5 gmtmath 0x000000010a0105cf main + 799
6 gmtmath 0x000000010a0102a4 start + 52
7 ??? 0x0000000000000007 0x0 + 7

Associated revisions

Revision 12896
Added by Paul almost 4 years ago

Fix issue #518

History

#1 Updated by Paul almost 4 years ago

  • Status changed from New to In Progress
  • Assignee set to Paul
  • Target version set to Candidate for next bugfix release
  • % Done changed from 0 to 20

It happens because info.T→n_records is never set ( == 0). I will fix this tomorrow.

#2 Updated by Paul almost 4 years ago

  • Status changed from In Progress to Resolved

Should be fixed in r12896.

#3 Updated by Mike almost 4 years ago

Yes, it's fixed. Thanks!

#4 Updated by Paul almost 4 years ago

  • Status changed from Resolved to Closed

Great, closing this issue.

#5 Updated by Michael 6 months ago

Hello, I just installed the latest version of GMT on my Mac running El Capitan.

I get a similar error when trying to calculate PQUANT with a 95 setting.

Perhaps I don't have an environment set up properly? Everything else runs OK.

Mike

ERROR: Caught signal number 11 (Segmentation fault) at
0 libgmt.5.4.1.dylib 0x00000001095da3b9 grd_PQUANT + 329
1 ? 0x0000000000000000 0x0 + 0
Stack backtrace:
0 libgmt.5.4.1.dylib 0x00000001093ea023 sig_handler + 579
1 libsystem_platform.dylib 0x00007fff8cc2e52a _sigtramp + 26
2 ?
0x0000000000000000 0x0 + 0
3 libgmt.5.4.1.dylib 0x00000001095c8927 GMT_grdmath + 12695
4 libgmt.5.4.1.dylib 0x00000001093f8da0 GMT_Call_Module + 272
5 gmt 0x00000001093dd1aa main + 1290
6 libdyld.dylib 0x00007fff927c75ad start + 1

#6 Updated by Paul 6 months ago

  • Status changed from Closed to In Progress

Hm, your command works for me but I am doing trunk. Will look at this later - at GSA Meeting so not much time for a few days.

#7 Updated by Joaquim 6 months ago

Works fine for me too both in trunk and 5.3.3 so something else must be going on on your machine (likewise with grdmath issue)

Also available in: Atom PDF