question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SIGSEGV when indexing nullable value tuple with value

See original GitHub issue

NEST/Elasticsearch.Net version: 7.6.1/7.7

Elasticsearch version: 7.6.2

Runtime/OS info dotnet 3.1.201 on Mac OS X 10.14.4 (BuildVersion: 18E226)

Description of the problem including expected versus actual behavior:

Indexing a document that contains a property that is a nullable value tuple such as (string info, int number)? with a value that is not null produces a SIGSEGV and the whole application crashes.

Steps to reproduce:

The issue can be reproduced with the following code:

using System;
using Nest;

public class ExampleDoc {
	public (string info, int number)? tupleNullable { get; set; }
}

public class Program {
	public static void Main() {
		var node = new Uri("http://localhost:9200");
		var client = new ElasticClient(new ConnectionSettings(node));
		
		var doc = new ExampleDoc {
			tupleNullable = ("somestring", 42),
		};

                var indexName= "index4";
                client.Indices.Create(indexName, index => index
                        .Map<ExampleDoc>(m => m
                        .AutoMap()
                ));

               client.Index(doc, i => i.Index(indexName));
	}
}

Expected behavior The expected bahavior is to either throw an exception if this usecase is not supported or to successfully index the document

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
russcamcommented, Jun 3, 2020

@xsoheilalizadeh StringValues are not currently supported. It might be best to open a new issue for this to discuss 👍

1reaction
russcamcommented, May 27, 2020

This is now fixed and nullable ValueTuples supported in 7.7.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

Access members of nullable ValueTuple?
To access an item for a Nullable<ValueTuple<>> you should use the Null-conditional operators ?. operator, and the null-coalescing operator ...
Read more >
No warning about null when return default with tuple
The tuple itself is not null -- it cannot be, as it is a value type. Only `tuple.Item1` is null, as it is...
Read more >
What's new in 1.4.0 (January 22, 2022)
Inconsistent date string parsing# · Ignoring dtypes in concat with empty or all-NA columns# · Null-values are no longer coerced to NaN-value in...
Read more >
MySQL bugs fixed by Aurora MySQL database engine ...
Fixed an issue where incorrect AUTO_INCREMENT values were generated when the maximum integer column value was exceeded. The error was due to the...
Read more >
Null Value & is Operator - Advanced Programming ...
The null value; The is operator; The !is operator. We know that a variable of a reference type needs not reference a particular...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found