Page 46 of 103

Posted: Fri Sep 28, 2007 6:20 pm
by srod
Have just upgraded to build 218 - same problem, although this version reports the problem at line 8573.

Gnozal the steps are exactly those I outlined above.

(An attempt to read or write to/from an address to which that process isn't allowed.)

Posted: Fri Sep 28, 2007 6:24 pm
by gnozal
srod wrote:Gnozal the steps are exactly those I outlined above.
I tried it : New form, add a string gadget, change the gadget background color in gadget properties, add another string gadget.
No problem here !?

Posted: Fri Sep 28, 2007 6:29 pm
by srod
Hmm, am I misuing PureForm? If I colour a string gadget (without PureColor) and then run the project, the string gadget does not get coloured!

Posted: Fri Sep 28, 2007 6:37 pm
by gnozal
srod wrote:Hmm, am I misuing PureForm? If I colour a string gadget (without PureColor) and then run the project, the string gadget does not get coloured!
Generated code (using PureCOLOR)

Code: Select all

Procedure OpenWindow_Window_0()
  If OpenWindow(#Window_0, 202, 62, 400, 400, "Window_0", #PB_Window_SystemMenu|#PB_Window_SizeGadget|#PB_Window_MinimizeGadget|#PB_Window_TitleBar)
    If CreateGadgetList(WindowID(#Window_0))
      StringGadget(#Window_0_String_0, 76, 46, 225, 46, "Gadget_0")
      ; Gadget Colors
      PureCOLOR_SetGadgetColor(#Window_0_String_0, #PureCOLOR_SystemColor, $400040)
    EndIf
  EndIf
EndProcedure
Generated code (NOT using PureCOLOR)

Code: Select all

Procedure OpenWindow_Window_0()
  If OpenWindow(#Window_0, 202, 62, 400, 400, "Window_0", #PB_Window_SystemMenu|#PB_Window_SizeGadget|#PB_Window_MinimizeGadget|#PB_Window_TitleBar)
    If CreateGadgetList(WindowID(#Window_0))
      StringGadget(#Window_0_String_0, 76, 46, 225, 46, "Gadget_0")
      ; Gadget Colors
      SetGadgetColor(#Window_0_String_0, #PB_Gadget_BackColor, $400040)
    EndIf
  EndIf
EndProcedure
Both codes work here.
Did you add 'StringGadget' to the list in Preferences -> Color functions and checked 'Activate PureCOLOR / PB4 function switch' ?

Posted: Fri Sep 28, 2007 6:41 pm
by #NULL
>> Can't reproduce this. [crash reported by #null]
me neither :?
>> Assuming you are using build 218..
yes

Posted: Fri Sep 28, 2007 7:00 pm
by srod
Yes, still refuses to colour the string gadget and crashes on adding a second!

Posted: Fri Sep 28, 2007 7:15 pm
by gnozal
srod wrote:Yes, still refuses to colour the string gadget
Hum, you did check 'Enable (PureCOLOR)' in the gadget properties 'extra' tab (you have to check it even if you enable the PureCOLOR / PB4 function switch) ?
srod wrote:and crashes on adding a second!
Weird ...

Posted: Fri Sep 28, 2007 7:19 pm
by milan1612
I can reproduce the error srod described:
---------------------------
[ERROR]
---------------------------
PureFORM has crashed [Error = C0000005]
'An attemped read or write to/from an address to which that process isn't allowed'
Module : C:\PureBasic394\Program\PureFORM_New.pb ; Line : 8573
The current project will be saved as C:\Dokumente und Einstellungen\Admin\Desktop\PureFORM\CRASH[20070928-201346].pbf
---------------------------
OK
---------------------------
I'm using the latest build (downloaded today)

Posted: Fri Sep 28, 2007 7:31 pm
by srod
Right, that colours it - still crashes on a second string gadget added after colouring.

Posted: Fri Sep 28, 2007 7:33 pm
by srod
In fact it crashes when instead of coloring the gadget you select any option from the Extra tab of the Gadgep properties window.

E.g.

Add string gadget, enable and select a font and the add a second string gadget. Crash.

Posted: Sat Sep 29, 2007 4:05 pm
by gnozal
srod wrote:In fact it crashes when instead of coloring the gadget you select any option from the Extra tab of the Gadgep properties window.

E.g.

Add string gadget, enable and select a font and the add a second string gadget. Crash.
Still can't reproduce :cry:
1. When it crashes, is the gadget properties active tab 'Extra' ?
2. Does it also crash if you : add stringgadget, select tab 'Extra', change font, select tab 'General', add 2nd stringgadget ?
3. Does it also crash if you : add stringgadget, select tab 'Extra', change font, close gadget properties window, add 2nd stringgadget ?

Posted: Sat Sep 29, 2007 4:37 pm
by srod
gnozal wrote:When it crashes, is the gadget properties active tab 'Extra' ?
Yes.
Does it also crash if you : add stringgadget, select tab 'Extra', change font, select tab 'General', add 2nd stringgadget ?
No it doesn't crash in this case. But if you switch back to the extra tab and add another string gadget.... crash! :)

Posted: Sat Sep 29, 2007 4:40 pm
by gnozal
srod wrote:No it doesn't crash in this case. But if you switch back to the extra tab and add another string gadget.... crash! :)
Thanks, then I think I got a temporary fix : switch automatically to 1st tab when drawing a new gadget. I will add it soon.

Posted: Sat Sep 29, 2007 4:43 pm
by srod
:)

Posted: Sat Sep 29, 2007 5:33 pm
by gnozal
Update

Changes :
- new option [Preferences -> Code [2]] : don't add any comments to generated code
- temporary fix for the weird crash reported by srod