Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.

A bug I'd like to fix

Last updated on 3 months ago
E
ericxjoJunior Member
Posted 3 months ago
Hi! Many, many (many!) years ago I used to code on the Amiga in C and 68k. Now I'm playing with AROS. Back in the day I mostly just played with it, or helped my older brother with his more serious projects (also on Amiga in 68K or C).

Playing with AROS, I do like it quite a lot, but there's a couple of bugs and oddities I'd like to fix. To be straightforward here, I'm not sure I'm up to the task. Partially because I haven't dug into the details of systems like this since I was in my teens -- but in any case -- I do have experience programming in general, programming in C specifically, and programming on Amiga-like machines specifically. So here goes.

There's an odd bug in AROS where, if you put the system under some graphical stress (specifically, running a bunch of demos, either from Extras/Demos or from Extras/DemoEffects -- side note -- I do appreciate an OS that comes preinstalled with lots of cute desktop toys -- thumbs up from me! -- and then drag the Wanderer screen up and down a few times, the system will freeze hard. I have no idea if it's freezing at the kernel level or if it's something in the graphical system. I have turned screen composting off, and any other thing I could find which I could think of as a complication. I have also tried quite a few different combinations of demos. No one demo seems to trigger it. It's triggered when a sufficiency (at least 3, at most 9) demos are running at the same time and you flick the screen up and down rapidly. I am aware that the OS this one is based on did not have any kind of concept of memory protection, and therefore one task can happily corrupt another, or even the OS itself -- but even with that idea in mind -- I'm pretty sure (a solid 65% sureness or so!) that this is a true kernel or graphical subsystem bug.

This bug, which I admit is basically meaningless (I mean, who flicks the screens up and down? For fun?) just irritates me.

So my first question is, how does one approach a bug like this? Is it possible to somehow put the kernel itself under a debugger? How to distinguish if it's the kernel or the graphical subsystem? I'm open to any ideas. Right now I'm so new at this that I'm not even sure what questions to ask. But I think this is a nice, deep-end-of-the-pool issue to jump into.
M
miker1264Software Dev
Posted 3 months ago
It's good that you are familiar with C programming for Amiga. In that respect you will find that AROS system files and structure is very similar. But there are some differences such as Cybergraphx Library and HIDD drivers such as for the Graphics Drivers, and other drivers.

When I first started with trying to program for AROS by updating picture datatypes I had been doing C# programming off and on for 10 years prior to that but I had absolutely no C experience. It was a very difficult time for me for the first 2 years as I learned mostly by trial and fail. But eventually I learned that memory management, string handling and error handling were the basics for C programming. Most errors are related to those categories. So look there first.

As for the problem you have described it could be memory related or it could be due to the graphics driver being faulty. However, it's not conclusive. I would try to narrow down the problem by doing a series of tests that you can set up yourself to isolate the problem further.

Also, you must be aware of which version of AROS you are using for testing. Is it AROS Native or AROS hosted? Are you using Wanderer or Magellan? Is it AROS One x86 or Icaros or Tiny AROS? Which version of system files are being used? Such as AROS One v1.9 or 2.4 or other.

For example several years ago I was testing datatypes on Icaros Desktop Native with Native Nvidia graphics driver installed. It was Icaros v2.0.3 I believe. Quite often I would get memory errors and the system would freeze after a few operations. This happened a lot. I suspected the datatypes were at fault. Especially BMP datatype constantly caused graphics glitches. The BMP images were distorted. Having exhausted all possible explanations I decided to upgrade to Icaros v2.10. Surprise! Everything worked well. The previous version of Icaros was really buggy.

So test the graphics or memory related errors in the same way on Native and Hosted if possible and on different versions of AROS to get a better idea if it's really a problem that can be fixed. But when you get into AROS programming further we need some updated Nvidia graphics drivers.

Happy coding!
D
deadwoodAROS Dev
Posted 3 months ago

ericxjo wrote:

@ericxjo
So my first question is, how does one approach a bug like this? Is it possible to somehow put the kernel itself under a debugger? How to distinguish if it's the kernel or the graphical subsystem? I'm open to any ideas. Right now I'm so new at this that I'm not even sure what questions to ask. But I think this is a nice, deep-end-of-the-pool issue to jump into.


@miker1264 already gave a few good point about isolating the issue. Here are my two cents:

I'd first see if I can repeat this on base system which you can download from here https://axrt.org/downloads-aros to eliminate distribution-specific bugs. If you have hardware with supported video card, I'd check if the bug is present in both VESA and native video drivers mode. In addition I would check if the bug is also present in hosted version (AROS that starts from Linux (or Linux under WSL under Window) (AROS-linux-i386-system.tar.bz2). The reason is that debugging hosted AROS is much easier than debugging native (the one for real hardware or VMs).

The other thing that you can do in parallel is to set up development environment. If you are a Linux user, follow this guide:

https://github.com/deadwood2/AROS/blob/alt-abiv0/INSTALL.md

If you are a Windows user, first setup WSL using first part of this guide:

https://arosnews.github.io/how-to-cross-compile-aros-hosted-wsl/

and then follow the guide I linked above.

In addition in this thread, you will find more developer resources:

https://arosworld.org/infusions/forum/viewthread.php?thread_id=1201

I'm happy to help you onboard to developing AROS. If you have further questions, just post them here or contact me via PM.
You can view all discussion threads in this forum.
You cannot start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You cannot download attachments in this forum.
Users who participated in discussion: deadwood, miker1264, ericxjo
Sign In
Not a member yet? Click here to register.
Forgot Password?
Users Online Now
Guests Online 17
Members Online 0

Total Members: 235
Newest Member: pikewerfer
Member Polls
Should AROSWorld continue with AROS-Exec files (SMF based)?
Yes44 %
44% [12 Votes]
No26 %
26% [7 Votes]
Not sure30 %
30% [8 Votes]