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

Re: Access violation when creating class instance

Thread Previous | Thread Next
From:
WFB
Date:
June 25, 2020 07:24
Subject:
Re: Access violation when creating class instance
Message ID:
CAGXvwmfGVOCD74YuQdbauRZJiQ-6E7MW+MMtQeZDHg7aFaexKg@mail.gmail.com
Uh, thanks Will!!

On Thu, 25 Jun 2020 at 01:16, Will Coleda <will@coleda.com> wrote:

> The download page requires an update. You can get 2020.05.1 here:
>
> https://rakudo.org/downloads/star/
>
> On Wed, Jun 24, 2020 at 6:11 AM WFB <wbiker@gmx.at> wrote:
> >
> > Thanks JJ,
> >
> > I am using Rakudostar on Windows and 2020.01 is the current released
> version so far.
> > I will try to reduce the code a bit more but it is just one class
> definition together with an instantiation. Not sure I can pack that in a
> one liner, but will try.
> >
> > The access violation comes probably from C code handling some Windows
> stuff.
> >
> > On Wed, 24 Jun 2020 at 10:13, JJ Merelo <jjmerelo@gmail.com> wrote:
> >>
> >>
> >>
> >> 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