arosien opened a new issue, #697:
URL: https://github.com/apache/daffodil-vscode/issues/697
Similar to #648, if a parse assertion is raised during TDML generate, the
error is logged to the console but the debugger is stuck in a paused state (in
a normal parse the debugger will exit).
Launch config:
```json
{
"type": "dfdl",
"request": "launch",
"name": "generate TDML",
"program":
"/Users/arosien/nteligen/PCAP/src/main/resources/com/tresys/pcap/xsd/pcap.dfdl.xsd",
"stopOnEntry": false,
"data":
"/Users/arosien/nteligen/example-daffodil-debug/src/main/resources/works.jpg",
"infosetFormat": "xml",
"infosetOutput": {
"type": "file",
"path": "/Users/arosien/nteligen/sampleWorkspace/pcap.xml"
},
"tdmlConfig": {
"action": "generate",
"name": "test case",
"description": "test description",
"path": "/Users/arosien/nteligen/sampleWorkspace/pcap.tdml"
},
"debugServer": 4711,
"useExistingServer": false,
"openHexView": false,
"openInfosetView": false,
"openInfosetDiffView": false,
"daffodilDebugClasspath": "",
"variables": {},
"tunables": {}
},
```
where you pass a non-PCAP data file to trip the assertion.
Log:
```
➜ daffodil-vscode git:(add-startup-runtime-jvm-info) ✗ bloop run core --
-J--add-opens -Jjava.base/java.lang=ALL-UNNAMED
2023-07-11 17:45:32,276 [io-compute-1] INFO o.a.d.d.d.DAPodil -
******************************************************
A DAP server for debugging Daffodil schema processors.
Build info:
version: 1.3.0
daffodilVersion: 3.4.0
scalaVersion: 2.12.15
sbtVersion: 1.8.2
Runtime info:
JVM version: 17.0.7 (/Users/arosien/.sdkman/candidates/java/17.0.7-tem)
******************************************************
2023-07-11 17:45:32,280 [io-compute-1] INFO o.a.d.d.d.DAPodil - launched
with options listenPort: 4711, listenTimeout: 10 seconds
2023-07-11 17:45:32,311 [io-compute-1] INFO o.a.d.d.d.DAPodil - waiting at
tcp://localhost:4711
2023-07-11 17:45:33,849 [io-compute-blocker-1] INFO o.a.d.d.d.DAPodil -
connected at tcp://localhost:4711
2023-07-11 17:45:34,066 [io-compute-7] INFO o.a.d.d.d.DAPSession - R> #1
initialize {"clientID":"vscode","clientName":"Visual Studio
Code","adapterID":"dfdl","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"en","supportsProgressReporting":true,"supportsInvalidatedEvent":true,"supportsMemoryReferences":true,"supportsArgsCanBeInterpretedByShell":true,"supportsMemoryEvent":true,"supportsStartDebuggingRequest":true}
2023-07-11 17:45:34,110 [io-compute-6] INFO o.a.d.d.d.DAPSession - <R #1
initialize success
{"supportsConfigurationDoneRequest":true,"supportsHitConditionalBreakpoints":false,"supportsConditionalBreakpoints":false,"supportsEvaluateForHovers":false,"supportsCompletionsRequest":false,"supportsRestartFrame":false,"supportsSetVariable":false,"supportsRestartRequest":false,"supportTerminateDebuggee":false,"supportsDelayedStackTraceLoading":false,"supportsLogPoints":false,"supportsExceptionInfoRequest":false,"supportsDataBreakpoints":false,"supportsClipboardContext":false,"supportsLoadedSourcesRequest":false}
2023-07-11 17:45:34,114 [io-compute-blocker-6] INFO o.a.d.d.d.DAPSession -
<E initialized
2023-07-11 17:45:34,117 [io-compute-9] INFO o.a.d.d.d.DAPSession - R> #2
launch {"type":"dfdl","request":"launch","name":"generate
TDML","program":"/Users/arosien/nteligen/PCAP/src/main/resources/com/tresys/pcap/xsd/pcap.dfdl.xsd","stopOnEntry":false,"data":"/Users/arosien/nteligen/example-daffodil-debug/src/main/resources/works.jpg","infosetFormat":"xml","infosetOutput":{"type":"file","path":"/Users/arosien/nteligen/sampleWorkspace/pcap.xml"},"tdmlConfig":{"action":"generate","name":"test
case","description":"test
description","path":"/Users/arosien/nteligen/sampleWorkspace/pcap.tdml"},"debugServer":4711,"useExistingServer":false,"openHexView":false,"openInfosetView":false,"openInfosetDiffView":false,"daffodilDebugClasspath":"","variables":{},"tunables":{},"__configurationTarget":6,"__sessionId":"ac5b5f6e-9282-4980-ae8b-beb892d51c5c"}
2023-07-11 17:45:34,120 [io-compute-7] INFO o.a.d.d.d.DAPSession - R> #3
setBreakpoints
{"source":{"name":"alwaysInvalid.dfdl.xsd","path":"/Users/arosien/nteligen/daffodil/daffodil-japi/src/test/resources/test/japi/alwaysInvalid.dfdl.xsd"},"lines":[34],"breakpoints":[{"line":34}],"sourceModified":false}
[E] ERROR StatusLogger Log4j2 could not find a logging implementation.
Please add log4j-core to the classpath. Using SimpleLogger to log to the
console...
2023-07-11 17:45:37,834 [io-compute-2] DEBUG o.a.d.d.d.DAPodil - awaiting
first stack frame
2023-07-11 17:45:37,981 [io-compute-5] DEBUG o.a.d.d.d.P.DaffodilDebugger -
pre-control await
2023-07-11 17:45:37,988 [io-compute-9] DEBUG o.a.d.d.d.P.DaffodilDebugger -
post-control await
2023-07-11 17:45:37,989 [io-compute-9] DEBUG o.a.d.d.d.P.DaffodilDebugger -
pre-checkBreakpoints
2023-07-11 17:45:37,991 [io-compute-11] DEBUG o.a.d.d.d.P.DaffodilDebugger -
pre-control await
2023-07-11 17:45:37,992 [io-compute-11] DEBUG o.a.d.d.d.P.DaffodilDebugger -
post-control await
2023-07-11 17:45:37,992 [io-compute-11] DEBUG o.a.d.d.d.P.DaffodilDebugger -
pre-checkBreakpoints
2023-07-11 17:45:37,996 [io-compute-2] DEBUG o.a.d.d.d.P.DaffodilDebugger -
pre-control await
2023-07-11 17:45:37,997 [io-compute-2] DEBUG o.a.d.d.d.P.DaffodilDebugger -
post-control await
2023-07-11 17:45:37,997 [io-compute-2] DEBUG o.a.d.d.d.P.DaffodilDebugger -
pre-checkBreakpoints
2023-07-11 17:45:37,999 [io-compute-5] DEBUG o.a.d.d.d.P.DaffodilDebugger -
pre-control await
2023-07-11 17:45:38,000 [io-compute-5] DEBUG o.a.d.d.d.P.DaffodilDebugger -
post-control await
2023-07-11 17:45:38,000 [io-compute-5] DEBUG o.a.d.d.d.P.DaffodilDebugger -
pre-checkBreakpoints
2023-07-11 17:45:38,024 [io-compute-11] DEBUG o.a.d.d.d.P.DaffodilDebugger -
infoset queue completed
2023-07-11 17:45:38,026 [io-compute-3] DEBUG o.a.d.d.d.Parse -
infosetChanges (orig): Succeeded
[E] java.lang.Error: Parse Error: Assertion failed: Magic number was not
0xA1B2C3D4 (for bigEndian) or 0xD4C3B2A1 (for littleEndian).
[E] Schema context: MagicNumber Location line 87 column 14 in
file:/Users/arosien/nteligen/PCAP/src/main/resources/com/tresys/pcap/xsd/pcap.dfdl.xsd
[E] Data location was preceding byte 4
[E] at
org.apache.daffodil.debugger.dap.Parse$$anon$1.$anonfun$run$2(Parse.scala:113)
[E] at as @
com.monovore.decline.effect.CommandIOApp$.addVersionFlag(CommandIOApp.scala:67)
2023-07-11 17:45:38,036 [io-compute-6] DEBUG o.a.d.d.d.DAPodil - awaiting
first stack frame: got it
2023-07-11 17:45:38,037 [io-compute-blocker-8] DEBUG o.a.d.d.d.Parse -
parsing: Errored
2023-07-11 17:45:38,046 [io-compute-11] DEBUG o.a.d.d.d.Parse -
deliverParseData: Canceled
2023-07-11 17:45:38,051 [io-compute-11] DEBUG o.a.d.d.d.DAPodil - started
Launched
2023-07-11 17:45:38,053 [io-compute-11] INFO o.a.d.d.d.DAPSession - <E
thread started
[E] java.lang.Error: Parse Error: Assertion failed: Magic number was not
0xA1B2C3D4 (for bigEndian) or 0xD4C3B2A1 (for littleEndian).
[E] Schema context: MagicNumber Location line 87 column 14 in
file:/Users/arosien/nteligen/PCAP/src/main/resources/com/tresys/pcap/xsd/pcap.dfdl.xsd
[E] Data location was preceding byte 4
[E] at
org.apache.daffodil.debugger.dap.Parse$$anon$1.$anonfun$run$2(Parse.scala:113)
[E] at as @
com.monovore.decline.effect.CommandIOApp$.addVersionFlag(CommandIOApp.scala:67)
2023-07-11 17:45:38,056 [io-compute-blocker-11] INFO o.a.d.d.d.DAPSession -
<R #2 launch success null
2023-07-11 17:45:38,059 [io-compute-7] DEBUG o.a.d.d.d.DAPodil -
deliverStoppedEvents: Succeeded
2023-07-11 17:45:38,069 [io-compute-3] DEBUG o.a.d.d.d.DAPodil -
sourceEventsDelivery: Succeeded
2023-07-11 17:45:38,070 [io-compute-blocker-11] INFO o.a.d.d.d.DAPSession -
<R #3 setBreakpoints success
{"breakpoints":[{"id":0,"verified":true,"line":34,"message":""}]}
2023-07-11 17:45:38,070 [io-compute-4] INFO o.a.d.d.d.DAPSession - <E
daffodil.config
2023-07-11 17:45:38,074 [io-compute-7] INFO o.a.d.d.d.DAPSession - <E
daffodil.data
2023-07-11 17:45:38,129 [io-compute-7] INFO o.a.d.d.d.DAPSession - R> #4
configurationDone null
2023-07-11 17:45:38,131 [io-compute-7] INFO o.a.d.d.d.DAPSession - <R #4
configurationDone success null
2023-07-11 17:45:38,140 [io-compute-3] INFO o.a.d.d.d.DAPSession - R> #5
threads null
2023-07-11 17:45:38,144 [io-compute-3] INFO o.a.d.d.d.DAPSession - <R #5
threads success {"threads":[{"id":1,"name":"daffodil"}]}
2023-07-11 17:45:38,198 [io-compute-3] INFO o.a.d.d.d.DAPSession - R> #6
threads null
2023-07-11 17:45:38,199 [io-compute-1] INFO o.a.d.d.d.DAPSession - <R #6
threads success {"threads":[{"id":1,"name":"daffodil"}]}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]