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

Loggers (in executable jar, or in Eclipse) #42

Open
FAMILIAR-project opened this issue Nov 5, 2014 · 3 comments
Open

Loggers (in executable jar, or in Eclipse) #42

FAMILIAR-project opened this issue Nov 5, 2014 · 3 comments
Assignees
Labels

Comments

@FAMILIAR-project
Copy link
Owner

When an operation relying on BDD (javabdd) is launched, like counting, the program stops and raises an exception...
The verbose mode suggests that something goes wrong with the "loggers"
(see below: 13249 [main] DEBUG miliar.parser.FMLCommandInterpreter - Closing loggers temporary)

If I well remember, there is a subtle hack over JavaBDD library since this library has an improper management of loggers... The hack (to be confirmed) consists in temporarily redirecting the output to a silent mode.
We need to investigate more.

FAMILIAR (for FeAture Model scrIpt Language for manIpulation and Automatic Reasoning) version 1.1 (beta)
http://familiar-project.github.com/
fml> fm1 = FM (A : [b] C [de]; )
fm1: (FEATURE_MODEL) A: [de] [b] C ;
fml> counting fm1

Exception: java.lang.StackOverflowError thrown from the UncaughtExceptionHandler in thread "main"
macher-wifi:familiar.standalone macher1$ java -Xmx014M -jar target/FAMILIAR-Standalone-1.0.10-jar-with-dependencies.jar --verbose
0 [main] DEBUG fr.familiar.interpreter.FMLShell - Launching FAMILIAR
DEBUG: Loading prompt.
FAMILIAR (for FeAture Model scrIpt Language for manIpulation and Automatic Reasoning) version 1.1 (beta)
http://familiar-project.github.com/
fml> fm1 = FM (A : [b] C [de]; )
3920 [main] DEBUG fr.familiar.interpreter.FMLShell - FAMILIAR: fm1 = FM (A : [b] C [de]; )
DEBUG: (Info cmd) fm1 = FM (A : [b] C [de]; )
3920 [main] DEBUG miliar.parser.FMLCommandInterpreter - resourseSet creation...
3923 [main] DEBUG miliar.parser.FMLCommandInterpreter - resourseSet=org.eclipse.xtext.resource.SynchronizedXtextResourceSet@b7e7be4 resources=[]
4099 [main] DEBUG miliar.parser.FMLCommandInterpreter - resourseSet options loaded + resource dummy...
4099 [main] DEBUG miliar.parser.FMLCommandInterpreter - resource=org.eclipse.xtext.linking.lazy.LazyLinkingResource@286d11a4 uri='dummy:/example1005924087.fml'
4262 [main] DEBUG miliar.parser.FMLCommandInterpreter - resourse loaded...
4266 [main] DEBUG miliar.parser.FMLCommandInterpreter - model: org.xtext.example.mydsl.fML.impl.FamiliarScriptImpl@c6d625b (eProxyURI: dummy:/example1005924087.fml#/)
4266 [main] DEBUG miliar.parser.FMLCommandInterpreter - parsing: org.xtext.example.mydsl.fML.impl.ScriptCommandImpl@61544abc (eProxyURI: dummy:/example1005924087.fml#//@cmds.0)
4266 [main] DEBUG miliar.parser.FMLCommandInterpreter - parsing: complex command org.xtext.example.mydsl.fML.impl.ComplexCommandImpl@37362188 (eProxyURI: dummy:/example1005924087.fml#//@cmds.0/@cmd) with var=fm1
4266 [main] DEBUG miliar.parser.FMLCommandInterpreter - No longer possible to declare parameters
4266 [main] DEBUG miliar.parser.FMLCommandInterpreter - Number of arguments (0) or parammeters (0) is correct.
4306 [main] DEBUG miliar.parser.FMLCommandInterpreter - assignment: fm1 = 1856130502
4307 [main] DEBUG miliar.parser.FMLCommandInterpreter - variable fm1 does not exist: fr.familiar.interpreter.VariableNotExistingException: variable fm1 does not exist
4307 [main] DEBUG miliar.parser.FMLCommandInterpreter - Creation needed
4311 [main] DEBUG fr.familiar.interpreter.FMLShell - (DISPLAYING) fm1: (FEATURE_MODEL) A: [de] [b] C ;

fm1: (FEATURE_MODEL) A: [de] [b] C ;
fml> counting fm1
13240 [main] DEBUG fr.familiar.interpreter.FMLShell - FAMILIAR: counting fm1
DEBUG: (Info cmd) counting fm1
13241 [main] DEBUG miliar.parser.FMLCommandInterpreter - resourseSet options loaded + resource dummy...
13241 [main] DEBUG miliar.parser.FMLCommandInterpreter - resource=org.eclipse.xtext.linking.lazy.LazyLinkingResource@23ce7dc3 uri='dummy:/example1505159334.fml'
13247 [main] DEBUG miliar.parser.FMLCommandInterpreter - resourse loaded...
13247 [main] DEBUG miliar.parser.FMLCommandInterpreter - model: org.xtext.example.mydsl.fML.impl.FamiliarScriptImpl@662566bd (eProxyURI: dummy:/example1505159334.fml#/)
13248 [main] DEBUG miliar.parser.FMLCommandInterpreter - parsing: org.xtext.example.mydsl.fML.impl.ComplexCommandImpl@217c36af (eProxyURI: dummy:/example1505159334.fml#//@cmds.0)
13248 [main] DEBUG miliar.parser.FMLCommandInterpreter - parsing: complex command org.xtext.example.mydsl.fML.impl.ComplexCommandImpl@217c36af (eProxyURI: dummy:/example1505159334.fml#//@cmds.0) with var=null
13248 [main] DEBUG miliar.parser.FMLCommandInterpreter - identifier:
13249 [main] DEBUG miliar.parser.FMLCommandInterpreter - Closing loggers temporary

Exception: java.lang.StackOverflowError thrown from the UncaughtExceptionHandler in thread "main"

@FAMILIAR-project
Copy link
Owner Author

When launching FML.java in Eclipse (package standalone), there is another "issue", much less severe and perhaps related...

First, the issue is that the verbose mode is activated by default!
I don't understand why.

Second observation: there is no problem this time with counting or configs...

One direction to investigate: if I will remember there is a log4j file properties somewhere.
Maybe the file has been accidentally removed.

0 [Thread-1] DEBUG fr.familiar.interpreter.FMLShell - Launching FAMILIAR
DEBUG: Loading prompt.
FAMILIAR (for FeAture Model scrIpt Language for manIpulation and Automatic Reasoning) version 1.1 (beta)
http://familiar-project.github.com/
fml> fm1 = FM (A : B [C] ; )
12202 [Thread-1] DEBUG fr.familiar.interpreter.FMLShell - FAMILIAR: fm1 = FM (A : B [C] ; )
DEBUG: (Info cmd) fm1 = FM (A : B [C] ; )
12202 [Thread-1] DEBUG miliar.parser.FMLCommandInterpreter - resourseSet creation...
12204 [Thread-1] DEBUG miliar.parser.FMLCommandInterpreter - resourseSet=org.eclipse.xtext.resource.SynchronizedXtextResourceSet@370aa282 resources=[]
12393 [Thread-1] DEBUG miliar.parser.FMLCommandInterpreter - resourseSet options loaded + resource dummy...
12393 [Thread-1] DEBUG miliar.parser.FMLCommandInterpreter - resource=org.eclipse.xtext.linking.lazy.LazyLinkingResource@41b9da92 uri='dummy:/example411575479.fml'
12557 [Thread-1] DEBUG miliar.parser.FMLCommandInterpreter - resourse loaded...
12561 [Thread-1] DEBUG miliar.parser.FMLCommandInterpreter - model: org.xtext.example.mydsl.fML.impl.FamiliarScriptImpl@21913751 (eProxyURI: dummy:/example411575479.fml#/)
12561 [Thread-1] DEBUG miliar.parser.FMLCommandInterpreter - parsing: org.xtext.example.mydsl.fML.impl.ScriptCommandImpl@44c6b80e (eProxyURI: dummy:/example411575479.fml#//@cmds.0)
12561 [Thread-1] DEBUG miliar.parser.FMLCommandInterpreter - parsing: complex command org.xtext.example.mydsl.fML.impl.ComplexCommandImpl@9866417 (eProxyURI: dummy:/example411575479.fml#//@cmds.0/@cmd) with var=fm1
12561 [Thread-1] DEBUG miliar.parser.FMLCommandInterpreter - No longer possible to declare parameters
12561 [Thread-1] DEBUG miliar.parser.FMLCommandInterpreter - Number of arguments (0) or parammeters (0) is correct.
12604 [Thread-1] DEBUG miliar.parser.FMLCommandInterpreter - assignment: fm1 = 1894313674
12605 [Thread-1] DEBUG miliar.parser.FMLCommandInterpreter - variable fm1 does not exist: fr.familiar.interpreter.VariableNotExistingException: variable fm1 does not exist
12605 [Thread-1] DEBUG miliar.parser.FMLCommandInterpreter - Creation needed
12610 [Thread-1] DEBUG fr.familiar.interpreter.FMLShell - (DISPLAYING) fm1: (FEATURE_MODEL) A: B [C] ;

fm1: (FEATURE_MODEL) A: B [C] ;
fml>
14458 [Thread-1] DEBUG fr.familiar.interpreter.FMLShell - FAMILIAR:
DEBUG: (Info cmd)
14459 [Thread-1] DEBUG miliar.parser.FMLCommandInterpreter - resourseSet options loaded + resource dummy...
14459 [Thread-1] DEBUG miliar.parser.FMLCommandInterpreter - resource=org.eclipse.xtext.linking.lazy.LazyLinkingResource@2d7892d5 uri='dummy:/example1784995439.fml'
14461 [Thread-1] DEBUG miliar.parser.FMLCommandInterpreter - resourse loaded...
14461 [Thread-1] DEBUG miliar.parser.FMLCommandInterpreter - resource.getContents().size() == 0
fml> c1 = counting fm1
19626 [Thread-1] DEBUG fr.familiar.interpreter.FMLShell - FAMILIAR: c1 = counting fm1
DEBUG: (Info cmd) c1 = counting fm1
19628 [Thread-1] DEBUG miliar.parser.FMLCommandInterpreter - resourseSet options loaded + resource dummy...
19628 [Thread-1] DEBUG miliar.parser.FMLCommandInterpreter - resource=org.eclipse.xtext.linking.lazy.LazyLinkingResource@f2f8a84 uri='dummy:/example1410615148.fml'
19635 [Thread-1] DEBUG miliar.parser.FMLCommandInterpreter - resourse loaded...
19636 [Thread-1] DEBUG miliar.parser.FMLCommandInterpreter - model: org.xtext.example.mydsl.fML.impl.FamiliarScriptImpl@4d83da96 (eProxyURI: dummy:/example1410615148.fml#/)
19636 [Thread-1] DEBUG miliar.parser.FMLCommandInterpreter - parsing: org.xtext.example.mydsl.fML.impl.ScriptCommandImpl@b83d59c (eProxyURI: dummy:/example1410615148.fml#//@cmds.0)
19636 [Thread-1] DEBUG miliar.parser.FMLCommandInterpreter - parsing: complex command org.xtext.example.mydsl.fML.impl.ComplexCommandImpl@7c3cfaab (eProxyURI: dummy:/example1410615148.fml#//@cmds.0/@cmd) with var=c1
19637 [Thread-1] DEBUG miliar.parser.FMLCommandInterpreter - identifier:
19638 [Thread-1] DEBUG miliar.parser.FMLCommandInterpreter - Closing loggers temporary
19693 [Thread-1] DEBUG miliar.parser.FMLCommandInterpreter - Loggers are back
19742 [Thread-1] DEBUG miliar.parser.FMLCommandInterpreter - assignment: c1 = 667815626
19743 [Thread-1] DEBUG miliar.parser.FMLCommandInterpreter - variable c1 does not exist: fr.familiar.interpreter.VariableNotExistingException: variable c1 does not exist
19743 [Thread-1] DEBUG miliar.parser.FMLCommandInterpreter - Creation needed
19743 [Thread-1] DEBUG fr.familiar.interpreter.FMLShell - (DISPLAYING) c1: (DOUBLE) 2.0

c1: (DOUBLE) 2.0
fml> c1
22092 [Thread-1] DEBUG fr.familiar.interpreter.FMLShell - FAMILIAR: c1
DEBUG: (Info cmd) c1
22094 [Thread-1] DEBUG miliar.parser.FMLCommandInterpreter - resourseSet options loaded + resource dummy...
22094 [Thread-1] DEBUG miliar.parser.FMLCommandInterpreter - resource=org.eclipse.xtext.linking.lazy.LazyLinkingResource@51282707 uri='dummy:/example1648182475.fml'
22096 [Thread-1] DEBUG miliar.parser.FMLCommandInterpreter - resourse loaded...
22096 [Thread-1] DEBUG miliar.parser.FMLCommandInterpreter - model: org.xtext.example.mydsl.fML.impl.FamiliarScriptImpl@8955b34 (eProxyURI: dummy:/example1648182475.fml#/)
22096 [Thread-1] DEBUG miliar.parser.FMLCommandInterpreter - parsing: org.xtext.example.mydsl.fML.impl.ComplexCommandImpl@596b753 (eProxyURI: dummy:/example1648182475.fml#//@cmds.0)
22096 [Thread-1] DEBUG miliar.parser.FMLCommandInterpreter - parsing: complex command org.xtext.example.mydsl.fML.impl.ComplexCommandImpl@596b753 (eProxyURI: dummy:/example1648182475.fml#//@cmds.0) with var=null
22097 [Thread-1] DEBUG miliar.parser.FMLCommandInterpreter - identifier:
22097 [Thread-1] DEBUG fr.familiar.interpreter.FMLShell - (DISPLAYING) c1: (DOUBLE) 2.0

c1: (DOUBLE) 2.0
fml> configs fm1
28249 [Thread-1] DEBUG fr.familiar.interpreter.FMLShell - FAMILIAR: configs fm1
DEBUG: (Info cmd) configs fm1
28250 [Thread-1] DEBUG miliar.parser.FMLCommandInterpreter - resourseSet options loaded + resource dummy...
28250 [Thread-1] DEBUG miliar.parser.FMLCommandInterpreter - resource=org.eclipse.xtext.linking.lazy.LazyLinkingResource@5889949a uri='dummy:/example1699371294.fml'
28252 [Thread-1] DEBUG miliar.parser.FMLCommandInterpreter - resourse loaded...
28252 [Thread-1] DEBUG miliar.parser.FMLCommandInterpreter - model: org.xtext.example.mydsl.fML.impl.FamiliarScriptImpl@307b37df (eProxyURI: dummy:/example1699371294.fml#/)
28252 [Thread-1] DEBUG miliar.parser.FMLCommandInterpreter - parsing: org.xtext.example.mydsl.fML.impl.ComplexCommandImpl@69912a56 (eProxyURI: dummy:/example1699371294.fml#//@cmds.0)
28252 [Thread-1] DEBUG miliar.parser.FMLCommandInterpreter - parsing: complex command org.xtext.example.mydsl.fML.impl.ComplexCommandImpl@69912a56 (eProxyURI: dummy:/example1699371294.fml#//@cmds.0) with var=null
28253 [Thread-1] DEBUG miliar.parser.FMLCommandInterpreter - identifier:
28257 [Thread-1] DEBUG fr.familiar.interpreter.FMLShell - (DISPLAYING) res0: (SET) {{A;B};{A;C;B}}

res0: (SET) {{A;B};{A;C;B}}
fml>

@FAMILIAR-project
Copy link
Owner Author

Using Eclipse: the verbose is not by default, I basically launch FML.java with the... --verbose mode ;-)
Surprising for me because it has been a loooooong time I haven't used FAMILIAR...
So OK my old default config for executing FML contains --verbose

So there is no issue with Eclipse.
Everything works fine.

We still need to address why the executable jar miserably fails.

FAMILIAR (for FeAture Model scrIpt Language for manIpulation and Automatic Reasoning) version 1.1 (beta)
http://familiar-project.github.com/
fml> fm1 = FM (A : cd [E] [f] ; )
fm1: (FEATURE_MODEL) A: cd [f] [E] ;
fml> counting fm1
res0: (DOUBLE) 4.0
fml> configs fm1
res1: (SET) {{A;cd};{A;cd;E};{A;f;cd};{A;cd;E;f}}
fml>

@FAMILIAR-project
Copy link
Owner Author

The issue disappears with "correct" settings of JVM parameters...
Makes sense (the BDD factory is not created because of the lack of memory)

java -jar -Xmx1024M FAMILIAR-Standalone-1.0.10-jar-with-dependencies.jar --verbose

I have to check if the parameters of the BDD factory (number of max nodes) can be set differently (lower values that do not require so much memory)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants