Compiling hello world for Icarus distro

muibase · 2610

muibase

  • Newbie
  • *
    • Posts: 26
    • Karma: +65/-0
Reply #15 on: December 28, 2021, 02:44:36 AM
Thanks folks, trying my best to get MUIbase running on AROS.

What is the best way to report bugs?

I found the following one:

A call to fread(buffer, size, 0, file) sets the EOF flag of the file descriptor.  This is because of how AROS/compiler/posixc/fread.c (https://github.com/aros-development-team/AROS/blob/master/compiler/posixc/fread.c) is implemented:

Code: [Select]
   
    else if (cnt == 0 || cnt < nblocks)
    {
stream->flags |= __POSIXC_STDIO_EOF;
    }

The fix would be to change the condition to "else if (cnt < nblocks)" only, or do an early return 0 similar to how it is done in AROS/compiler/stdc/fread.c

Of course, it is easy to work around this by simply not calling fread when there is nothing to be read.




muibase

  • Newbie
  • *
    • Posts: 26
    • Karma: +65/-0
Reply #16 on: December 28, 2021, 04:08:20 AM
Here is the i386-AROS version of MUIbase: https://muibase.sourceforge.io/files/amiga/MUIbase-4.4-i386-aros.lha.  It runs fine under the Icaros AROS version or the i386-linux hosted version.

It would be great to get some feedback from interested folks here before I put this version live.

BTW, I will also publish an AROS version of sqlite-3.34.0-amiga later as MUIbase is build on top of it.



Amiwell

  • Legendary Member
  • *****
    • Posts: 2616
    • Karma: +35/-4
  • Peace
Reply #17 on: December 28, 2021, 04:54:55 AM
thank you work fine




AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3740
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #18 on: December 28, 2021, 05:43:30 AM

It would be great to get some feedback from interested folks here before I put this version live.


I have installed the new MUIBase on my AROS One x86 and it works perfectly.

I created a datatypes descriptor and a def_bbs.info (see screenshot, all demo files are associated to the def_bbs.info)
I started all the Demos at the same time without getting any errors, i would say perfect on AROS.

If you want my icons to be included in your archive I can attach them here, if you want I can also create the icons inDualPNG version OS3 and OS4


muibase

  • Newbie
  • *
    • Posts: 26
    • Karma: +65/-0
Reply #19 on: December 28, 2021, 11:08:40 AM
I have installed the new MUIBase on my AROS One x86 and it works perfectly.

I created a datatypes descriptor and a def_bbs.info (see screenshot, all demo files are associated to the def_bbs.info)
I started all the Demos at the same time without getting any errors, i would say perfect on AROS.

If you want my icons to be included in your archive I can attach them here, if you want I can also create the icons inDualPNG version OS3 and OS4

Thanks for the quick testing.  Regarding icons, I am planning on updating all imagery in an upcoming release and already have a good new set of new PNG icons.

However, can you tell me more about these DualPNG versions for OS3 and OS4?  The installer script still proposes non-PNG icons for OS3 and OS4.  Is there a way to have PNG icons for toese systems now?



AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3740
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #20 on: December 28, 2021, 11:22:38 AM
The OS4.1 icons I created directly on OS 4.1 Emulated with the Icon Editor software, while the AROS One and OS3.9 Icons I created with the same Icon Editor but on OS 3.9 (my AfA One).

If you want to examine them I enclose the package that includes OS4, OS3.9 and AROS One x86/68k icons.





miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #21 on: December 28, 2021, 11:51:22 AM
The OS4.1 icons I created directly on OS 4.1 Emulated with the Icon Editor software, while the AROS One and OS3.9 Icons I created with the same Icon Editor but on OS 3.9 (my AfA One).

If you want to examine them I enclose the package that includes OS4, OS3.9 and AROS One x86/68k icons.

I believe the OS4.1 icons are " fake" OS3.5 Glow Icons with ARGB Data Chunks. DualPNG icons are just two PNG files stacked in a .info file. OS 3.x are typically OS3.5 Glow Icons.
« Last Edit: December 28, 2021, 12:02:02 PM by miker1264 »



muibase

  • Newbie
  • *
    • Posts: 26
    • Karma: +65/-0
Reply #22 on: December 29, 2021, 01:41:15 AM
One other problem/feature I noticed on AROS.  AROS has different semantics w.r.t MUIA_Application_Sleep and newly created windows.

There are 2 differences which I in the following I will call open-window-only and sleep-underflow

open-window-only: In classic MUI (m68k, AOS4, MorphOS) one can create a new window, set the application to sleep and then open the new window, which will not be put to sleep (but all other windows are).  On AROS though the newly created window is also put to sleep.  Classic MUI only sets open windows to sleep whereas AROS seems to also set hidden/closed windows to sleep.

It is easy to work-around this by first setting the application to sleep before creating and opening the new window.

sleep-underflow Classic MUI allows to unsleep the application and windows that weren't put to sleep are still in their no-sleep state.  Said differently, the sleep counter of a window does not drop below 0 when calling MUIA_Application_Sleep, FALSE.  On AROS though it seems this sleep counter underflows, thus when creating and opening a new window and unsleeping the application, the new window is set to sleep.  It gets even more weird when calling MUIA_Application_Sleep, TRUE as this can make a window to get a zero sleep counter and allow user input.

It is possible to work around this by making sure that between every call to MUIA_Application_Sleep, TRUE and MUIA_Application_Sleep, FALSE, no new window is created.  But it is not a trivial one.  Often it is just very convenient to set the whole application to sleep, do whatever changes are necessary, which might include adding new windows, and then unsleep the application.

I just did an audit of all sleep/unsleep calls in MUIbase in order to match the semantics of AROS (see e.e.g this commit: https://sourceforge.net/p/muibase/code/3918).

MUIbase is probably not the only application that runs into this issue, thus, my recommendation would be to change the semantics to how classic MUI does it.  And BTW, both GTK and Qt also work the same way as classic MUI.  In particular the sleep-underflow change would be highly desirable.



deadwood

  • AROS Developer
  • Legendary Member
  • *****
    • Posts: 1524
    • Karma: +118/-0
Reply #23 on: December 29, 2021, 02:33:31 AM
Hi,

Thanks for the report - I created a ticket for it: https://github.com/deadw00d/AROS/issues/51

If you can provide source of smallest possible application triggering these issues, it would make tracking them down easier :)



muibase

  • Newbie
  • *
    • Posts: 26
    • Karma: +65/-0
Reply #24 on: December 29, 2021, 02:22:35 PM
Hi,

Thanks for the report - I created a ticket for it: https://github.com/deadw00d/AROS/issues/51

If you can provide source of smallest possible application triggering these issues, it would make tracking them down easier :)

Done.  I also created a ticket for the fread bug: https://github.com/deadw00d/AROS/issues/52



deadwood

  • AROS Developer
  • Legendary Member
  • *****
    • Posts: 1524
    • Karma: +118/-0
Reply #25 on: December 29, 2021, 02:51:41 PM
Thanks a lot for both reports and test code. I'm finishing some other work right now and then will look into those issues. Can I include your test cases into AROS testing suite? If so, what's the code license?



muibase

  • Newbie
  • *
    • Posts: 26
    • Karma: +65/-0
Reply #26 on: December 29, 2021, 03:51:21 PM
Thanks a lot for both reports and test code. I'm finishing some other work right now and then will look into those issues. Can I include your test cases into AROS testing suite? If so, what's the code license?

Sure you can include this in the testing suite.  I don't have any claims on these little test programs, so feel free to copy&paste and choose whatever license you see fit.



muibase

  • Newbie
  • *
    • Posts: 26
    • Karma: +65/-0
Reply #27 on: December 30, 2021, 02:40:08 AM
I added another issue in https://github.com/deadw00d/AROS/issues/53.  This one is a bit more controversial and I remember I discussed about this a long time ago with some other AROS folks.  The work-around (or let's say more proper use of the MUI API) is quite involved and I am probably not trying to work-around it.



deadwood

  • AROS Developer
  • Legendary Member
  • *****
    • Posts: 1524
    • Karma: +118/-0
Reply #28 on: December 30, 2021, 07:43:27 AM
Ok, got it. This one might take a little longer as I will have to prepare some regression tests.



deadwood

  • AROS Developer
  • Legendary Member
  • *****
    • Posts: 1524
    • Karma: +118/-0
Reply #29 on: January 19, 2022, 12:27:37 PM
Hi All,

All 3 issues reported by Steffen have now been fixed. Thanks goes to Steffen for providing valuable test cases!