منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب
رسالة خطأ Attempted to read or write protected memory - نسخة قابلة للطباعة

+- منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب (http://vb4arb.com/vb)
+-- قسم : قسم لغة الفيجوال بيسك VB.NET (http://vb4arb.com/vb/forumdisplay.php?fid=182)
+--- قسم : قسم اسئلة VB.NET (http://vb4arb.com/vb/forumdisplay.php?fid=183)
+--- الموضوع : رسالة خطأ Attempted to read or write protected memory (/showthread.php?tid=9069)

الصفحات: 1 2


رسالة خطأ Attempted to read or write protected memory - البراء - 29-05-13

بسم الله الرحمن الرحيم
الاخوة الافاضل ظهرت لي الرسالة التالية

Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

بعد تنفيذ الكود التالي بعد المرة الثانية
كود :
Try
            My.Application.DoEvents()
            Me.PictureBox4.Image = Nothing
            Me.PictureBox4.ImageLocation = ""
            filename1 = Nothing
            OpenFileDialog1.RestoreDirectory = True
            OpenFileDialog1.InitialDirectory = (Application.StartupPath & "\DOCUMENTS")
            OpenFileDialog1.Filter = "Photo Files (*.jpg)|*.jpg|AllFiles (*.*)|*.*" '
            OpenFileDialog1.Title = "حدد مسار الصورة"
            OpenFileDialog1.FileName = ""
            OpenFileDialog1.ShowDialog()
            filename1 = OpenFileDialog1.FileName
        Catch ex As Exception
            MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End Try
وخاصة تظهر رسالة الخطأ في السطر التالي
كود :
OpenFileDialog1.ShowDialog()
مع الرغم بحثت عن حلول ولن نصل الى حل لذا نرجو من الاخوة الافاضل ان لا يبخلوا علينا في حل هذه المشكلة


رسالة خطأ Attempted to read or write protected memory - @@أبورائد@@ - 29-05-13


السلام عليكم ورحمة الله وبركاته




جرب التالي


PHP كود :
Private Sub Button1_Click(ByVal sender As System.ObjectByVal e As System.EventArgsHandles Button1.Click

        
Try

            
Me.PictureBox4.Image Nothing

            Dim OpenFileDialog1 
As New OpenFileDialog
            OpenFileDialog1
.Filter "Photo Files (*.jpg)|*.jpg|AllFiles (*.*)|*.*" '
            OpenFileDialog1.Title = "حدد مسار الصورة"

            If OpenFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then
                Me.PictureBox4.Image = Image.FromFile(OpenFileDialog1.FileName)

            End If

        Catch ex As Exception
            MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)

        End Try

    End Sub 





السلام عليكم ورحمة الله وبركاته



رسالة خطأ Attempted to read or write protected memory - learning.net - 29-05-13

اخى الكريم
فى الفيجوال ستوديو ... اذهب الى Tools ثم اختار Options ثم من شاشة الاختيارات التى ستظهر لك اختار Debugging ثم على ايمين فى قائمة General انزل الى تحت ستجد الخيار
Suppress JIT optimization on module load بجانبه تشك بوكس وعليه علامة صح اظغط على التشيك بوكس والغى العلامه ثم احفظ وجرب برنامجك.

بالتوفيق ان شاء الله


اسف اخى ابو رائد لم ارى مشاركتك
سأترك مشاركتى كما هى
عسى ان يكون منها فائده


رسالة خطأ Attempted to read or write protected memory - البراء - 29-05-13

اخي ابو رائد بارك الله فيك على الرد ولكن تظهر نفس رسالة الخطأ
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.


رسالة خطأ Attempted to read or write protected memory - البراء - 29-05-13

اخي الكريم
إقتباس :من شاشة الاختيارات التى ستظهر لك اختار Debugging ثم على ايمين فى قائمة General
لا يوجد اختيار Debugging حسب الصورة الرفقة بارك الله فيك


رسالة خطأ Attempted to read or write protected memory - @@أبورائد@@ - 29-05-13


السلام عليكم ورحمة الله وبركاته







بعض المواقع تنصح بازالة Microsoft .net framework وبالذات ServicePack واعادة تركيبه من موقع ميكروسوفت






السلام عليكم ورحمة الله وبركاته



رسالة خطأ Attempted to read or write protected memory - learning.net - 29-05-13

اضغط على Show all settings تحت على الشمال ستظهر Debugging اختارها سيظهر لك General على اليمين وستجد اختيارات كثيره ... ابحث عن
Suppress JIT optimization on module load ثم الغى علامة الصح فى التشك بوكس بجانبها ثم اضغط ok


رسالة خطأ Attempted to read or write protected memory - البراء - 29-05-13

اخي الفاضل learning.net
تم تجربة ما سبق ولكن المشكلة كما هي وعلى العموم بارك الله فيك على الرد


رسالة خطأ Attempted to read or write protected memory - hoob computer - 29-05-13

اخي الفاضل (البراء), كانت لدي نفس المشكلة و قمت بتدبعها و وجدت إنه كان لدي (Query) موجود في كود الـ(Form) الذي فيه (OpenFileDialog) و قمت بتعديله و من ثم إشتغل البرنامج تمام التمام.
لذا, قم بفحص كود الفورم كله و تأكد إنه لا يوجد لديك مشاكل في أي كود في الفورم.

تحياتي.


رسالة خطأ Attempted to read or write protected memory - البراء - 29-05-13

اخي الفاضل hoob computer
تم مراجعة الكود سطر سطر ولكن دون جدوى نرجوا من الاخوة المتخصصين والمشرفين ان يساعدونا ما استطاعوا بارك الله فيكم