-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Font not initialized when accessing an instance via a pointer? #20
Comments
My code example was missing |
Humm. The more I play with this, the more I think something just isn't getting constructed or initiated correctly when using a pointer and |
On class QwGrBufferDevice, the constructor that had the (x, y, w, h) parameters wasn't calling the default constructor - which initialized m_currentFont to nullptr. This worked when using a global/stack variable - since memory is probably zeroed in this case, but when alloc'd from the heap, memory is what it is - so m_currentFont was garbage - thus the font class variable looked valid, but it was not. This is fixed - my mistake from the beginning... -K |
Thanks for the fast fix @gigapod ! Much appreciated. But sadly we're not out of the woods yet... If I add I'll dig into this in the morning...
|
ahh heck ... standby ... |
Similar issue with the grssd1306 driver - bad logic with instance variable initialization. I really had my head wrong on constructor chaining when implementing this. Fixed!! and version of library bumped |
Oh, that is SO much better! It makes the following possible. Thanks!!
|
Just FYI: I bumped the library.properties version and re-released. Please Pull so you're all up to date! |
This is a fun one...!
causes ESP32 to explode at this line.
My TemplateFu is not strong enough to understand why... But I think it has something to do with the
QwFont
orQwGrBufferDevice
m_currentFont
not being initialized properly? I think->height
is possibly returningnullptr
?The text was updated successfully, but these errors were encountered: