[GitHub] stevedlawrence commented on a change in pull request #135: Show different error message for OOM

2018-11-12 Thread GitBox
stevedlawrence commented on a change in pull request #135: Show different error 
message for OOM
URL: https://github.com/apache/incubator-daffodil/pull/135#discussion_r232822408
 
 

 ##
 File path: 
daffodil-runtime1/src/main/scala/org/apache/daffodil/processors/parsers/Parser.scala
 ##
 @@ -271,7 +271,7 @@ class ChoiceParser(ctxt: RuntimeData, val childParsers: 
Vector[Parser])
   case t: Throwable => {
 if (pBefore != null) {
   markLeakCausedByException = true
-  if (!t.isInstanceOf[SchemaDefinitionDiagnosticBase] && 
!t.isInstanceOf[UnsuppressableException]) {
+  if (!t.isInstanceOf[SchemaDefinitionDiagnosticBase] && 
!t.isInstanceOf[UnsuppressableException] && !t.isInstanceOf[OutOfMemoryError]) {
 
 Review comment:
   This pattern of schema checking also appears in SequenceParserBases.scala, 
we probably need a similar check there.
   
   Also, rather than checking the very specific OutOfMemoryError, perhaps we 
instead want to check it's parent java.lang.Error,? The javadoc says 
java.lang.Error "indicates a serious problem that a reasonable application 
should not try to catch". So on any java.lang.Error we still attempt to clean 
up the MarkPool but don't try to warn about an unexpected exception thrown. The 
below message is really trying to tell when Daffodil failed to catch an 
exception that it should have caught elsewhere else.
   
   This also makes me wonder if we shouldn't even be catch/using Throwable's 
anywhere, but instead only catch java.lang.Exceptions? I'm pretty sure we use 
Throwables all over the place, so it's not worth changing for this bug, but 
might be worth creating a new bug to reexamine our usage of Throwables vs 
Exceptions.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] mbeckerle commented on a change in pull request #135: Show different error message for OOM

2018-11-12 Thread GitBox
mbeckerle commented on a change in pull request #135: Show different error 
message for OOM
URL: https://github.com/apache/incubator-daffodil/pull/135#discussion_r232813576
 
 

 ##
 File path: daffodil-cli/src/main/scala/org/apache/daffodil/Main.scala
 ##
 @@ -1355,6 +1355,19 @@ object Main extends Logging {
 log(LogLevel.Error, "%s", e.getMessage())
 1
   }
+  case e: OutOfMemoryError => {
+System.err.println("""|
+
|!!
+|!! Daffodil ran out of memory!
  !!
+
|!!
+|
+| Try increasing the amount of memory by changing 
or
+| setting the DAFFODIL_JAVA_OPTS environment 
variable.
 
 Review comment:
   Might as well tell them how to set it i.e., for the OpenJDK JVM the 
parameter value is -Xmx5G for 5 gigabytes. 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Resolved] (DAFFODIL-947) Warn when space separated fields start or end with a space

2018-11-12 Thread Josh Adams (JIRA)


 [ 
https://issues.apache.org/jira/browse/DAFFODIL-947?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Josh Adams resolved DAFFODIL-947.
-
   Resolution: Fixed
 Assignee: Dave Thompson  (was: Josh Adams)
Fix Version/s: 2.3.0

This has been fixed in commit cf18604bcbbb6dd57f9a1002b25c9968cfc1c4de

> Warn when space separated fields start or end with a space
> --
>
> Key: DAFFODIL-947
> URL: https://issues.apache.org/jira/browse/DAFFODIL-947
> Project: Daffodil
>  Issue Type: Improvement
>  Components: Diagnostics, Usability
>Reporter: Steve Lawrence
>Assignee: Dave Thompson
>Priority: Minor
> Fix For: 2.3.0
>
>
> If a user specifies something like dfdl:separator=" ", they probably intended 
> to have dfdl:separator="%SP;". However, since dfdl:separator is a space 
> separated list of separators, this is treated as if there is no separator. We 
> should warn the user when they have spaces at the beginning or end of for 
> dfdl properties that are space separated lists.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] jadams-tresys opened a new pull request #135: Show different error message for OOM

2018-11-12 Thread GitBox
jadams-tresys opened a new pull request #135: Show different error message for 
OOM
URL: https://github.com/apache/incubator-daffodil/pull/135
 
 
   Instead of showing a generic error message, we should suggest
   increasing memory when we crash due to an OutOfMemoryError.
   
   DAFFODIL-1953


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Assigned] (DAFFODIL-565) tolerate attributeFormDefault on xs:schema

2018-11-12 Thread Elizabeth Fahl (JIRA)


 [ 
https://issues.apache.org/jira/browse/DAFFODIL-565?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Elizabeth Fahl reassigned DAFFODIL-565:
---

Assignee: Elizabeth Fahl

> tolerate attributeFormDefault on xs:schema
> --
>
> Key: DAFFODIL-565
> URL: https://issues.apache.org/jira/browse/DAFFODIL-565
> Project: Daffodil
>  Issue Type: New Feature
>  Components: DFDL Language, Front End
>Affects Versions: s7
>Reporter: Michael Beckerle
>Assignee: Elizabeth Fahl
>Priority: Major
>  Labels: ForInteroperabilityTest
>
> We recognize this option, but issue a not-yet-implemented SDE.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Assigned] (DAFFODIL-947) Warn when space separated fields start or end with a space

2018-11-12 Thread Steve Lawrence (JIRA)


 [ 
https://issues.apache.org/jira/browse/DAFFODIL-947?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Steve Lawrence reassigned DAFFODIL-947:
---

Assignee: Josh Adams

Assigning to Josh, this might have been fixed by your change to DAFFODIL-1956

> Warn when space separated fields start or end with a space
> --
>
> Key: DAFFODIL-947
> URL: https://issues.apache.org/jira/browse/DAFFODIL-947
> Project: Daffodil
>  Issue Type: Improvement
>  Components: Diagnostics, Usability
>Reporter: Steve Lawrence
>Assignee: Josh Adams
>Priority: Minor
>
> If a user specifies something like dfdl:separator=" ", they probably intended 
> to have dfdl:separator="%SP;". However, since dfdl:separator is a space 
> separated list of separators, this is treated as if there is no separator. We 
> should warn the user when they have spaces at the beginning or end of for 
> dfdl properties that are space separated lists.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Assigned] (DAFFODIL-1287) Vague "assertion failed" error when expression with whitespace used as separator

2018-11-12 Thread Steve Lawrence (JIRA)


 [ 
https://issues.apache.org/jira/browse/DAFFODIL-1287?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Steve Lawrence reassigned DAFFODIL-1287:


Assignee: Josh Adams

Assigning to Josh, this might have been fixed by your change to DAFFODIL-1956

> Vague "assertion failed" error when expression with whitespace used as 
> separator
> 
>
> Key: DAFFODIL-1287
> URL: https://issues.apache.org/jira/browse/DAFFODIL-1287
> Project: Daffodil
>  Issue Type: Bug
>  Components: Diagnostics
>Affects Versions: 1.1.0
>Reporter: Jessie Chab
>Assignee: Josh Adams
>Priority: Major
>
> While verifying DFDL-749, I wrote a few tests that used an expression with 
> whitespace to specify the delimiter(s). These tests fail with the following 
> error:
> {code}
> [info] Test 
> edu.illinois.ncsa.daffodil.section23.dfdl_expressions.TestDFDLExpressions.test_internal_space_not_preserved2
>  started
> 2015-03-31 06:09:43:728  edu.illinois.ncsa.daffodil.dsom.oolag.OOLAG$LV 
> Error[element.expr_space5::LocalComplexTypeDef::sequence@@Prod(Prod)@@parser 
> has no value due to java.lang.AssertionError: assertion failed.]
> 2015-03-31 06:09:43:729  edu.illinois.ncsa.daffodil.dsom.oolag.OOLAG$LV 
> Error[element.expr_space5@@Prod(Prod)@@parser has no value due to 
> java.lang.AssertionError: assertion failed.]
> 2015-03-31 06:09:43:729  edu.illinois.ncsa.daffodil.dsom.oolag.OOLAG$LV 
> Error[element.expr_space5@@Prod(Prod)@@parser has no value due to 
> java.lang.AssertionError: assertion failed.]
> 2015-03-31 06:09:43:729  edu.illinois.ncsa.daffodil.dsom.oolag.OOLAG$LV 
> Error[element.expr_space5@@Prod(Prod)@@parser has no value due to 
> java.lang.AssertionError: assertion failed.]
> 2015-03-31 06:09:43:729  edu.illinois.ncsa.daffodil.dsom.oolag.OOLAG$LV 
> Error[element.expr_space5@@Prod(Prod)@@parser has no value due to 
> java.lang.AssertionError: assertion failed.]
> 2015-03-31 06:09:43:729  edu.illinois.ncsa.daffodil.dsom.oolag.OOLAG$LV 
> Error[element.expr_space5@@Prod(Prod)@@parser has no value due to 
> java.lang.AssertionError: assertion failed.]
> 2015-03-31 06:09:43:730  edu.illinois.ncsa.daffodil.dsom.oolag.OOLAG$LV 
> Error[SchemaSet@@requiredValue has no value due to java.lang.AssertionError: 
> assertion failed.]
> [error] Test 
> edu.illinois.ncsa.daffodil.section23.dfdl_expressions.TestDFDLExpressions.test_internal_space_not_preserved2
>  failed: assertion failed
> {code}
> Please see tests:
> test_internal_space_preserved4
> test_internal_space_not_preserved2
> in the following files:
> daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section23/dfdl_expressions/expressions.tdml
> daffodil-test/src/test/scala-debug/edu/illinois/ncsa/daffodil/section23/dfdl_expressions/TestDFDLExpressionsDebug.scala



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)