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

Crashes extensions #14

Open
teamrehab opened this issue Oct 7, 2019 · 12 comments
Open

Crashes extensions #14

teamrehab opened this issue Oct 7, 2019 · 12 comments
Assignees
Labels

Comments

@teamrehab
Copy link

Issue Type: Bug

I have a 9MB EDI file. This is pretty normal for EDI files. In fact, they can get FAR larger. This file has also been verified by insurance companies to be error free.
Using the "prettify" function, it crashes. This extension works fine on smaller files.
My system is a 10th gen i7 with 32GB RAM.

Extension version: 1.1.0
VS Code version: Code 1.38.1 (b37e54c98e1a74ba89e03073e5a3761284e3ffb0, 2019-09-11T13:35:15.005Z)
OS version: Windows_NT x64 10.0.18362
Remote OS version: Linux x64 4.4.0-18362-Microsoft

System Info
Item Value
CPUs Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz (8 x 1498)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
oop_rasterization: disabled_off
protected_video_decode: enabled
rasterization: enabled
skia_deferred_display_list: disabled_off
skia_renderer: disabled_off
surface_synchronization: enabled_on
video_decode: enabled
viz_display_compositor: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 31.77GB (17.87GB free)
Process Argv
Screen Reader no
VM 0%
Item Value
Remote WSL: Ubuntu-18.04
OS Linux x64 4.4.0-18362-Microsoft
CPUs Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz (8 x 1498)
Memory (System) 31.77GB (17.87GB free)
VM 0%
@Silvenga
Copy link
Owner

Silvenga commented Oct 7, 2019

Blah, I knew this would happen eventually...

Do you know what causes the crash? Does the extension just hang and VSCode kills it, out-of-memory, etc?

EDIT: Does the status in the lower-right show that the header was parsed successfully?

@Silvenga Silvenga added the bug label Oct 7, 2019
@Silvenga Silvenga self-assigned this Oct 7, 2019
@teamrehab
Copy link
Author

Hah. I love the extension!

The error I get (After many seconds or minutes) is "Extension host terminated unexpectedly."
And 2 buttons: Open Developer Tools and Restart Extension Host

Dev tools shows: UNRESPONSIVE extension host, 'Silvenga.edi-x12-support' took 84% of 5730.041ms

@teamrehab
Copy link
Author

I see it says "Valid ISA header" and "Tokenization is skipped for long lines for performance reasons". The length of a long line can be configured via 'editor.maTokenizationLineLength'

Thanks!

@rebecaruiz
Copy link

Hi, I have the same problem in a valid 42-line EDI file. Since I used prettify for the first line it does not inform me about the clicked element. It keeps "Loading".
Love the extension too <3

@Silvenga
Copy link
Owner

I'm a really bad maintainer. I remember opening VSCode to fix this, then got distracted by life stuff, then completely forgot.

What's the size of your EDI file @teamrehab and @rebecaruiz (character count)? And the ISA header might be useful (just looking for the segment separators).

I need a better way to debug this... I'm 99% sure this is a regex performance problem, I've been meaning to switch to an actual tokenization strategy, but that's a major rewrite.

@rebecaruiz
Copy link

rebecaruiz commented Feb 25, 2020

My file weighs 1.481 bytes. It's a pretty light 850 EDI document only for testing purposes.
When I discovered the prettify/uglify feature it was great for me because I usually manipulated these files in VSCode for displaying them in one single line and ingest them as argument into a greater file. The ISA header is valid. It amazed me that once I used prettify/uglify the line endings changed from CRLF to LF without my intervention. Then I closed the document without saving, stopped VSCode and run it again, so the extension worked well again.

ISA*00* *00* *12*7242733018CH *ZZ*12005421 *181101*1230*U*00401*000000001*0*P*>~

testpo850.txt

@Silvenga
Copy link
Owner

I can't repo your case @rebecaruiz - I think I'll need an order of operations.

@Silvenga
Copy link
Owner

Silvenga commented Mar 1, 2020

I can repo the 9mb issue, and it's not regex related, I'll need to bug someone with some more experience with profiling JS.

@undeadindustries
Copy link

I appreciate you working in this. This plugin really saves me some time!

@teamrehab
Copy link
Author

Hi there. Just checking in to see if you had a chance to look at this. Thanks!

@Silvenga
Copy link
Owner

Silvenga commented Jun 1, 2020

I failed to find anyone that can help me with the JS profiling. 😞

So not sure how to really proceed. I did, however, try to get some performance snapshots, but actually digging into them as proven to be a challenge, since nothing in the extension jumps out as being overly bad.

@teamrehab
Copy link
Author

Thanks for looking into it.
EDI files can get really big. Probably bigger than most common types of files that VS is used to linting...

I'd send you an example but that would literally violate HIPAA :-)

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

4 participants