Calling GetScintilla() on non-scintilla control

Bugs will be moved here once resolved.

Post » Fri Nov 03, 2017 8:50 pm

Problem Description
When there's a plugin with a Condition with a parameter added with AddVariadicParams, an error pops up in Construct when editing condition parameters and clicking on "Add parameter" link. The error only pops up if Variadic parameter is not added the last. If it's the last parameter listed, everything is ok.

When you click "Retry", the error pop up goes away and everything works. Even the condition works correctly. On runtime it sees all the Variadic parameters you pass.

Attach a Capx
Don't know what to attach since the problem is in a plugin mechanism

Description of Capx
Same here

Steps to Reproduce Bug
  • Add to any plugin a Condition with AddVariadicParams("Name", "Description"); (which is not the last one)
  • Open Construct
  • Create a project
  • Create a condition
  • Click "Add parameter" link

Observed Result
Error pops up

Expected Result
Opens a new field for a parameter

Affected Browsers
  • Chrome: (YES)

Operating System and Service Pack
Windows 10 Pro 64-bit

Construct 2 Version ID
248 (64-bit) checked

Here's the content of the error pop up:

---------------------------
Construct 2 Check failure
---------------------------
Check failure! This is probably a bug:

Calling GetScintilla() on non-scintilla control

Condition: HasScintilla()
File: Projects\Parameters.cpp
Line: 3198
Function: class CScintilla &__cdecl ParamControlSet::GetScintilla(int)
Build: release 248 (64-bit) checked
Component: Construct 2 IDE
(Last Win32 error: 0)

You are using a 'checked' release of Construct 2, intended for testing, which causes certain errors to be reported this way. Hit Ctrl+C to copy this messagebox - it's useful information for the developers, so please include it with any bug reports! Click 'Abort' to quit (unsaved data will be lost!),'Retry' to turn off messages for this session and continue, or 'Ignore' to continue normally.
---------------------------
Abort Retry Ignore
---------------------------
Last edited by valerypopoff on Sun Nov 05, 2017 7:45 am, edited 1 time in total.
B
11
S
6
Posts: 32
Reputation: 1,041

Post » Sun Nov 05, 2017 12:07 am

@valerypopoff I'm anxious to test your plugin.
This error is probably because you put AddVariadicParams in the middle of the condition. In Construct 2 this operation can only be at the end.

Cheers.
Image
Bitcoin Wallet: 1GCRqZExcP6svMdKGpCaRH4A8QAZtSjXxu
B
46
S
18
Posts: 224
Reputation: 3,708

Post » Sun Nov 05, 2017 12:19 am

Holy cow! Is this documented anywhere?

Nandynho wrote:@valerypopoff I'm anxious to test your plugin.
This error is probably because you put AddVariadicParams in the middle of the condition. In Construct 2 this operation can only be at the end.

Cheers.
Image
B
11
S
6
Posts: 32
Reputation: 1,041

Post » Sun Nov 05, 2017 1:10 am

It's subtle, but yes:
https://www.scirra.com/manual/19/action ... xpressions
ef_variadic_parameters
Construct 2 will allow the expression to be used with additional 'any type' parameters past the end of those specified. Any parameters that are specified will still be required and type checked. If no parameters are specified, the expression can be used with any number of parameters at all.
ImageImageImage
B
71
S
22
G
268
Posts: 3,809
Reputation: 148,249

Post » Sun Nov 05, 2017 12:00 pm

Variadic parameters were implemented solely for the Function plugin. Anything the Function plugin doesn't need may be missing or buggy. I'd advise against using them if you can.
Scirra Founder
B
406
S
240
G
92
Posts: 24,777
Reputation: 197,780

Post » Sun Nov 05, 2017 2:59 pm

I guess in my case I can not.

I made a plugin with the condition that works like this:
Image

It works perfectly in Construct 3 but this is a problem for Construct 2. What would you recommend?



Ashley wrote:Variadic parameters were implemented solely for the Function plugin. Anything the Function plugin doesn't need may be missing or buggy. I'd advise against using them if you can.
B
11
S
6
Posts: 32
Reputation: 1,041

Post » Mon Nov 06, 2017 10:47 am

The variadic parameter has to be at the end. It wasn't even designed to work in C3 with it not at the end, if it works it's only by accident!
Scirra Founder
B
406
S
240
G
92
Posts: 24,777
Reputation: 197,780

Post » Wed Nov 15, 2017 12:25 pm

Closing as won't fix since we won't be updating C2 to support this at this stage.
Scirra Founder
B
406
S
240
G
92
Posts: 24,777
Reputation: 197,780


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest