-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Search crashes on AmigaOS 4 #17
Comments
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. |
You can check here: 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. |
Removed Mem Allocation optimization #17
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:
|
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. |
Memory allocation improved in #36 |
@samo790 @josefwegner Can you test the new memory allocation for the HTTP calls on AOS 4.1? https://drive.google.com/file/d/12jb8GdBhwL8zbGPu3dlkv51s49ixbMeY/view?usp=sharing |
Hallo @sandlbn, |
Improve memory handling in HTTP requests #17
Seems working so far :-) |
Sorry, I had a DSI today. First, I was searching for radio stations in Japan (JP and MP3), and randomly selected three and played them. Then I was searching for Power Metal filtering by Germany and MP3. |
Revert "Improve memory handling in HTTP requests #17"
Hi,
TuneFinder 1.2 crashes when clicking on "Search". The older versions worked fine under OS4.
Maybe this information from GrimReaper helps:
The text was updated successfully, but these errors were encountered: