Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4138168

replaceRange("", 0, -1) causes GP fault

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.1.6
    • client-libs
    • x86
    • windows_95



      Name: el35337 Date: 05/13/98


      1. Call "text_area.replaceRange("", 0, -1);".

      2. Error message:

      JAVA caused an invalid page fault in
      module KERNEL32.DLL at 0137:bff858c0.
      Registers:
      EAX=034e00e4 CS=0137 EIP=bff858c0 EFLGS=00010216
      EBX=034fc3c4 SS=013f ESP=034df048 EBP=034e00cc
      ECX=034fc3c4 DS=013f ESI=034e016c FS=586f
      EDX=034e0144 ES=013f EDI=034e0238 GS=0000
      Bytes at CS:EIP:
      55 a1 78 c2 fb bf 8b ec 83 ec 70 8b 08 53 56 89
      Stack dump:
      ffecbad7 034df078 034df05c 0000000e 00000007
      c0000005 00000000 00000000 bff858c0 00000002
      00000001 034df150 0001001f 00000000 00000000
      00000000

      3. This does NOT happen on NT. It is 95 only.

      4. Workaround: call "text_area.setText("");"
      instead.

      5. I have a theory about the cause. This happened
      to me when using MFC:

      I passed -1 into the word parameter of an API
      call, where it became 65535 (unsigned). This
      value was later passed back in a long, where I
      compared it to -1. But it didn't equal -1, it
      equaled 65535 (signed long). My point is that
      perhaps there has been a type conversion
      somewhere and the -1 is being interpreted as a
      range of 65535.
      (Review ID: 29425)
      ======================================================================

            ehawkessunw Eric Hawkes (Inactive)
            elarsen Erik Larsen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: