MantisBT - Ecere SDK
View Issue Details
0001124Ecere SDKidepublic2017-02-17 20:202017-02-17 20:38
CaptainBlackton 
 
normalcrashalways
confirmedopen 
DesktopLinux Mint18.1
 
 
0001124: Setting font.size in Window crashes IDE without explanation
Adding the line "font.size = 24" (or any other value besides 24) in Window and saving will immediately crash the IDE without explanation. A sample file cannot be attached because the file cannot be saved without crashing the IDE.
Open IDE
Open "Project" menu
Select "New"
Name project
Press "OK"
Click "OK" to create form
Open "View" menu
Select "View Code"
Inside of Form1, add the line "font.size = 24"
Save the project
Crash!
The most recent development version was used: Build 201701300646+0~2967~ubuntu16.04.1
No tags attached.
Issue History
2017-02-17 20:20CaptainBlacktonNew Issue
2017-02-17 20:38jeromeNote Added: 0001455
2017-02-17 20:38jeromeAssigned To => jerome
2017-02-17 20:38jeromeStatusnew => confirmed
2017-02-17 20:38jeromeAssigned Tojerome =>

Notes
(0001455)
jerome   
2017-02-17 20:38   
Confirmed that this can be reproduced.

However, the 'font' property from within class default property values, or in setting values for instantiation members, should always only be 'set' as a whole, e.g. font = { "Arial", 24 };

This is because setting font.size in this manner ends up resetting the same FontResource object to the 'font' property, and because 'FontResource' is not a struct (e.g. like it is supported for size.w = 80), this is not meant to be done.

Furthermore, instance the FontResource object being set is not necessarily the one being returned by the 'get', so this further complicates things.

Although it is unfortunate that this crashes the IDE, preventing the crash would likely be involved, therefore fixing this is unlikely to be prioritized.