Seite 1 von 1

Bug - JSON | Unicode

Verfasst: 02.11.2014 17:03
von Sirius-2337
Folgender Code erzeugt bei mir einen IMA sobald a > b wird, wenn b >= 47 ist

Code: Alles auswählen

EnableExplicit
PurifierGranularity(1, 1, 1, 1)

Structure teststructure
  a.s
  List b.i()
EndStructure

NewList Testlist.teststructure()

Define a, x, y, JSON, b = 47

For a = 0 To 100
  Debug a
  
  ClearList(Testlist())
  For x = 0 To 800
    AddElement(Testlist())
    Testlist()\a = "TestString"
    For y = 0 To 9
      AddElement(Testlist()\b())
      If a < b
        Testlist()\b() = a
      Else
        Testlist()\b() = a*a*a
      EndIf
    Next
  Next
  
  JSON = CreateJSON(#PB_Any)
  InsertJSONList(JSONValue(JSON), Testlist())
  ComposeJSON(JSON, #PB_JSON_PrettyPrint)
  FreeJSON(JSON)
Next
PB Compiler hat geschrieben:[15:44:16] Waiting for executable to start...
[15:44:16] Executable type: Windows - x64 (64bit, Unicode, Purifier)
[15:44:16] Executable started.
[15:44:19] [ERROR] Line: 32
[15:44:19] [ERROR] Invalid memory access. (read error at address 83964066)
PB v5.31 x64
Windows 7

Besonders merkwürdig ist das alles durchläuft, wenn ich für 'b' einen Wert kleiner als 47 benutze.
Im ASCII Modus kompiliert gibts auch keinen fehler.

als x86 Programm gibts ein Crash bei jedem Wert von b >= 10 bei a = 10, bzw bei werten unter 10 siehts folgender maßen aus:
  • b=1 - a=3 Crash
    b=2 - a=3 Crash
    b=3 - a=3 Crash
    b=4 - a=4 Crash
    b=5 - läuft
    b=6 - läuft
    b=7 - läuft
    b=8 - läuft
    b=9 - läuft
aber auch hier keine Probleme, wenn als ASCII kompiliert

Kann das jemand bestätigen?

Re: Bug - JSON | Unicode

Verfasst: 02.11.2014 19:58
von Kiffi
ja, bestätigt.

x64: IMA bei 47
x86: IMA bei 10

Ist wahrscheinlich das gleiche wie das, was ich hier gemeldet habe: http://www.purebasic.fr/english/viewtop ... =4&t=60863

Grüße ... Peter