blakeohare / crayon

Crayon Programming Language
MIT License
111 stars 10 forks source link

Bit Defender blocks disk write access and causes a crash (need better error handling and actionable messaging) #259

Open peter-fm opened 5 years ago

peter-fm commented 5 years ago

Running the hello world example from the basic tutorial and I get the following error running the hello world project creation demo: C:\Users\Me\Documents\CrayonProjects>crayon -genDefaultProject HelloWorld

Unhandled Exception: System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+.
   at System.Drawing.Image.Save(String filename, ImageCodecInfo encoder, EncoderParameters encoderParams)
   at Common.FileOutputExporter.ExportImageFile(String path, SystemBitmap image)
   at Common.FileOutputExporter.ExportFiles(Dictionary`2 files)
   at Crayon.GenerateDefaultProjectWorker.DoWorkImpl(ExportCommand command)
   at Crayon.Pipeline.MainPipeline.Run()
   at Crayon.Program.Main(String[] args)
blakeohare commented 5 years ago

Weird...this is definitely the code saving the default icon file but if the crash is coming from GDI itself, so I'm kind of at a loss.

This might help me, though:

You can check your .NET version by opening the folders C:\Windows\Microsoft.NET\Framework and C:\Windows\Microsoft.NET\Framework64 and finding the highest directory name.

blakeohare commented 5 years ago

Sorry, there's actually one more step to find the version:

peter-fm commented 5 years ago

Windows 10 Pro So the highest directory name is: v4.0.30319 and the File version field is: 10.0.17134.1

peter-fm commented 5 years ago

Ah I discovered it was bit defender that was blocking it. It works fine now :)

blakeohare commented 5 years ago

Oh dear. Good to know, although compiler crashing is still not acceptable behavior. I may send you an experimental build and ask you to try to reproduce the error and see if it gives better messaging, if that's okay with you.

peter-fm commented 5 years ago

of course, no problem.