Page 1 of 1

MuiRoyal crash on fast AmigaOS 4 HW

Posted: Fri Nov 04, 2022 4:52 pm
by tekmage
Hello Airsoft,

There are two amazing Hollywood applications that use MUIRoyal that crashed on the AmigaOneX5000, One is Pixy, and the other is SQLMan. The MUIRolyal examples run without issue. I have an AmigaOne XE and tested Pixy; it runs just fine. I've asked 6 or 7 different X5000 owners, and they all report the same issue. Some X1000 users have seen the crash, but SAM owners reported no issues.

One of my friends did some work to add debug to codesets.library and we found the crash happens when codesets.library receives a NULL pointer.

Here is an example stack trace from The Grim Reaper:

Code: Select all

 native kernel module newlib.library.kmod+0x00034bc4
    LIBS:codesets.library:LIB_CodesetsConvertStrA()+0x178 (section 1 @ 0x85FC)
    module SYS:Storage/Hollywood/hollywood.RDNZNC/MUIRoyale.hwp at 0x7BF48F74 (section 0 @ 0x9F50)
    module SYS:Storage/Hollywood/hollywood.RDNZNC/MUIRoyale.hwp at 0x7BF5E280 (section 0 @ 0x1F25C)
    module SYS:Storage/Hollywood/hollywood.RDNZNC/MUIRoyale.hwp at 0x7BF60244 (section 0 @ 0x21220)
    module SYS:Storage/Hollywood/hollywood.RDNZNC/MUIRoyale.hwp at 0x7BF611EC (section 0 @ 0x221C8)
    module SYS:Storage/Hollywood/hollywood.RDNZNC/MUIRoyale.hwp at 0x7BF63430 (section 0 @ 0x2440C)
    module SYS:Storage/Hollywood/hollywood.RDNZNC/MUIRoyale.hwp at 0x7BF583D0 (section 0 @ 0x193AC)
    module SYS:Storage/Hollywood/hollywood.RDNZNC/MUIRoyale.hwp at 0x7BF485B4 (section 0 @ 0x9590)
    module SYS:Storage/Hollywood/hollywood.RDNZNC/MUIRoyale.hwp at 0x7BF4E9F8 (section 0 @ 0xF9D4)
    module Pixy at 0x7B776830 (section 0 @ 0x10680C)
    module Pixy at 0x7B77D838 (section 0 @ 0x10D814)
    module Pixy at 0x7B776F20 (section 0 @ 0x106EFC)
    module Pixy at 0x7B773C68 (section 0 @ 0x103C44)
    module Pixy at 0x7B775E30 (section 0 @ 0x105E0C)
    module Pixy at 0x7B775F1C (section 0 @ 0x105EF8)
    module Pixy at 0x7B773958 (section 0 @ 0x103934)
    module Pixy at 0x7B691E0C (section 0 @ 0x21DE8)
    module Pixy at 0x7B7FFE3C (section 0 @ 0x18FE18)
    module Pixy at 0x7B678C68 (section 0 @ 0x8C44)
    module Pixy at 0x7B7FA008 (section 0 @ 0x189FE4)
    module Pixy at 0x7B8B2174 (section 0 @ 0x242150)
    module Pixy at 0x7B8B4CBC (section 0 @ 0x244C98)
    0x61727400 symbol not available
There are times when Pixy does run, but nothing is repeatable, and the crash is very consistent. Any chance you could look at this issue and hopefully find a fix or workaround?

Thank you,
Bill "tekmage" Borsari

Re: MuiRoyal crash on fast AmigaOS 4 HW

Posted: Mon Nov 07, 2022 10:06 pm
by Valiant
I can confirm what Bill has said. On my XE and A1 X1000 Pixy starts and runs just fine, but on my A1 X5000/40 Pixy always crashes as Bill has described. If you need any more info from my system, I'd be more than happy to provide it to whereever you'd like.

Re: MuiRoyal crash on fast AmigaOS 4 HW

Posted: Tue Nov 08, 2022 8:37 am
by jPV
If this is the same bug as I've reported earlier (looks pretty same to me), it can happen on slower setups too. Maybe it just doesn't trigger that easily, but is still there? Or trashes random memory which is more likely to cause visible issues on X5000? In any case I've reproduced it on a very slooow emulation setup, but it isn't reproducible every time and needs more tries to get it triggered.

BTW. can any X5000 owner reproduce the issue with an official Hollywood example like the MUIRoyale / Dynamic2 example? Click around with "Add button" and "Remove button" buttons long enough.

Re: MuiRoyal crash on fast AmigaOS 4 HW

Posted: Tue Nov 08, 2022 4:03 pm
by tekmage
Hey JPV,

I ran Dynamic2 and did the Add/Remove actions a bunch of times. No crash here.

Re: MuiRoyal crash on fast AmigaOS 4 HW

Posted: Wed Nov 16, 2022 6:11 pm
by airsoftsoftwair
Ok, I've debugged this on my X5000 and it seems to be a bug in codesets.library. I've pushed a fix to the codesets.library repository here. And here is a fixed build of codesets.library that can be used until a new version is released.

With my fixed version of codesets.library I can't reproduce the crash any longer so I think this fixes it.

Re: MuiRoyal crash on fast AmigaOS 4 HW

Posted: Fri Nov 18, 2022 1:54 am
by tekmage
Hey airsoftware!

Thank you for looking into this issue. I've been able to deploy your codesets lib and thus far have NOT seen the issue with pixy or any other MUIRoyal app.

I'll ping a few friends so they can also test on their systems.

Cheers,
Bill "tekmage" Borsari

Re: MuiRoyal crash on fast AmigaOS 4 HW

Posted: Tue Aug 13, 2024 9:49 pm
by airsoftsoftwair

Code: Select all

- Fix [OS3/OS4/AROS]: Added workaround for a bug in codesets.library < 6.22 that could cause crashes due
  to memory access faults; the workaround is only used if codesets.library older than 6.22 is installed

Re: MuiRoyal crash on fast AmigaOS 4 HW

Posted: Wed Aug 14, 2024 4:09 pm
by plouf
but if its a bug in codesets, why add a workaround (extra code/size complexity) instead of adding a warning, or even REQUIRE codesets 6.22 as minimun !?

Re: MuiRoyal crash on fast AmigaOS 4 HW

Posted: Sun Aug 18, 2024 9:19 pm
by airsoftsoftwair
plouf wrote: Wed Aug 14, 2024 4:09 pm but if its a bug in codesets, why add a workaround (extra code/size complexity) instead of adding a warning, or even REQUIRE codesets 6.22 as minimun !?
Hmm, yeah, good question. Maybe because it's more user-friendly to be compatible with older versions? ;)