! 제품 버전을 정확하게 입력해 주세요.
제품 버전이 정확하게 기재되어 있지 않은 경우,
최신 버전을 기준으로 안내 드리므로
더욱 빠르고 명확한 안내를 위해
제품 버전을 정확하게 입력해 주세요!

c1flexgrid :: 보호된 메모리를 읽거나 쓰려고 했습니다 > Q&A | 토론

본문 바로가기

ComponentOne

Q&A | 토론

WinForms윈폼 c1flexgrid :: 보호된 메모리를 읽거나 쓰려고 했습니다

페이지 정보

작성자 구름 작성일 2020-09-02 10:33 조회 5,036회 댓글 1건
제품 버전 : 2016

본문

winform / 2016V2 / vs2015 / .NET 4.0 / C# / windows 10



System.AccessViolationException: 보호된 메모리를 읽거나 쓰려고 했습니다. 대부분 이러한 경우는 다른 메모리가 손상되었음을 나타냅니다.

위치: System.Drawing.SafeNativeMethods.Gdip.GdipMeasureString(HandleRef graphics, String textString, Int32 length, HandleRef font, GPRECTF& layoutRect, HandleRef stringFormat, GPRECTF& boundingBox, Int32& codepointsFitted, Int32& linesFilled)

위치: System.Drawing.Graphics.MeasureString(String text, Font font, SizeF layoutArea, StringFormat stringFormat)

위치: System.Drawing.Graphics.MeasureString(String text, Font font)

위치: C1.Win.C1FlexGrid.Util.Styles.e.a(Style A_0, Graphics A_1, Rectangle A_2, String A_3)

위치: C1.Win.C1FlexGrid.Util.Styles.e.a(Style A_0, Graphics A_1, Rectangle A_2, String A_3, Image A_4)

위치: C1.Win.C1FlexGrid.Util.Styles.e.a(Style A_0, Graphics A_1, Rectangle A_2, String A_3, Image A_4, k A_5)

위치: C1.Win.C1FlexGrid.C1FlexGridBase.b(Graphics A_0, Int32 A_1, Int32 A_2, Style A_3, Rectangle A_4, String A_5, Image A_6, DrawCellFlags A_7)

위치: C1.Win.C1FlexGrid.C1FlexGridBase.a(Graphics A_0, Int32 A_1, Int32 A_2, Style A_3, Rectangle A_4, String A_5, Image A_6, DrawCellFlags A_7)

위치: C1.Win.C1FlexGrid.C1FlexGridBase.a(Graphics A_0, Int32 A_1, Int32 A_2, Style A_3, Rectangle A_4, String A_5, Image A_6)

위치: C1.Win.C1FlexGrid.C1FlexGridBase.a(Graphics A_0, Int32 A_1, Int32 A_2, Style A_3, Rectangle A_4, String A_5, Image A_6, CheckEnum A_7)

위치: C1.Win.C1FlexGrid.C1FlexGridBase.DrawCell(PaintEventArgs e, Int32 row, Int32 col)

위치: C1.Win.C1FlexGrid.C1FlexGrid.DrawCell(PaintEventArgs e, Int32 row, Int32 col)

위치: C1.Win.C1FlexGrid.C1FlexGrid.DrawRow(PaintEventArgs e, Int32 row)

위치: C1.Win.C1FlexGrid.C1FlexGridBase.a(PaintEventArgs A_0)

위치: C1.Win.C1FlexGrid.C1FlexGridBase.OnPaint(PaintEventArgs e)

위치: System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)

위치: System.Windows.Forms.Control.WmPaint(Message& m)

위치: System.Windows.Forms.Control.WndProc(Message& m)

위치: C1.Win.C1FlexGrid.Util.BaseControls.ScrollableControl.WndProc(Message& m)

위치: System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

위치: System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

위치: System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


그리드를 그리고 스타일 등 초기 설정해놓고

이제 내용을 채우려고

tick 돌려서 10초마다

db에서 dataset 갖고 와서 data bind 하는 내용인데요

tick 안에 내용 뭐 없습니다..

그냥 c1FlexGrid1.SetData(~,~,~) 이런거 몇개 없습니다


근데 내용 채우고 나서 좀 있다가 프로세스가 강제로 꺼지더라구요

그래서 이벤트 뷰어에서 보니까 저런 System.AccessViolationException 을 발견 했고

아무리 해결해보려고 해도 해결되지 않습니다...

그래서 단계별로 다 쳐내봤는데

tick {} 안에

c1FlexGrid.SetData(1,1,"안녕");

해도 보호된 메모리 건드렸다고 뜹니다


-



            PrivateFontCollection privatefonts = new PrivateFontCollection();

            privatefonts.AddFontFile("myFont.ttf");

            Font font = new Font(privatefonts.Families[0], 30f);

            c1FlexGrid1.Font = font;



이부분때문에 그리드 오류가 났었던걸로 해결했습니다



  • 페이스북으로 공유
  • 트위터로  공유
  • 링크 복사
  • 카카오톡으로 보내기

댓글목록

GCK폴님의 댓글

GCK폴 작성일

안녕하세요 그레이프시티입니다. 잘해결이 되셨다니 다행입니다. 또 다른 문의 사항이 있으시면 언제든 문의 주시기 바랍니다. 감사합니다. 그레이프시티 드림

1 답변

WinForms윈폼 Re: c1flexgrid :: 보호된 메모리를 읽거나 쓰려고 했습니다

추천0 이 글을 추천하셨습니다 비추천0 채택채택

페이지 정보

작성자 GrapeCity 작성일 2020-11-10 09:49 댓글 0건

본문

문제가 해결 되어 케이스를 종료합니다.


감사합니다.

댓글목록

등록된 댓글이 없습니다.

메시어스 홈페이지를 통해 제품에 대해서 더 자세히 알아 보세요!
홈페이지 바로가기
메시어스 홈페이지를 통해 제품에 대해서 더 자세히 알아 보세요!
홈페이지 바로가기
이메일 : sales-kor@mescius.com | 전화 : 1670-0583 | 경기도 과천시 과천대로 7길 33, 디테크타워 B동 1107호 메시어스(주) 대표자 : 허경명 | 사업자등록번호 : 123-84-00981 | 통신판매업신고번호 : 2013-경기안양-00331 ⓒ 2024 MESCIUS inc. All rights reserved.