Jump to page: 1 2 3
Thread overview
weird exception on windows
Dec 14
Kagamin
Dec 15
Kagamin
Dec 15
Kagamin
Dec 15
Kagamin
Dec 15
Kagamin
Dec 15
Kagamin
Dec 16
bauss
Dec 16
Kagamin
Dec 16
Vino
Dec 16
Vino
Dec 18
Mengu
Dec 18
unleashy
December 14
Hi,

I noticed that sometimes on windows this line of code crashes the test suites.

https://github.com/gedaiu/fluent-asserts/blob/master/core/fluentasserts/core/results.d#L1072

This exception can be captured only with a debugger... is it a dmd bug?

```
Thread 25CC created, Entry: mswsock.00007FF9011604C0
EXCEPTION_DEBUG_INFO:
           dwFirstChance: 1
           ExceptionCode: C0000005 (EXCEPTION_ACCESS_VIOLATION)
          ExceptionFlags: 00000000
        ExceptionAddress: 00007FF9055E302C ntdll.00007FF9055E302C
        NumberParameters: 2
ExceptionInformation[00]: 0000000000000000 Read
ExceptionInformation[01]: FFFFFFFFFFFFFFFF Inaccessible Address
First chance exception on 00007FF9055E302C (C0000005, EXCEPTION_ACCESS_VIOLATION)!
```

I think this is related with this issue:
https://github.com/gedaiu/fluent-asserts/issues/63

Can anyone help me with this? I don't even know how to start fixing this issue...

Thanks,
Bogdan

December 14
writeln(fileName);
if (!fileName.exists)
{
  return;
}

:)
December 14
On Thursday, 14 December 2017 at 14:47:25 UTC, Kagamin wrote:
> writeln(fileName);
> if (!fileName.exists)
> {
>   return;
> }
>
> :)

I'm not sure I understand this solution...
December 15
Try printf debugging in case argument is invalid.
December 15
On Friday, 15 December 2017 at 09:24:07 UTC, Kagamin wrote:
> Try printf debugging in case argument is invalid.

ah .. ok ...

I tried to debug the issue and it looks like the filename is valid and there is no null value.

I am thinking that the value is destroyed before it reach the `GetFileAttributesW` or during that call... but I don't see how that is possible.


December 15
You can also try to call `exists` somewhere before this part of code.
December 15
You said tests fail?

class SourceResult
{
	private const
	{
		string file;
		size_t line;
	}
	this(string fileName = __FILE__, size_t line = __LINE__, size_t range = 6) nothrow
	{
		this.file = fileName;
		this.line = line;
		if (!fileName.exists)
		{
			return;
		}
	}
}

unittest
{
	auto result = new SourceResult("test/values.d", 26);
	auto msg = result.file;
}

Does this fail too?
December 15
That said, tempCString code is suspicious:
https://github.com/dlang/phobos/blob/master/std/internal/cstring.d#L221
If unittest-versioned exists calls release-versioned tempCString, it will corrupt the stack. Try to replace 16 with 256 there and recompile your code.
December 15
Maybe this https://issues.dlang.org/show_bug.cgi?id=18084
December 15
On 12/15/17 10:08 AM, Kagamin wrote:
> Maybe this https://issues.dlang.org/show_bug.cgi?id=18084

Thanks for looking into this. I created a PR to fix.

Szabo, can you please try with this patch and see if it fixes your issue?

https://github.com/dlang/phobos/pull/5932

-Steve
« First   ‹ Prev
1 2 3