Scintilla Crashes

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Scintilla Crashes

thomas....@natural-software.eu
Hello

I don't how, but I got the Scintilla Editors (under Windows) to crash. I was changing colors, fonts, worked on the formatting options and all of a sudden, the editors crashed, etc.

I changed the following methods in order to get everything working again. I believe the changes won't affect the "normal" behaviour.

Class OSSintillaEditor

initializeDirectPointer
"SCI_GETDIRECTPOINTER returns a pointer to data that identifies this scintilla window.
This is used as an argument when calling scintilla's direct function"
| primAddress |
handle isNil ifTrue: [^ self ].
primAddress := handle sendMessage: SCI_GETDIRECTPOINTER wParam: 0 lParam: 0.
primAddress isNil ifTrue: [^ self ].
scDirectPointer := OSPtr address: primAddress

sendMessage: msg with: wParam with: lParam
"Send messages to Scintilla Editor Control
using the windows message queue
NOTE Platform-specific implementation."

handle isNil ifTrue:  [^ self ].
^handle sendMessage: msg wParam: wParam lParam: lParam

windowProc: msg with: arg1 with: arg2
"This is the Smalltalk window procedure for the receiver."

(msg == WinScintillaConstants::WmImeRequest and: [arg1 == WinScintillaConstants::ImrReconvertString])
ifTrue: [| selectedStr selectedSize textLength reconvertSize |
"Process IME support. NOTE Based on Notepad++ source ScintillaEditView.cpp:305"
reconvertSize := OSReconvertString fixedSize.
"Get selected text..."
owner isNil ifTrue: [^ self ].
                      :        :        :
                      Rest of method.


Kind regards

Thomas


--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Scintilla Crashes

Seth Berman
Hi Thomas,

Thank you for the report.  I'll enter it into our system and have a look.

Regards,

-- Seth

On Wednesday, January 18, 2017 at 9:34:24 AM UTC-5, Thomas Stalzer wrote:
Hello

I don't how, but I got the Scintilla Editors (under Windows) to crash. I was changing colors, fonts, worked on the formatting options and all of a sudden, the editors crashed, etc.

I changed the following methods in order to get everything working again. I believe the changes won't affect the "normal" behaviour.

Class OSSintillaEditor

initializeDirectPointer
"SCI_GETDIRECTPOINTER returns a pointer to data that identifies this scintilla window.
This is used as an argument when calling scintilla's direct function"
| primAddress |
handle isNil ifTrue: [^ self ].
primAddress := handle sendMessage: SCI_GETDIRECTPOINTER wParam: 0 lParam: 0.
primAddress isNil ifTrue: [^ self ].
scDirectPointer := OSPtr address: primAddress

sendMessage: msg with: wParam with: lParam
"Send messages to Scintilla Editor Control
using the windows message queue
NOTE Platform-specific implementation."

handle isNil ifTrue:  [^ self ].
^handle sendMessage: msg wParam: wParam lParam: lParam

windowProc: msg with: arg1 with: arg2
"This is the Smalltalk window procedure for the receiver."

(msg == WinScintillaConstants::WmImeRequest and: [arg1 == WinScintillaConstants::ImrReconvertString])
ifTrue: [| selectedStr selectedSize textLength reconvertSize |
"Process IME support. NOTE Based on Notepad++ source ScintillaEditView.cpp:305"
reconvertSize := OSReconvertString fixedSize.
"Get selected text..."
owner isNil ifTrue: [^ self ].
                      :        :        :
                      Rest of method.


Kind regards

Thomas


--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.