Skip to content

subplot with two pre-loaded images in Julia fails due to failure in region detection of second image. #8878

Closed

Description

@joa-quim

Failure materializes in gmtinit_get_region_from_data() at line 14895

if ((G = GMT_Read_Data (API, GMT_IS_GRID, GMT_IS_FILE, GMT_IS_SURFACE, GMT_CONTAINER_ONLY|GMT_IO_RESET, NULL, file, NULL)) == NULL)
return API->error; /* Failure to read grid header */

when it fails to read the already loaded image object. Concretely, the failure originates in gmtapi_import_image() at line #4927

if (IH->alloc_mode == GMT_ALLOC_EXTERNALLY) return_null (API, GMT_PADDING_NOT_ALLOWED);

because being external image size cannot be changed. However, even if I trick this line with the debugger, which should work because we only want the header, it still arrives at the GMT_Read_Data as non-NULL but everything inside is NULL (where did that F happened? It left gmtapi_import_image as a proper filled pointer.). Impossible to debug such messy paths inside IO where almost everything is void pointers.

Activity

  1. added
    bug
    on Jan 28, 2026
  2. added a commit that references this issue on Jan 29, 2026
    6fb9c95
  3. joa-quim commented on Jan 29, 2026

    @joa-quim
    MemberAuthor

    Add (commented) my (failed) attempt to fix this in #8883

  4. Chuan1937 commented on Feb 20, 2026

    @Chuan1937
    Member

    Merged #8904

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions