-
-
Notifications
You must be signed in to change notification settings - Fork 645
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
CompilerException java.lang.RuntimeException: Method code too large! when debugging #1699
Comments
Is this happening consistently? What are the functions like? |
@Malabarba yes, consistently with specific (longer) functions. However I am really wondering how is "a long function" defined :) My functions doesn't appears to be particularly large, except if it includes other things that I am not aware in the calculation of the size. Also, do you know if this is something that has to do with the latest version or is this something I didn't encounter before? |
I think only The Source could tell us that. :-)
Macros could make functions much larger than they appear. But it's also unclear to me exactly when that happens.
No, it's always been around. But it's possible that the current version has made the problem worse. |
@Malabarba ok good to know. Do you know what what returns this exception? |
@Malabarba tell me if I am wrong, but probably that the debugger is getting the function's code, and then maybe add stuff to it and then compile it for debugging purposes (this is probably the instrumentalization process). I can buy that this may happen when instrumentalizing relatively large functions. However, I am wondering why this would happen when using a Just a few thoughts, but I didn't look at the Cider code yet. |
Yeah, it's really strange that it happens with Perhaps we can solve this by clearing some of the metadata before evaluation. |
@Malabarba Yeah this is what I thought about
You mean, when doing the instrumentation? I don't think it would even be necessary if we can get |
Yes, that's what I meant. Clearing the metadata might be a way to fix |
@Malabarba sure any time! Thanks. |
@Malabarba any news on this? |
Right, sorry.
See if it solves the issue. |
Method code too large... |
@Malabarba it seems that it helped fixing the issue for one of my function, but I can still experience it in others when using |
I experience this problem on functions containing resource definitions for use with liberator. They are way too long in several places, but no one has had the time to break them up yet. |
@Malabarba did you have some more time to look into this issue? There is another thing I was wondering with the latest version: is it normal that the function's name is not highlighted anymore with |
@fgiasson Sorry, haven't looked further into it yet. Yes, it's normal that this happens. It's a bit of an unfortunate consequence of a recent refactor. I'm not sure how to fix it though. =/ |
Hi @Malabarba Ok thanks for looking, will cross my fingers that you can think of something to improve the situation :) Thanks Fred |
Having same issue with om.next/denormalize* :) |
@ftravers I am not sure if @Malabarba did improve the situation with the latest version, but it happens less often now. The only work around you have when this happens is to refactor your code to create multiple functions (it is these functions that you debug) which may not be a bad thing. But if it doesn't make sense, then you do it anyway just for debugging purposes and revert the changes after. |
Another workaround is to insert |
I have looked at it a bit closer and the problem stems from the instrumentation macros. I start with 70 lines of code which instrumented and macroexpanded (but before the expansion of |
Since version
0.11.0
and still with0.12.0
I am often getting this error message when debugging:CompilerException java.lang.RuntimeException: Method code too large!
Well, the error message is obvious, but I am wondering why it started to happen (never encountered it with version
0.10.0
).I am wondering if this is something new, and what is a function that is too large (how is this defined?).
Also, it will be returned whatever I use
#dbg
,#break
or that instrumentalize the whole function.Any ideas how I could increase the size supported (if possible), or..?
The text was updated successfully, but these errors were encountered: