develooper Front page | perl.perl6.users | Postings from June 2020

Re: Access violation when creating class instance

Thread Previous | Thread Next
From:
JJ Merelo
Date:
June 24, 2020 08:13
Subject:
Re: Access violation when creating class instance
Message ID:
CAJoLtge6rPBeMshuh_PA6ccZBH6zQEB4p2W=5b34rUS-jSTYhQ@mail.gmail.com
El mié., 24 jun. 2020 a las 10:05, WFB (<wolfgang.banaston@gmail.com>)
escribió:

> Hi all,
>
> I have an access violation on Windows for one of my classes and think it
> is a bug, but not entirely sure about that.
>
> Every now and then creating a class instance ended my script with error:
> Process finished with exit code -1073741819 (0xC0000005)
>
> The class looks like that:
>
> class KnowledgeKeeper::Note {
>     has $.title is required;
>     has $.data is required;
>     has @.tags;
>     has @.attachments;
>     has DateTime $.creation-date = DateTime.now;
>     has DateTime $.modification-date = DateTime.now;
> }
>
> I first recognized it when a test just ended without dieing. That happens
> about in 50% of the test runs.
> But I could reproduce it with just a simple line in a script:
>
> #!/usr/bin/env perl6
> use KnowledgeKeeper::Note;
>
> my $note = KnowledgeKeeper::Note.new(title => "dasd", data => "adsad");
> say "OK";
>
> With this script it is not failing that much but at least reproducible:
>
> PS C:\dev\repos\KnowledgeKeeper> raku -Ilib .\bin\test.p6
>                                               OK
> PS C:\dev\repos\KnowledgeKeeper> raku -Ilib .\bin\test.p6
>                                               OK
> PS C:\dev\repos\KnowledgeKeeper> raku -Ilib .\bin\test.p6
>                                               OK
> PS C:\dev\repos\KnowledgeKeeper> raku -Ilib .\bin\test.p6
>                                               OK
> PS C:\dev\repos\KnowledgeKeeper> raku -Ilib .\bin\test.p6
>                                               OK
> PS C:\dev\repos\KnowledgeKeeper> raku -Ilib .\bin\test.p6
>                                               OK
> PS C:\dev\repos\KnowledgeKeeper> raku -Ilib .\bin\test.p6
>                                               OK
> PS C:\dev\repos\KnowledgeKeeper> raku -Ilib .\bin\test.p6
>                                               OK
> PS C:\dev\repos\KnowledgeKeeper> raku -Ilib .\bin\test.p6
>                                               OK
> PS C:\dev\repos\KnowledgeKeeper> raku -Ilib .\bin\test.p6
>                                               OK
> PS C:\dev\repos\KnowledgeKeeper> raku -Ilib .\bin\test.p6
>                                               OK
> PS C:\dev\repos\KnowledgeKeeper> raku -Ilib .\bin\test.p6
>                                               OK
> PS C:\dev\repos\KnowledgeKeeper> raku -Ilib .\bin\test.p6
>                                               OK
> PS C:\dev\repos\KnowledgeKeeper> raku -Ilib .\bin\test.p6
>                                               OK
> PS C:\dev\repos\KnowledgeKeeper> raku -Ilib .\bin\test.p6
>                                               OK
> PS C:\dev\repos\KnowledgeKeeper> raku -Ilib .\bin\test.p6
>                                               OK
> PS C:\dev\repos\KnowledgeKeeper> raku -Ilib .\bin\test.p6
>                                               OK
> PS C:\dev\repos\KnowledgeKeeper> raku -Ilib .\bin\test.p6
>                                      PS C:\dev\repos\KnowledgeKeeper>
> $LastExitCode
>            -1073741819
>
> OS: Windows 10 1909 x64
> Raku: This is Rakudo version 2020.01 built on MoarVM version 2020.01.1
> implementing Perl 6.d.
>
> Should I file a bug?
>

Definitely, yes. Please check first if it's still the same problem with the
latest released version. Also, try to golf it down to the minimal amount of
code that still produces the same result. Does the LastExitCode make any
sense?

-- 
JJ

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About