Open josefwegner opened 6 days ago
It could happen when memory is allocated. Could you check if this version is working under OS4? TuneFinderOS4
Hi Sandlbn,
Thank you for the quick reply. Yes, that new version no longer crashes in OS4.
So, here is the full version that will work for OS4 and should be for OS3 without debug window, but because you have to allocate more than 8MB for some search results under OS3, search results will fail when there are many results. I have to think about how to make it compatible with the 68k subsystem in OS4. TuneFinderOS4
Thanks again for the new version.
What call exactly is crashing? I could check on my X5000 how to make the call work.
What call exactly is crashing
You can check here: https://github.com/sandlbn/TuneFinder/compare/main...OS4 But it is GetOptimalBufferSize
I do not think that allocating the memory is the issue. I could create a 128MB buffer (malloc(32 1024 1024 * sizeof(int))) without any issue. I compiled the test program with vc +aos68k. I suspect the poking of the memory headers might the issue. I will create a test program with your GetOptimalBufferSize method and see where exactly the root cause is.
Maybe allocating that much is unnecessary; I just tested with the initial allocation at 2MB and can search all the stations. It could be that the best is to leave as it looks like optimal value 2 1024 1024;
I just tested it under AOS 3.1, 3.9, and 4.1. My assumption was wrong, as the buffer in the download code can grow up to 64MB.
Thanks for reverting the change. I checked your GetOptimalBufferSize method. Peeking the memory headers on Amiga OS4 will result in an available memory size of 0 and largest size of 0. This means that the function will calculate a buffer size of 0. Allocating zero amount of memory most likely triggers the crash.
You removed the function completely, still I wanted to ask why you peeked the memory headers instead using:
available = AvailMem(MEMF_ANY);
largest = AvailMem(MEMF_ANY|MEMF_LARGEST);
You removed the function completely, still I wanted to ask why you peeked the memory headers instead using:
It is a temporary fix since I have to rewrite and test it properly. AvailMem(MEMF_ANY) will only be used to verify if the network response buffer won't exceed available memory, since it's growing over time. If memory can't be allocated, the request will fail and go to the cleanup.
Hi,
TuneFinder 1.2 crashes when clicking on "Search". The older versions worked fine under OS4.
Maybe this information from GrimReaper helps: