[Solved] SMA file to big to be compiled? Not enough memory?
Hello,
I spent the last month writing a big counter-strike plugin, well actually I am rewriting it. Anyway that is not neccessary, but what is neccessary is that my plugin is not compiling at all. I have downloaded the latest dev build 1.8.3 git4478 and I am compiling from that. Everytime I compile it, amxxpc.exe stops responding and then I get in the compilation console "Internal error". I simply cannot compile it, however I can still compile other plugins just fine. I tried using the "#pragma dynamic 32768" preprocessor but the result is the same. Here are the details of my SMA file: 10368 lines 293 KB My question is: Is my plugin too big to be compiled? Is there not enough memory? Should I divide my plugin into several smaller plugins? I appreciate any help on the matter. Regards, tony |
Re: SMA file to big to be compiled? Not enough memory?
It's unlikely that you could write enough code to be too big for the compiler. I've actually had this happen on a 'not-so-big' plugin. There was actually something wrong with my code. I recommend that you comment out large blocks of your code to see if you get it to respond (error or not, doesn't matter as long as it responds with something). Then, When it starts responding again, you can narrow it down from what you just commented out.
Of course, the alternative to post your code always exists . . . but I have a feeling that won't happen. |
Re: SMA file to big to be compiled? Not enough memory?
I appreciate your reply, I will do just that altho I have already tried it but not in depth.
As you might have guessed, unfortunately I prefer keeping my code private until its a working stable version. Then at that time I will be releasing it here on alliedmods. I also think posting the code might not help since it's a very large project and I have a feeling no one has the time and patience to debug a 10k lines code for someone else. Hey, I might be wrong, but again I appreciate your reply. EDIT: I have just tried it and nothing changes. Even if I comment the entire file (everything is a comment) the plugin still does not compile and amxxpc.exe just stops responding. Any other ideas? |
Re: SMA file to big to be compiled? Not enough memory?
Then show your code (more attach it as it is). It doesn't matter much your plugin is not in a stable version, you're asking help so do it, so we can test and try to figure out why.
|
Re: SMA file to big to be compiled? Not enough memory?
Alright then you forced me, here you go:
*snip* The code that caused the compiler crash was the following as stated by arkshine below: PHP Code:
|
Re: SMA file to big to be compiled? Not enough memory?
It crashes because of g_strKnifeSounds, you have left a comma for the last item and for some reason compiler doesn't like it. It's dumb, and another stupid compiler bug. It seems to crash only with 3d array with undefined size. I don't remember if it was happening with 1.8.2 compiler, as it could be a side-effect of the update applied in 1.8.3. That's said, I remember SourceMod allowing extra comma in array, like enum, I guess it's worth to check that. Compiler is a bitch.
EDIT: If you are curious how I've found that, I've just compiled compiler in debug mod, then seen an assertion has been triggered inside a function related to array initialization. Then, I've removed all code except declaration, and removed array by array until it doesn't crash. Then seen the extra comma. |
Re: SMA file to big to be compiled? Not enough memory?
Quote:
|
Re: SMA file to big to be compiled? Not enough memory?
Yeah, it has been always allowed for enum, that's why it has been added for array in SM as it doesn't make much sense this to not be allowed. Here, crash seems to happen only for 3d array and with undefined size.
|
Re: SMA file to big to be compiled? Not enough memory?
Oh I see thank you very much for your explanation and your find.
But the thing that did not make sense is why did the compiler crash when I commented the entire code? |
Re: [Solved] SMA file to big to be compiled? Not enough memory?
You probably did not save the code, don't know. But compiler is not going to crash randomly without any code for sure.
|
| All times are GMT -4. The time now is 15:21. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.