nea / MarkdownViewerPlusPlus

A Notepad++ Plugin to view a Markdown file rendered on-the-fly
MIT License
1.17k stars 143 forks source link

Getting exception while using the MD++ with NotePad++ #56

Closed chennakeshavaSoC closed 2 years ago

chennakeshavaSoC commented 6 years ago

Hi,

I have copied the DLL into the notepad as described, as a test I have opened Readme.md of MarkdownViewerPlusPlus, it is giving the dotnet exception. I am using Windows7 64-bit, .Net version 4.6.x Notepad++ latest version

Please find the error screen shot attached. dotnetexceptionmdvpp

I am trying to update the dot net to latest now. I'll update if it fixes the issue.

Regards, Chenna

chennakeshavaSoC commented 6 years ago

I am still getting the same issue with .Net 4.7.1

nea commented 6 years ago

Hey @chennakeshavaSoC

Could you please try the newest version 0.8.0 and let me know if it works.

If not, which NPP version are you using: x64 or x86?

Thanks

woniulive commented 6 years ago

@nea get same error with notepad++ x64 V7.5.5 and version 0.8.1 x64,you can test the file from https://github.com/alibaba/p3c/blob/master/README.md .scroll down the bottom,then scroll up the top,you should get this error.

Regards, zhou

nea commented 6 years ago

Thanks @woniulive

Will test with those versions and that file.

tobster-de commented 6 years ago

Please at least catch the exception to stop NP++ crashing.

NP++ v7.5.8, MDV++ 0.8.2.25564 https://github.com/qmk/qmk_firmware/blob/master/readme.md

{"ColorBlend object that was set is not valid.Position's last element must be equal to 1.0. ColorBlend objects must be constructed with the same number of positions and color values. Positions must be between 0.0 and 1.0, 1.0 indicating the last element in the array."} at System.Drawing.SafeNativeMethods.Gdip.GdipMeasureCharacterRanges(HandleRef graphics, String textString, Int32 length, HandleRef font, GPRECTF& layoutRect, HandleRef stringFormat, Int32 characterCount, IntPtr[] region) at System.Drawing.Graphics.MeasureCharacterRanges(String text, Font font, RectangleF layoutRect, StringFormat stringFormat) at Svg.GdiFontDefn.MeasureCharacters(ISvgRenderer renderer, String text) at Svg.SvgTextBase.TextDrawingState.DrawString(String value) at Svg.SvgTextBase.SetPath(TextDrawingState state, Boolean doMeasurements) at Svg.SvgTextBase.SetPath(TextDrawingState state, Boolean doMeasurements) at Svg.SvgTextBase.SetPath(TextDrawingState state) at Svg.SvgTextBase.Path(ISvgRenderer renderer) at Svg.SvgTextBase.Render(ISvgRenderer renderer) at Svg.SvgElement.RenderChildren(ISvgRenderer renderer) at Svg.SvgVisualElement.Render(ISvgRenderer renderer, Boolean renderFilter) at Svg.SvgVisualElement.Render(ISvgRenderer renderer) at Svg.SvgElement.RenderChildren(ISvgRenderer renderer) at Svg.SvgElement.Render(ISvgRenderer renderer) at Svg.SvgFragment.Render(ISvgRenderer renderer) at Svg.SvgDocument.Draw(Bitmap bitmap) at com.insanitydesign.MarkdownViewerPlusPlus.Forms.MarkdownViewerRenderer.ConvertSvgToBitmap(SvgDocument svgDocument, HtmlImageLoadEventArgs imageLoadEvent) at com.insanitydesign.MarkdownViewerPlusPlus.Forms.MarkdownViewerRenderer.OnDownloadDataCompleted(DownloadDataCompletedEventArgs downloadEvent, HtmlImageLoadEventArgs imageLoadEvent) at com.insanitydesign.MarkdownViewerPlusPlus.Forms.MarkdownViewerRenderer.<>c__DisplayClass5_0.b__1(Object downloadSender, DownloadDataCompletedEventArgs downloadEvent) at System.Net.WebClient.OnDownloadDataCompleted(DownloadDataCompletedEventArgs e) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() at System.Threading.ThreadPoolWorkQueue.Dispatch()

nea commented 6 years ago

Hi @tobster-de

Do you use Notepad 64-bit or 32-bit? I have 7.5.8 32-bit with MarkdownViewer 0.8.2.25564 and tested https://github.com/qmk/qmk_firmware/blob/master/readme.md and see no issue.

Thanks

tobster-de commented 6 years ago

It's the 64 bits

nea commented 6 years ago

Thanks @tobster-de.

Currently the download links on https://notepad-plus-plus.org/download/v7.5.8.html are broken. As soon as they are back I will try with 64-bit.

Am only using 32-bit myself because of old issues with 64-bit NPP.

Best

tobster-de commented 6 years ago

I narrowed it down to the 'contributors' line SVG in the said file.

[![GitHub contributors](https://img.shields.io/github/contributors/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/pulse/monthly)