I know that IMP3 is not so popular for OS4 users, but still, maybe somebody might help me with my issue.
IMP3 is rock solid as long as I do not play any mods. But when I play mods, I get strange crashes and the system freezes.
The crashes/freezes happens only when the current playback of the mod is finished. I added KPrintf calls to the OS4 ptreplay library, and it seems the crashes happen somewhere around the code that unloads the mod.
The strange thing is that the first crash is neither IMP3 nor the ptreplay/ptplay library. The serial output captures a partial crash in CPUDock_idleTask. Then I see another partial crash that is not connected to any other program, but just some raw code in OS4's kernel.
The crashes are also not conneted to the song playing. I noted what song crashed, and replaying the song multiple times does not trigger another crash.
I have heard that other people do not have any issues with mod playback on OS4. Not sure what is different in their system compared to mine.
Accourding to SysMon I have a Creative Labs Sound Core3D / Recon3D / Z-Series with Harald Kanning's hda.audio 6.11 driver.
It does crash eventually, but it can work for hours, before it happens.
I use a modified version of ptplay.library for OS4, with added support for vumeter, maybe that helps, but I do not think IMP3 actually uses that.
No idea, if it’s a async issue, (unloaded, before the vumeter has stopped displaying), or if its caused by different modules, maybe it a playback issue, its hard to say.
you, need to track, what order things is happening, make sure nothing has happened out of order.
also things like non initialized data, can be issue, freeing things that’s already freed, closing unnecessary libraries like dos.library without opening it first, all kind issue can cause crashes over time.
Where it crashes has nothing to do with why it crashes, why it crashes comes from something that should have happened, before or something is not as expected before, the place it crashed, often.
is the pointers and the data valid, at the point of crash. is the code doing what it should.
(NutsAboutAmiga)
Basilisk II for AmigaOS4 AmigaInputAnywhere Excalibur and other tools and apps.
Thank you for you help. Having another pair of eyes is very helpful.
ptreplay.library uses IExec->WaitPort, and the port is valid. It will be released in _PTFreeModInternal (ptreplay_private.c). Something crashes before this code is reached. Also, code is using just one instance of the CMD and DIE message. It is also freed in _PTFreeModInternal.
I do not see where in ptreplay source a double free or usage after free should occur.
I never experienced a crash when skipping a module, only when reaches the end. So, ptreplay library might not be the issue here.
I did not check ptplay sources in detail, but it is much easier and uses no messages at all. And it allocs a MemoryPool at start and releases it at the end.
In any case, I assume that AHI, will play sample for a while, using SendIO(), there can be issue where sample is freed, before AHI has completed the playback, but if that causes corruption, I wont not think so. can cause a freeze.
Edited by LiveForIt on 2025/2/21 6:24:49
(NutsAboutAmiga)
Basilisk II for AmigaOS4 AmigaInputAnywhere Excalibur and other tools and apps.
I'm away from my X5000, running the Apollo V4SA at the moment and I get random freeze with stuttering sound after some time(hours). Hippoplayer with H0ffmans complete library.
All differnt periods of time, but feels like a memoryleek.
But it would be quite silly to find a bug after all this years.
Maybe the hardware is doing something weird that is at fault?
Hippo player uses a different players, or they are integrated, pretty sure its not opening any libraries, except ahi.
Typical Hippo crashes on Digi Booster modules or scream tracker or some not so common modules, some bugs was found in hippo player, and they should be fixed.
it closes dos.library, that’s not problem if dos.library is in rom, as it count be unloaded, but on AmigaOS4.x it does happen on lib count 0. after a while. that bug is fixed.
there was issue with scope, becouse its has its own thread, it was async bug, after while using vometers, that bug was fixed.
So if I was you, I use the latest version it should be a little more stable.
if you find a bug report the issue to github bug tracker.
One thing I can say about the hippo player module players, is that they do hook into some system interrupts. a crash in there will bring down the system.
(NutsAboutAmiga)
Basilisk II for AmigaOS4 AmigaInputAnywhere Excalibur and other tools and apps.
Ready Tasks
HID Joystick (pri 10, sigrec 0x00000000, sigwait 0x80001000, masked 0x00000000)
hid.usbfd (pri 10, sigrec 0x00000100, sigwait 0xE0000000, masked 0x00000000)
TN ShadowNet (pri 5, sigrec 0x00000180, sigwait 0x00000100, masked 0x00000100)
WinFrame 1 Process (pri 5, sigrec 0x00800000, sigwait 0xFF800000, masked 0x00800000)
HOME/smb2-handler 53.7 (pri 5, sigrec 0x80000180, sigwait 0xC0000000, masked 0x80000000)
MUSIC/smb2-handler 53.7 (pri 5, sigrec 0x80000180, sigwait 0xC0000000, masked 0x80000000)
AMIGA_SSH/ssh2-handler 53.12 (pri 5, sigrec 0x80000100, sigwait 0xC0000000, masked 0x80000000)
IDF0/FastFileSystem 53.2 (pri 5, sigrec 0x20000000, sigwait 0xA8000100, masked 0x20000000)
IDF1/FastFileSystem 53.2 (pri 5, sigrec 0x20000000, sigwait 0xA8000100, masked 0x20000000)
compose.task (pri 1, sigrec 0x00000020, sigwait 0x00000021, masked 0x00000020)
Workbench (pri 1, sigrec 0x80000180, sigwait 0x80000000, masked 0x80000000)
ptreplay.library player process (pri 0, sigrec 0x80000100, sigwait 0x00000010, masked 0x00000000)
NotificationServer (pri 0, sigrec 0x04000000, sigwait 0xBC001000, masked 0x04000000)
TuneNetR (pri 0, sigrec 0x00000100, sigwait 0x00000100, masked 0x00000100)
TuneNet (pri 0, sigrec 0x81000100, sigwait 0x00000100, masked 0x00000100)
IMP3 - Debugger (pri 0, sigrec 0x00000100, sigwait 0x00000100, masked 0x00000100)
TCP/IP Control (pri 0, sigrec 0x50000100, sigwait 0xF8009080, masked 0x50000000)
AmiDock (pri 0, sigrec 0x00180000, sigwait 0x00000010, masked 0x00000000)
hub.usbfd (pri 0, sigrec 0x10000000, sigwait 0x30000000, masked 0x10000000)
hub.usbfd (pri 0, sigrec 0x10000000, sigwait 0x30000000, masked 0x10000000)
Clock (pri 0, sigrec 0x02000000, sigwait 0x6E001000, masked 0x02000000)
Calendar (pri 0, sigrec 0x04000000, sigwait 0xDC001000, masked 0x04000000)
TuneNetR (pri -1, sigrec 0x00000100, sigwait 0x00000100, masked 0x00000100)
dos_signal_server (pri -5, sigrec 0x00004000, sigwait 0x0000F000, masked 0x00004000)
ELF Collector (pri -5, sigrec 0x00000100, sigwait 0x00000100, masked 0x00000100)
CPUDock_idleTask (pri -127, sigrec 0x00000000, sigwait 0x40000000, masked 0x00000000)
idle.task (pri -128, sigrec 0x00000000, sigwait 0x00000000, masked 0x00000000)
Waiting Tasks
DH0/NGFileSystem 54.106 (pri 10, sigrec 0x00000100, sigwait 0xF0000000, masked 0x00000000)
DH1/NGFileSystem 54.106 (pri 10, sigrec 0x00000100, sigwait 0xF0000000, masked 0x00000000)
EHCI Controller Task Unit 0 (pri 15, sigrec 0x00000000, sigwait 0xBE009000, masked 0x00000000)
TuneNetR (pri 10, sigrec 0x00000000, sigwait 0x02000000, masked 0x00000000)
ahi.device Unit Process (pri 50, sigrec 0x00000100, sigwait 0xF000C000, masked 0x00000000)
DH0/NGFileSystem 54.106 (pri 10, sigrec 0x00000100, sigwait 0xF0000000, masked 0x00000000)
DH1/NGFileSystem 54.106 (pri 10, sigrec 0x00000100, sigwait 0xF0000000, masked 0x00000000)
EHCI Controller Task Unit 0 (pri 15, sigrec 0x00000000, sigwait 0xBE009000, masked 0x00000000)
P50x0 Ethernet (pri 20, sigrec 0x00000000, sigwait 0x00001000, masked 0x00000000)
sii3114ide.device - chip 0 port 0 (pri 12, sigrec 0x00008000, sigwait 0xC0000000, masked 0x00000000)
rx_pm (pri 100, sigrec 0x00000000, sigwait 0x80000001, masked 0x00000000)
input.device (pri 20, sigrec 0x00000000, sigwait 0x00000010, masked 0x00000000)
CygnusEd ver. 5 (pri 1, sigrec 0x00000100, sigwait 0x4E000000, masked 0x00000000)
vsata disk changer (pri 0, sigrec 0x00000000, sigwait 0x80000000, masked 0x00000000)
ICD1/CDFileSystem 53.8 (pri 10, sigrec 0x00000000, sigwait 0x00000100, masked 0x00000000)
ICD0/CDFileSystem 53.8 (pri 10, sigrec 0x00000000, sigwait 0x00000100, masked 0x00000000)
DH2/SmartFilesystem 1.293 (pri 11, sigrec 0x00000000, sigwait 0x00000100, masked 0x00000000)
CD0/CDFileSystem 53.8 (pri 10, sigrec 0x00000000, sigwait 0x00000100, masked 0x00000000)
serial.device (pri 1, sigrec 0x00000000, sigwait 0x7E000000, masked 0x00000000)
hub.usbfd (pri 0, sigrec 0x08000000, sigwait 0x30000000, masked 0x00000000)
CygnusEd mouse blanker (pri 10, sigrec 0x00000000, sigwait 0x0000F000, masked 0x00000000)
rx_gc (pri 100, sigrec 0x00000000, sigwait 0x80000001, masked 0x00000000)
p50x0sata.device Port 0 (pri 12, sigrec 0x10000000, sigwait 0xC0007000, masked 0x00000000)
dos_filedir_notify (pri 5, sigrec 0x80000000, sigwait 0x40001000, masked 0x00000000)
TN_PlayMasterR (pri 5, sigrec 0x00000000, sigwait 0x0000A001, masked 0x00000000)
TCP/IP Configuration (pri 0, sigrec 0x00000100, sigwait 0xF8003000, masked 0x00000000)
appdir envarc manager (pri -50, sigrec 0x00000000, sigwait 0x80005000, masked 0x00000000)
ramlib.support (pri -2, sigrec 0x00000000, sigwait 0x80005000, masked 0x00000000)
ramlib (pri 1, sigrec 0x00000000, sigwait 0x80001000, masked 0x00000000)
sdkbrowser (pri -1, sigrec 0x00000100, sigwait 0xB4001002, masked 0x00000000)
ClickToFront (pri 21, sigrec 0x00000100, sigwait 0xE000D000, masked 0x00000000)
URL/launch-handler 53.39 (pri 5, sigrec 0x00000100, sigwait 0x80000000, masked 0x00000000)
TEXTCLIP/textclip-handler 53.4 (pri 3, sigrec 0x00000100, sigwait 0x80000000, masked 0x00000000)
RANDOM/Random-Handler 52.1 (pri 5, sigrec 0x00000000, sigwait 0x00000100, masked 0x00000000)
Mounter Task (pri -1, sigrec 0x00000000, sigwait 0xB0001000, masked 0x00000000)
Mounter GUI (pri 0, sigrec 0x00000000, sigwait 0x80007000, masked 0x00000000)
Mounter Companion Process (pri -1, sigrec 0x00000000, sigwait 0x80003000, masked 0x00000000)
Workbench DosList Notify (pri 1, sigrec 0x00000100, sigwait 0x00003000, masked 0x00000000)
CON/con-handler 53.82 (pri 5, sigrec 0x00000000, sigwait 0xA0000100, masked 0x00000000)
Shell Process (pri 0, sigrec 0x00000000, sigwait 0x00000100, masked 0x00000000)
CON/con-handler 53.82 (pri 5, sigrec 0x00000000, sigwait 0xB0000100, masked 0x00000000)
application.library messageserver (pri 0, sigrec 0x00000000, sigwait 0xC0000000, masked 0x00000000)
ScreenBlankerEngine (pri 0, sigrec 0x00000100, sigwait 0xD8001000, masked 0x00000000)
CON/con-handler 53.82 (pri 5, sigrec 0x00000000, sigwait 0xA0000100, masked 0x00000000)
DH2/SmartFilesystem 1.293 (pri 10, sigrec 0x00000000, sigwait 0xE0000100, masked 0x00000000)
ContextMenus Command Dispatcher (pri 1, sigrec 0x00000000, sigwait 0x80001000, masked 0x00000000)
ContextMenus (pri 0, sigrec 0x00000100, sigwait 0xE0001000, masked 0x00000000)
RexxMaster (pri 4, sigrec 0x00000100, sigwait 0xC0000000, masked 0x00000000)
clipview.library server (pri 0, sigrec 0x00000000, sigwait 0xD8003000, masked 0x00000000)
« IPrefs » (pri 0, sigrec 0x00000000, sigwait 0x0000F000, masked 0x00000000)
AsyncWB (pri 0, sigrec 0x00000100, sigwait 0xC0001000, masked 0x00000000)
InfoWB (pri 0, sigrec 0x00000100, sigwait 0xF8001000, masked 0x00000000)
texteditor.gadget Clipboard Server (pri 1, sigrec 0x00000100, sigwait 0x80000000, masked 0x00000000)
select.gadget prefs (pri 0, sigrec 0x00000100, sigwait 0x80001000, masked 0x00000000)
CON/con-handler 53.82 (pri 5, sigrec 0x00000000, sigwait 0xA0000100, masked 0x00000000)
CON/con-handler 53.82 (pri 5, sigrec 0x00000000, sigwait 0xA0000100, masked 0x00000000)
CON/con-handler 53.82 (pri 5, sigrec 0x00000000, sigwait 0xA0000100, masked 0x00000000)
CON/con-handler 53.82 (pri 5, sigrec 0x00000000, sigwait 0xA0000100, masked 0x00000000)
DefIcons (pri 0, sigrec 0x00000100, sigwait 0x80009000, masked 0x00000000)
CON/con-handler 53.82 (pri 5, sigrec 0x00000000, sigwait 0xA0000100, masked 0x00000000)
CON/con-handler 53.82 (pri 5, sigrec 0x00000000, sigwait 0xA0000100, masked 0x00000000)
CON/con-handler 53.82 (pri 5, sigrec 0x00000000, sigwait 0xA0000100, masked 0x00000000)
CON/con-handler 53.82 (pri 5, sigrec 0x00000000, sigwait 0xA0000100, masked 0x00000000)
string.gadget server (pri 1, sigrec 0x00000100, sigwait 0x40000000, masked 0x00000000)
p50x0sata.device Port 1 (pri 12, sigrec 0x10000000, sigwait 0xC0007000, masked 0x00000000)
Workbench Clipboard Server (pri 1, sigrec 0x00000100, sigwait 0x80000000, masked 0x00000000)
TCP/IP Log (pri 0, sigrec 0x00000000, sigwait 0x80003000, masked 0x00000000)
ConClip (pri 0, sigrec 0x00000000, sigwait 0x80000000, masked 0x00000000)
diskimage.device unit 1 (pri 4, sigrec 0x00000100, sigwait 0xC0000000, masked 0x00000000)
diskimage.device unit 0 (pri 4, sigrec 0x00000100, sigwait 0xC0000000, masked 0x00000000)
diskimage.device unit 5 (pri 4, sigrec 0x00000100, sigwait 0xC0000000, masked 0x00000000)
diskimage.device unit 4 (pri 4, sigrec 0x00000100, sigwait 0xC0000000, masked 0x00000000)
camdmidi.usbfd (pri 45, sigrec 0x00000100, sigwait 0x60001000, masked 0x00000000)
Camd Wait Proc (pri 5, sigrec 0x00000000, sigwait 0x80001000, masked 0x00000000)
USB stack Process (pri 0, sigrec 0x00000000, sigwait 0x80001000, masked 0x00000000)
AUDIO/AHI-Handler 6.2 (pri 5, sigrec 0x00000000, sigwait 0x00000100, masked 0x00000000)
APPDIR/appdir-handler 54.17 (pri 5, sigrec 0x00000100, sigwait 0x80000000, masked 0x00000000)
MassStorage Notifier (pri 0, sigrec 0x00000000, sigwait 0x80001000, masked 0x00000000)
DST watcher (pri 0, sigrec 0x00000000, sigwait 0xC0000000, masked 0x00000000)
RAM/ram-handler 54.24 (pri 10, sigrec 0x00000100, sigwait 0x80000000, masked 0x00000000)
ENV/env-handler 54.18 (pri 5, sigrec 0x00000100, sigwait 0x80000000, masked 0x00000000)
CON/con-handler 53.82 (pri 5, sigrec 0x00000000, sigwait 0xA0000100, masked 0x00000000)
RAW/con-handler 53.82 (pri 5, sigrec 0x00000000, sigwait 0xA0000100, masked 0x00000000)
CON/con-handler 53.82 (pri 5, sigrec 0x00000000, sigwait 0xA0000100, masked 0x00000000)
SFS DosList handler (pri 19, sigrec 0x00000000, sigwait 0x80000000, masked 0x00000000)
dos_nbmd_process (pri 5, sigrec 0x00000000, sigwait 0x00001100, masked 0x00000000)
dos_lock_handler (pri 5, sigrec 0x00000000, sigwait 0x00001100, masked 0x00000000)
hub.usbfd (pri 0, sigrec 0x00000000, sigwait 0x30000000, masked 0x00000000)
Exec Command and Control (pri 30, sigrec 0x00000000, sigwait 0x80000000, masked 0x00000000)
DMA2 Channel 4 Handler (pri 0, sigrec 0x00000000, sigwait 0x80001000, masked 0x00000000)
DMA1 Channel 4 Handler (pri 0, sigrec 0x00000000, sigwait 0x80001000, masked 0x00000000)
DMA2 Channel 3 Handler (pri 0, sigrec 0x00000000, sigwait 0x80001000, masked 0x00000000)
DMA1 Channel 3 Handler (pri 0, sigrec 0x00000000, sigwait 0x80001000, masked 0x00000000)
DMA2 Channel 2 Handler (pri 0, sigrec 0x00000000, sigwait 0x80001000, masked 0x00000000)
DMA1 Channel 2 Handler (pri 0, sigrec 0x00000000, sigwait 0x80001000, masked 0x00000000)
DMA2 Channel 1 Handler (pri 0, sigrec 0x00000000, sigwait 0x80001000, masked 0x00000000)
DMA1 Channel 1 Handler (pri 0, sigrec 0x00000000, sigwait 0x80001000, masked 0x00000000)
Suspended Tasks
It is not the sound card, I had the same freezes/crashes also with an ESI @Julia.
Of course it might be another hardware failure (memory, gfx card, mainboard, ...). But a software bug is much more likely as the system is very stable when not playing mods with heavy usage.
BTW: TuneNet is still playing internet radio after a crash ;) Not sure why that part of the OS is still running when the UI is not...
@FlynnTheAvatar I don't know anything about this but according to the crash log it fails in a kernel function when trying to write to some struct pointed to by r5 which in your case is NULL. So I guess it's a NULL pointer dereference error in whatever calls this kernel function. Try using kernel.debug if you don't yet use that to hopefully get some more info on which kernel function this could be and try to find what r5 should contain at that point. You may need to find the beginning of the function in the kernel and disassemble it to see if this is an incoming parameter or something read before the point where it crashes. Attaching a debugger may help, you can go up one level in stack trace and see what it calls which is the beginning of that function and where r5 comes from. But the stack trace does not show any application just libraries and kernel calling each other so this may be something the app passes earlier and cause a crash later when that data is processed.
BTW: TuneNet is still playing internet radio after a crash ;) Not sure why that part of the OS is still running when the UI is not...
If Intuition or something in the graphics subsystem crashes it can lock up the UI and make it appear as if the entire system is frozen, when in fact other tasks that don't interact with the UI are still running normally.
Okay, I captured another crash with the debug kernel, but it does not contain any new information (at least not for me). No information about what kernel method crashed:
[HAL_DfltTrapHandler] *** Warning: Fatal exception in task 0x6919FC30 (AmiDock, etask = 0xEFEC8600) at ip 0x0183B008
kernel 54.30 (1.1.2021) AmigaOne X5000 debug
Machine model: 9 (AmigaOne X5000/20)
Dump of context at 0xEFE33000
Trap type: DSI exception
DSISR: 00800000 DAR: CCCCCCD0
No matching page found
Machine State (raw): 0x0002F030
Machine State (verbose): [Critical Ints on] [ExtInt on] [User] [IAT on] [DAT on]
Instruction pointer: in module kernel.debug+0x0003B008 (0x0183B008)
Crashed process: AmiDock (0x6919FC30)
DSI verbose error description: Access to address 0xCCCCCCD0 not allowed by page protection in user state (protection violation)
Access was a store operation
Exception Syndrome Register: 0x00800000
0: 0184AD54 69BBEEE0 00000002 0220A968 6B68F9D0 0002F030 0236BDCC 0236BE3C
8: CCCCCCCC CCCCCCCC CCCCCCCC 00007428 AA020000 6C11C9F4 6C110000 00000000
16: 00000001 02410000 00000017 00000031 6FFA4070 0200B4CC 0200B4AC 0200B4E4
24: 020000A0 0200B2E4 6919F1B0 02200000 0184AD54 02200000 0220A968 6B68F9D0
CR: 28244824 XER: 00000078 CTR: 0183AF94 LR: 0184AD54
Since I also use imp3 regularly to chat with my friends, I have observed the same behavior. After running imp3, AmiDock freezes without any error message or GR. After using imp3 for a while, AmiDock can be used again without any problems.
I can also confirm the repeated crashes when playing the imp3 mods, it happens randomly and cannot be clearly reproduced.
Since there are already some crash logs here I will not add anything to my post unless it is wanted.
@FlynnTheAvatar
Thank you for describing the problem here and I hope that we can find a solution together.
MacStudio ARM M1 Max Qemu//Pegasos2 AmigaOs4.1 FE / AmigaOne x5000/40 AmigaOs4.1 FE
The error address in the vicinity of 0xCCCCCCCC in the first DSI in post #14 is an important clue. According to the OS4 Wiki, the debug kernel's MUNGE option sets the link pointers in an entry that's being removed from a list to that address.
Accessing the link pointers after an entry has been removed from a list is a common error that can cause intermittent crashes that are very hard to track down. The MUNGE option sets the pointers to 0xCCCCCCCC (an invalid address) to cause programs that do this to crash more consistently.
It appears that IMP3 suffers from this problem. Perhaps not directly, since the DSI is not in IMP3. But IMP3 may pass the removed entry to some system function (AmiDock, apparently) that then crashes when it tries to access it.
I'm not familiar with IMP3. Does it interact with AmiDock when running? In particular, at around the point where the crash occurs? That would be the place to look for a problem with using entries of some sort that have been removed from a list. In post #3 the debug messages you added suggest that the crash happens somewhere in the vicinity of sending and receiving messages. Messages queued at a port are kept in a list, so that's one place to look.
You might also get more information if you set the debuglevel to something higher than 1.
Thank you for you input. No, IMP3 is not interacting with AmiDock. It is a m68k assembler application, so it is not aware of AmiDock at all. And this makes debugging the whole thing so much harder.
@FlynnTheAvatar This now crashes when accessing something pointed to by r10 which is loaded before from r31. If you compare that with 68k registers it's closest to A7 so maybe it comes from that if this is translated code or you have to check the disassembly before this to see where r31 is set and what's supposed to be there. The ptplay.library and ptreplay.library also come up in the crash logs and you say the problem only happens when playing mods so maybe the bug is in this library not in imp3 itself?
Yes, the ptreplay library is still a prime suspect. But I do not know why the (almost) same code is stable on Morphos but crashes on AmigaOS4.
I need to disable more of the library to see if I can see what triggers the corruptions.
Still having an idea what kernel/DOS/Exec function crashes would immensely speed up the troubleshooting.
And AmiDock and/or the CPUInfo dockie have an influence how fast the crashes appear. Without AmiDock I could play Mods for about 10 hours before it crashed.