Jump to page: 1 2
Thread overview
Weird bugs in DMD 2.81.0
Jul 07, 2018
solidstate1991
Jul 07, 2018
Seb
Jul 07, 2018
solidstate1991
Jul 07, 2018
Seb
Jul 07, 2018
Basile B.
Jul 10, 2018
Nathan S.
Jul 14, 2018
solidstate1991
Jul 14, 2018
solidstate1991
Jul 14, 2018
Seb
Jul 14, 2018
solidstate1991
Jul 15, 2018
solidstate1991
July 07, 2018
I'll upload code tomorrow, but here's the premise:

Sometimes elements disappear from associative arrays, causing all sorts of errors down the line, mostly access violations.

My engine (PixelPerfectEngine) has a style sheet for its GUI, which generates basic values upon construction. This works mostly fine with PixelPerfectEditor, however WindowMaker crashes instantly when it needs to redraw anything. Both Mago and VS debugger were bit broken (first exception came from KernelBase.dll, then it only showed the caller of a getter function possibly caused the issue), but I managed to get enough information. The AA containing color indexes (ushort[string]) couldn't be accessed properly and when I tried the safe get method on it, a lot of values couldn't be accessed and later on a dynamic array had issues with access violation.

I'm thinking on going back to 2.080.0 until this bug gets fixed.
July 07, 2018
On Saturday, 7 July 2018 at 02:21:31 UTC, solidstate1991 wrote:
> I'll upload code tomorrow, but here's the premise:
>
> Sometimes elements disappear from associative arrays, causing all sorts of errors down the line, mostly access violations.
>
> [...]

I'm sorry but without code there's not much we can do for you.
However, one thing we can try is to get your project on the project tester once this regression is fixed.
July 07, 2018
On Saturday, 7 July 2018 at 02:21:31 UTC, solidstate1991 wrote:
> I'll upload code tomorrow, but here's the premise:
>
> Sometimes elements disappear from associative arrays, causing all sorts of errors down the line, mostly access violations.

Hello, what you describe makes me think to what happens when the GC phagocytes managed members of aggregates that are not on the GC heap. By any chance are the AA values classes allocated with a custom allocator ?

July 07, 2018
On Saturday, 7 July 2018 at 07:31:29 UTC, Seb wrote:
>
> I'm sorry but without code there's not much we can do for you.
> However, one thing we can try is to get your project on the project tester once this regression is fixed.

https://github.com/ZILtoid1991/pixelperfectengine

Just did a commit recently. PixelPerfectEditor runs as it should (unfinished, but most drawing algorithms work), under WindowMaker, some stuff just disappear from AA.

Patching "PixelPerfectEngine.concrete.stylesheet"'s StyleSheet.getColor to the following reveals that some elements may have disappeared from the AA:

public ushort getColor(string colorName){
	return color.get(colorName,0);
}

Also tested with an LDC, which is based on 2.80.1, and the same anomaly still happens.
July 07, 2018
On Saturday, 7 July 2018 at 17:07:42 UTC, solidstate1991 wrote:
> On Saturday, 7 July 2018 at 07:31:29 UTC, Seb wrote:
>>
>> I'm sorry but without code there's not much we can do for you.
>> However, one thing we can try is to get your project on the project tester once this regression is fixed.
>
> https://github.com/ZILtoid1991/pixelperfectengine
>
> Just did a commit recently. PixelPerfectEditor runs as it should (unfinished, but most drawing algorithms work), under WindowMaker, some stuff just disappear from AA.
>
> Patching "PixelPerfectEngine.concrete.stylesheet"'s StyleSheet.getColor to the following reveals that some elements may have disappeared from the AA:
>
> public ushort getColor(string colorName){
> 	return color.get(colorName,0);
> }
>
> Also tested with an LDC, which is based on 2.80.1, and the same anomaly still happens.

Sure, I will make a PR for it later, but we can't do much more than running `dub test` or whatever testing commands you use for Travis.
So if this isn't covered by your testsuite, it won't help much for this specific issue.
July 09, 2018
On 7/6/18 10:21 PM, solidstate1991 wrote:
> I'll upload code tomorrow, but here's the premise:
> 
> Sometimes elements disappear from associative arrays, causing all sorts of errors down the line, mostly access violations.
> 
> My engine (PixelPerfectEngine) has a style sheet for its GUI, which generates basic values upon construction. This works mostly fine with PixelPerfectEditor, however WindowMaker crashes instantly when it needs to redraw anything. Both Mago and VS debugger were bit broken (first exception came from KernelBase.dll, then it only showed the caller of a getter function possibly caused the issue), but I managed to get enough information. The AA containing color indexes (ushort[string]) couldn't be accessed properly and when I tried the safe get method on it, a lot of values couldn't be accessed and later on a dynamic array had issues with access violation.
> 
> I'm thinking on going back to 2.080.0 until this bug gets fixed.

FYI there have been a lot of recent changes on druntime that have to do with hashing. It's possible something changed that affects you.

Having code that reproduces the issue would be super-useful. If it's specifically to do with AA, it should be easily reduced -- just recreate the AA in a minimal app and show how it's missing data.

-Steve
July 10, 2018
On Monday, 9 July 2018 at 19:31:52 UTC, Steven Schveighoffer wrote:
> FYI there have been a lot of recent changes on druntime that have to do with hashing. It's possible something changed that affects you.

None of the recent changes ought to affect `ushort[string]` since it hashes its keys using `rt.typeinfo.ti_Ag.TypeInfo_Aa.getHash` which hasn't been touched. If https://github.com/dlang/druntime/pull/2243 is accepted the `TypeInfo.getHash` hashes of various strings would change but this shouldn't cause inability to lookup keys in a builtin AA.
July 14, 2018
On Saturday, 7 July 2018 at 02:21:31 UTC, solidstate1991 wrote:
> I'll upload code tomorrow, but here's the premise:
>
> Sometimes elements disappear from associative arrays, causing all sorts of errors down the line, mostly access violations.
>
> My engine (PixelPerfectEngine) has a style sheet for its GUI, which generates basic values upon construction. This works mostly fine with PixelPerfectEditor, however WindowMaker crashes instantly when it needs to redraw anything. Both Mago and VS debugger were bit broken (first exception came from KernelBase.dll, then it only showed the caller of a getter function possibly caused the issue), but I managed to get enough information. The AA containing color indexes (ushort[string]) couldn't be accessed properly and when I tried the safe get method on it, a lot of values couldn't be accessed and later on a dynamic array had issues with access violation.
>
> I'm thinking on going back to 2.080.0 until this bug gets fixed.

I found a temporary workaround. Basically I just save the content of the AA, then reapply it after the application's constructor finished, before that it always generated an exception when I tried to check its content e.g. via printing it to the screen. The program still crashes when I close it, and it seems like it's something GC related, which will be extremely hard to reproduce. I'm going to make a commit soon to Github (maybe even an alpha release), so people can check it out for themselves.
July 14, 2018
On Saturday, 14 July 2018 at 00:58:08 UTC, solidstate1991 wrote:
> I found a temporary workaround. Basically I just save the content of the AA, then reapply it after the application's constructor finished, before that it always generated an exception when I tried to check its content e.g. via printing it to the screen. The program still crashes when I close it, and it seems like it's something GC related, which will be extremely hard to reproduce. I'm going to make a commit soon to Github (maybe even an alpha release), so people can check it out for themselves.

The AA issue still happens when I disable the GC.

What happens if I accidentally write into the memory space of an AA? Might be a pointer-overflow related issue I messed up, which will be a hell of a ride to find.
July 14, 2018
On Saturday, 14 July 2018 at 01:27:03 UTC, solidstate1991 wrote:
> On Saturday, 14 July 2018 at 00:58:08 UTC, solidstate1991 wrote:
>> I found a temporary workaround. Basically I just save the content of the AA, then reapply it after the application's constructor finished, before that it always generated an exception when I tried to check its content e.g. via printing it to the screen. The program still crashes when I close it, and it seems like it's something GC related, which will be extremely hard to reproduce. I'm going to make a commit soon to Github (maybe even an alpha release), so people can check it out for themselves.
>
> The AA issue still happens when I disable the GC.
>
> What happens if I accidentally write into the memory space of an AA? Might be a pointer-overflow related issue I messed up, which will be a hell of a ride to find.

Any chance you can make a minimal, reproducible example of this?
Would be great because then it can be put on bugzilla and other people can have a look at it too.
« First   ‹ Prev
1 2