Closed GoogleCodeExporter closed 9 years ago
Could you post the line generated by Mvp4g that creates this error? Do you have
a method with a lot of parameters?
Original comment by plcoir...@gmail.com
on 18 Aug 2010 at 10:23
I have an event bus with a lot of events
When I run my application in hosted mode, on my developer's console I've got
error:
[ERROR] Errors in
'generated://B098917E78CA07F533B9EE7BC2A89A62/com/mvp4g/client/Mvp4gModuleImpl.j
ava'
[ERROR] Line 1554: Too many synthetic parameters, emulated parameter
val$userShowPresenter is exceeding the limit of 255 words eligible for method
parameters
The "val$userShowPresenter" parameter is the first event's invocation in event
bus, which exceeds the limit of 255 parameters.
Original comment by michal.k...@gmail.com
on 20 Aug 2010 at 7:07
How many events do you have? At work, I have an event bus with 50-100 events
and it works fine. Could you send me the Mvp4gModuleImpl file that is generated?
Thanks
Original comment by plcoir...@gmail.com
on 23 Aug 2010 at 7:13
You're right, when you have less than 255 events in eventBus everything works
fine. Try to build an eventBus with more than 255 events.
Original comment by michal.k...@gmail.com
on 25 Aug 2010 at 7:27
Does this mean, that one eventBus can not have more than 255 events or the hole
application with all modules?
At the moment I am developing an application that will have more than 255
Events in the main module. Then every module will have 5 - 10 Events.
Can this issue solved? Or do I have to reduce the number of events? It's
possible, but than I have to generialze the events and every presenter has to
check this events. Not nice.
Original comment by frank.hossfeld
on 25 Aug 2010 at 10:55
I've tested it on one-module application with one event bus. I think the limit
relates only to event bus. One of the solution is to divide entire application
into submodules with "smaller" event buses. But I would like to avoid this...
Original comment by michal.k...@gmail.com
on 25 Aug 2010 at 12:00
I "google" a little bit, search for "is exceeding the limit of 255 words
eligible for method parameters" and found this:
"Well you're breaking the VM specification, section 4.10:
The number of method parameters is limited to 255 by the definition of a method descriptor (§4.3.3), where the limit includes one unit for this in the case of instance or interface method invocations. Note that a method descriptor is defined in terms of a notion of method parameter length in which a parameter of type long or double contributes two units to the length, so parameters of these types further reduce the limit.
I suggest you overcome the obstacles in changing the generated code... I'm
pretty surprised it works on Linux, to be honest. I wouldn't be entirely
surprised if the bytecode it generated was strictly invalid, and it just
happens to be working for you at the moment.
While it's always tempting to try to find ways of keeping with the existing
code and ignoring the limits, I think in this case you should turn your
attention to reducing the number of parameters immediately."
(found at stackoverflow)
May be, that's the problem.
It seems, that this problem only happens when working with Windows. The Authors
wrote, that it not happen on Linux.
Original comment by frank.hossfeld
on 25 Aug 2010 at 12:13
It seems they refer to the number of parameters but not the number of methods.
Mvp4g creates a new method for each event but there is not a method where a
parameter is added for each event. I'm going to look into it to have a better
idea where the problem can come from.
Original comment by plcoir...@gmail.com
on 25 Aug 2010 at 1:20
I created a simple project with 300 events (each event having one parameter, a
string, and one handler) and it worked fine. I attached this project.
Could it be a configuration problem? I'm using GWT 2.0.4, Jdk 1.6.0_18 & Window
7. Would you mind trying the project I attached (it's an eclipse, you can just
import it and run it right away) and let me know if you have the same error?
Thanks,
Pierre
Original comment by plcoir...@gmail.com
on 25 Aug 2010 at 10:09
Attachments:
I checked the project and had no problems. (OS X 10.6.4, JDK 1.6, GWT 2.1M2).
Michal's problems is not related to mvp4g. That's good news!
Thx,
Frank
Original comment by frank.hossfeld
on 26 Aug 2010 at 5:59
I tested the project too and it works for me in production mode as well as in
dev mode. I will be searching a reason of problem in my local configuration.
Thank you very much for help!
Original comment by michal.k...@gmail.com
on 31 Aug 2010 at 7:32
Thank you both for the validation
Original comment by plcoir...@gmail.com
on 1 Sep 2010 at 1:45
I'm closing this bug since we couldn't reproduce it with a basic example but
let me know if the error you have could come from Mvp4g. Thanks
Original comment by plcoir...@gmail.com
on 13 Sep 2010 at 5:12
Original issue reported on code.google.com by
michal.k...@gmail.com
on 18 Aug 2010 at 6:21