Skip to content
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

Program warns about too small stack size (8192) if starting from Workbench #12

Closed
gustavosarmento opened this issue Mar 10, 2024 · 18 comments
Assignees
Labels
bug Something isn't working question Further information is requested

Comments

@gustavosarmento
Copy link

Title says it all, basically.

AmigaGPT 1.4.3
Kickstart 47.111
Workbench 47.4
narrator.device v34 and v37 on correct places
translator.library 43.1
Amiga 1200/TF1260/128 MB Fast RAM

Copy link

Welcome! Thanks for submitting your first AmigaGPT issue! Your issue will be looked at ASAP. <3

@sacredbanana sacredbanana self-assigned this Mar 18, 2024
@sacredbanana sacredbanana added the bug Something isn't working label Mar 18, 2024
@sacredbanana
Copy link
Owner

Sorry about that, I didn't set the stack size in AmigaGPT's .info file to the recommended 32768 bytes. I will fix that in the next version. In the meantime, you can easily fix this by selecting AmigaGPT's icon, then in the right click menu, go to the Icons menu then select Information. In the information panel select the Icon tab then set the stack to 32768 bytes. When you hit save it will use this new stack size from now on.

image

@gustavosarmento
Copy link
Author

Tried your solution, but unfortunately the error message persists.

@sacredbanana
Copy link
Owner

sacredbanana commented Mar 19, 2024

If you go back to the information panel again, does it still show 32768?

Does the warning message always report your stack to be 8192 bytes?

Another thing you can try is in your Prefs folder, open Workbench prefs and set stack size in there to 32kb or higher

@sacredbanana sacredbanana added the question Further information is requested label Mar 19, 2024
@gustavosarmento
Copy link
Author

Yes, 32768 if coming back to the Information panel.

The warning message always reports that my stack is 8192 bytes (only once it reported 8448 bytes, but I couldn't reproduce it since), and my Workbench Prefs was originally set to a 4 KB stack (this being the default, I assume). Setting it to 32 KB or more doesn't change the error.

@sacredbanana
Copy link
Owner

what about if you execute it via the Shell before typing in the command STACK 32768?

@gustavosarmento
Copy link
Author

...then it runs with no warnings.

@sacredbanana
Copy link
Owner

Ok odd. For some reason your workbench is both ignoring the icon stack size and also the internal stack cookie. Have you updated your AmigaOS with the 2 update files to AmigaOS 3.2.2?

@gustavosarmento
Copy link
Author

Yep, I'm on Workbench 3.2.2.1. And I don't use any third-party "performance patches" or "eye candy", trying to avoid such strange compatibility issues.

@sacredbanana
Copy link
Owner

Try the new 1.4.4 release and let me know if it still happens

@gustavosarmento
Copy link
Author

Forgot to mention on my last reply that I was already on 1.4.4.

Unfortunately, the issue persists. I'm starting to wonder if it isn't something on my setup, as clean as it may seem...

@sacredbanana
Copy link
Owner

it weird because it works fine for me (on my MiSTer and in AmiKit)

@gustavosarmento
Copy link
Author

Apparently, PeterK on EAB Board found the issue. Says him:

"AmigaGPT seems indeed to have a bug. When reading the stack size from its tool icon it divides the size by 4 by mistake! So, for an entry of 32768 it just sees 8192 bytes of stack.

When I tried 140000 for the stack setting AmigaGPT didn't complain anymore, but 131072 should also work (not tested)."

@gustavosarmento
Copy link
Author

Just tested here, and indeed: 131072 of stack size gives no warning. Reducing to 130048 already warns that "a stack size of 32512 bytes is too small".

@sacredbanana
Copy link
Owner

I added a print statement to read out the stack size. When launching from the tool icon (which is set to 32768) it does indeed have 32768 bytes in stack and also does not show the warning for me. Also tested setting custom stack in CLI when launching from the shell.

image

@gustavosarmento
Copy link
Author

Can I reproduce these steps here on my system?

@gustavosarmento
Copy link
Author

Turns out, PeterK went onto great lengths to find that, indeed, the bug is on AmigaGPT's code. Two posts worth noting:

https://eab.abime.net/showpost.php?p=1676793&postcount=13

https://eab.abime.net/showpost.php?p=1676804&postcount=14

@sacredbanana
Copy link
Owner

Thanks for your assistance with this issue. I have now fixed it in version 1.4.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants