Hi Serkan,
Scan all of the .js files to see if goog.require of ModelLocator is in any of
the files.
The workaround is to do something like this:
Current code: static public var myModelLocator:ModelLocator = new
ModelLocator();
Workaround: static public var myModelLocator:ModelLocator; // leave
uninitialized
Then find the first use of myModelLocator and have the code check it first:
If (myModelLocator == null)
myModelLocator = new ModelLocator();
HTH,
-Alex
From: Serkan Taş <[email protected]>
Reply-To: "[email protected]" <[email protected]>
Date: Friday, November 30, 2018 at 9:19 PM
To: "[email protected]" <[email protected]>
Subject: Re: Work on Emulation
Hi Alex,
1.12.2018 01:31 tarihinde Alex Harui yazdı:
I am also getting the unreachable code in SystemManager, but that shouldn’t
matter right now.
Okay
The TypeError is the current main issue. A problem like that can result in the
following errors. Please make sure you copied the log info correctly. It
looks like some text was cut.
I guess it is completely what i see :
[cid:[email protected]]
Is there a ModelLocator.js file somewhere?
[cid:[email protected]]
Is it in the goog.require list for PinaraUI.js?
Looked in PinaraUI.js, not found.
You might be able to work around the error by initializing that static variable
“later” in the main app.
I am not sure i got what you mean.
Regarding Closure Compiler and memory, make sure you spelled the options
correctly:
https://developers.google.com/closure/compiler/docs/compilation_levels<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdevelopers.google.com%2Fclosure%2Fcompiler%2Fdocs%2Fcompilation_levels&data=02%7C01%7Caharui%40adobe.com%7Cbef1552927504382071408d6574c7efc%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636792383411928494&sdata=d70GlXf3zh4Aqcv9N1UJ%2BOeE6sERkeMPOMbnOwxe704%3D&reserved=0>
I was working with :
https://developers.google.com/closure/compiler/docs/api-tutorial3<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdevelopers.google.com%2Fclosure%2Fcompiler%2Fdocs%2Fapi-tutorial3&data=02%7C01%7Caharui%40adobe.com%7Cbef1552927504382071408d6574c7efc%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636792383411928494&sdata=zuOJXLXnItpuvu9BnXs%2FfG3AUiiEDrYcXUE5zwJq%2B9c%3D&reserved=0>
do you mean "-js-compiler-option SIMPLE_OPTIMIZATIONS" ? Then i guess okay
but check it again.
One last thing to try is to manually determine the commands to Closure Compiler
and try calling it directly from the command-line, but you just might have too
many files. If you can figure out the command-line parameters and get Closure
Compiler to fail without being launched by the Royale Compiler, then you could
ask the Google Closure folks for help.
Needs more work and time.
Otherwise, you will have to reduce the number of files in the main app and move
some to modules.
Sure looks like the easier path, any example or sample to begin, kindly
appreciated.
Thanks,
Serkan
-Alex
From: Serkan Taş
<[email protected]><mailto:[email protected]>
Reply-To: "[email protected]"<mailto:[email protected]>
<[email protected]><mailto:[email protected]>
Date: Friday, November 30, 2018 at 1:39 PM
To: "[email protected]"<mailto:[email protected]>
<[email protected]><mailto:[email protected]>
Subject: Re: Work on Emulation
Hi Alex,
1.12.2018 00:28 tarihinde Alex Harui yazdı:
Hi Serkan,
The error you showed indicates that PinaraUI_mx_managers_SystemManager.js,
mx.managers.SystemManager.js and PinaraUI.js and probably some other files did
get loaded. In theory, depending on your browser settings, you should be able
to test the bin/js-debug code by loading from file://<file:///> instead of
http:// and bypass your embedded server.
I tried but not insisted, you mean that I can test without server, okay i will
go by that way :
Firefox console:
unreachable code after return statement[Daha fazla bilgi al]
SystemManager.js:196:2
TypeError: com.likya.pinara.model is undefined[Daha fazla bilgi al]
PinaraUI.js:272:1
<anonim>
file:///D:/dev/royale-emulation-works/github/bin/js-debug/com/likya/pinara/main/PinaraUI.js:272:1
unreachable code after return statement[Daha fazla bilgi al]
JobListWithDetails.js:522:4
TypeError: this.info(...) is undefined[Daha fazla bilgi al]
SystemManager.js:221:40
mx.managers.SystemManager.prototype.start
file:///D:/dev/royale-emulation-works/github/bin/js-debug/mx/managers/SystemManager.js:221:40
<anonim>
file:///D:/dev/royale-emulation-works/github/bin/js-debug/index.html:1662:44
********************************
And sources generated :
PinaraUI.js (272)
/**
* @private
* @type {com.likya.pinara.model.ModelLocator}
*/
com.likya.pinara.main.PinaraUI.com_likya_pinara_main_PinaraUI_modelLocator_ =
com.likya.pinara.model.ModelLocator.getInstance();
SystemManager.js:221
var /** @type {Array} */ mixinList = this.info()["mixins"];
You will not get a .JS file in bin/js-release until you can find a way to keep
Google Closure Compiler from having that GC overhead error.
I increased memory 6G with -Xmx : failed...
used -XX:-UseGCOverheadLimit : failed
used -js-compiler-option SATANDART_OPTIMIZATIONS and -js-compiler-option
ADVANCED_OPTIMIZATIONS : failed.
I do not know what can i try next :)
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at java.util.HashMap.newNode(Unknown Source)
at java.util.HashMap.putVal(Unknown Source)
at java.util.HashMap.putMapEntries(Unknown Source)
at java.util.HashMap.<init>(Unknown Source)
at
com.google.javascript.jscomp.newtypes.NaivePersistentMap.with(NaivePersistentMap.java:37)
at
com.google.javascript.jscomp.newtypes.TypeEnv.putType(TypeEnv.java:79)
at
com.google.javascript.jscomp.NewTypeInference.envPutType(NewTypeInference.java:4150)
at
com.google.javascript.jscomp.NewTypeInference.updateLvalueTypeInEnv(NewTypeInference.java:3443)
at
com.google.javascript.jscomp.NewTypeInference.analyzeAssignFwd(NewTypeInference.java:1947)
at
com.google.javascript.jscomp.NewTypeInference.analyzeExprFwd(NewTypeInference.java:1520)
at
com.google.javascript.jscomp.NewTypeInference.analyzeExprFwd(NewTypeInference.java:1430)
at
com.google.javascript.jscomp.NewTypeInference.analyzeFunctionFwd(NewTypeInference.java:1036)
at
com.google.javascript.jscomp.NewTypeInference.analyzeFunction(NewTypeInference.java:892)
at
com.google.javascript.jscomp.NewTypeInference.process(NewTypeInference.java:518)
at
com.google.javascript.jscomp.PhaseOptimizer$NamedPass.process(PhaseOptimizer.java:307)
at
com.google.javascript.jscomp.PhaseOptimizer.process(PhaseOptimizer.java:233)
at com.google.javascript.jscomp.Compiler.check(Compiler.java:1084)
at
com.google.javascript.jscomp.Compiler.performChecksAndTranspilation(Compiler.java:884)
at com.google.javascript.jscomp.Compiler.access$000(Compiler.java:102)
at com.google.javascript.jscomp.Compiler$2.call(Compiler.java:818)
at com.google.javascript.jscomp.Compiler$2.call(Compiler.java:815)
at
com.google.javascript.jscomp.CompilerExecutor$2.call(CompilerExecutor.java:93)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
HTH,
-Alex
From: Serkan Taş
<[email protected]><mailto:[email protected]>
Reply-To: "[email protected]"<mailto:[email protected]>
<[email protected]><mailto:[email protected]>
Date: Friday, November 30, 2018 at 1:23 PM
To: "[email protected]"<mailto:[email protected]>
<[email protected]><mailto:[email protected]>
Subject: Re: Work on Emulation
Hi Alex,
http server is embedded and custom and currently can not load dependent files
from index.html automatically. Can just download index.html.
eg. can not load basic.js from \library\closure\goog.
in release folder, there are two files :
index.html
PinaraUI.min.css
so not completed and not minified i guess.
Thanks,
Serkan
1.12.2018 00:03 tarihinde Alex Harui yazdı:
Hi Serkan,
I don’t think I understand. Loading all of these JS files is only during
debugging. Once the JS files are correct, the optimizer in Google Closure
Compiler will generate one JS file. I would not expect the errors you showed
in your last post to be related to HTTP Server. It is more likely due to a
mistake in the order we load the JS files, or a JS files is missing from the
output.
HTH,
-Alex
From: Serkan Taş
<[email protected]><mailto:[email protected]>
Reply-To: "[email protected]"<mailto:[email protected]>
<[email protected]><mailto:[email protected]>
Date: Friday, November 30, 2018 at 12:27 PM
To: "[email protected]"<mailto:[email protected]>
<[email protected]><mailto:[email protected]>
Subject: Re: Work on Emulation
Thanks Alex,
I think at this point i need to modify my java server application.
While using flex, it was easy to define and load small amount of files via the
custom embedded http server.
But for royale, i need to improve the http handler for multiple files loading
automatically from the relative paths. This is the reason of the error, can not
fined the included js files.
This will take sometime. Will come back :)
Serkan.
30.11.2018 23:12 tarihinde Alex Harui yazdı:
What is the code around PinaraUI.js line 272? As you resolve those issues,
more and more of the code should run.
-Alex
From: Serkan Taş
<[email protected]><mailto:[email protected]>
Reply-To: "[email protected]"<mailto:[email protected]>
<[email protected]><mailto:[email protected]>
Date: Friday, November 30, 2018 at 12:06 PM
To: "[email protected]"<mailto:[email protected]>
<[email protected]><mailto:[email protected]>
Subject: Re: Work on Emulation
correction : index.html is created but has some errors.
PinaraUI.js:272 Uncaught TypeError: Cannot read property 'ModelLocator' of
undefined
at PinaraUI.js:272
(anonymous) @ PinaraUI.js:272
SystemManager.js:221 Uncaught TypeError: Cannot read property 'mixins' of
undefined
at PinaraUI_mx_managers_SystemManager.mx.managers.SystemManager.start
(SystemManager.js:221)
at index.html:1662
mx.managers.SystemManager.start @ SystemManager.js:221
(anonymous) @ index.html:1662
30.11.2018 23:03 tarihinde Serkan Taş yazdı:
Hi Alex,
29.11.2018 23:49 tarihinde Alex Harui yazdı:
Hi Serkan,
Look like it is the Google Closure Compiler that is reporting this problem.
Here’s a link to options for JVM:
https://stackoverflow.com/questions/1393486/error-java-lang-outofmemoryerror-gc-overhead-limit-exceeded<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F1393486%2Ferror-java-lang-outofmemoryerror-gc-overhead-limit-exceeded&data=02%7C01%7Caharui%40adobe.com%7Cbef1552927504382071408d6574c7efc%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636792383411938498&sdata=eqOLwGsU9z9YksoxB8M9noUWUfJVyzx%2FW0lbsdIKMXY%3D&reserved=0>
I don’t know if it cares if you use “G” or “g” but the article uses “g”.
I had already tried those in the link but not succeeded. So searching for
alternatives.
You can also try using -js-compiler-options to pass different options to the
Google Closure Compiler, such as SIMPLE_OPTIMIZATIONS. However if you are not
getting any SEVERE errors at this point, you can probably try running the
bin/js-debug/index.html.
Unfortunately the index is generated, broken somewhere in the middle. I am
going to look -js-compiler-options and SIMPLE_OPTIMIZATIONS
In the end, you may need to break up your code into smaller sets of files via
Modules.
I already have some models but i see that still too big for closure to compile,
although i thought it was not.
HTH,
-Alex
Thanks,
Serkan
From: Serkan Taş
<[email protected]><mailto:[email protected]>
Reply-To: "[email protected]"<mailto:[email protected]>
<[email protected]><mailto:[email protected]>
Date: Thursday, November 29, 2018 at 1:48 AM
To: "[email protected]"<mailto:[email protected]>
<[email protected]><mailto:[email protected]>
Subject: Re: Work on Emulation
java.lang.OutOfMemoryError: GC overhead limit exceeded