SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
[SA 9.0.0144 Pro BETA] - Snippet content pasting

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
[SA 9.0.0144 Pro BETA] - Snippet content pasting
Author Message
gemisigo



Joined: 11 Mar 2010
Posts: 1402

Post [SA 9.0.0144 Pro BETA] - Snippet content pasting Reply with quote
The contents of some snippets are incorrectly pasted. For example I have the following text in a snippet that is assigned to the word 'where':
Code:

WHERE   1 = 1
    AND|


Typing 'where' in the editor will result in the following:
Code:

WHERE 1 = 1 AND


or for the snippet 'while':
Code:

WHILE |
BEGIN
   
END


which will end up as:
Code:

WHILE  BEGIN END
END


Neither of them has the Code Formatting Style set, hence I guess their format should not be modified (that is, they should be pasted as they are in the snippet editor).
Mon Sep 19, 2016 5:55 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6513

Post Reply with quote
Thank you. I have logged this issue in our tracking system, for the reference #SA0029470
Mon Sep 19, 2016 8:01 am View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 1402

Post Reply with quote
Thank you very much. Can you tell me a time estimate on this one? It not only happens when pasting the stuff that's in the snippet but when executing it as well. It breaks quite a couple of my snippets, eg. the following snippet
Code:

-- show rights for principal
$$
SELECT
    OBJECT_SCHEMA_NAME(p.major_id)     AS [schema_name]
   ,OBJECT_NAME(p.major_id)            AS [object_name]
   ,USER_NAME(p.grantee_principal_id)  AS database_principal
   ,p.permission_name                  AS permission
   ,'REVOKE ' + p.permission_name + ' ON [' + OBJECT_SCHEMA_NAME(p.major_id) + '].[' + OBJECT_NAME(p.major_id) + '] FROM [' + USER_NAME(p.grantee_principal_id) + ']' AS revoke_right
   ,'GRANT ' + p.permission_name + ' ON [' + OBJECT_SCHEMA_NAME(p.major_id) + '].[' + OBJECT_NAME(p.major_id) + '] TO [' + USER_NAME(p.grantee_principal_id) + ']' AS grant_right
FROM
    sys.database_permissions           AS p
WHERE   p.class = 1
    AND OBJECTPROPERTY(p.major_id ,'IsMSSHipped') = 0
    AND USER_NAME(p.grantee_principal_id) = '$OBJECT(role, login)$'
ORDER BY
    OBJECT_SCHEMA_NAME(p.major_id)
   ,OBJECT_NAME(p.major_id)
   ,USER_NAME(p.grantee_principal_id)
   ,permission_name
$$   

throws an error mesage
Quote:

Msg 195, Level 15, State 10, 'OBJECT_SCHEMA_NAMHEMA_NAME' is not a recognized built-in function name.
The command(s) completed with errors (12.21 ms).

Wed Sep 21, 2016 3:40 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6513

Post Reply with quote
We expect a new build by the end of this week. The main issue we are trying to address in that build is crashing 64-bit applications on Windows 10 64-bit. The fix for multi-line value copying is going to be in that build too.
Wed Sep 21, 2016 8:16 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6513

Post Reply with quote
This issue should be fixed in 9.0.151. Please download the latest beta build, same link as before, and install it. You don't need to uninstall the current one
Tue Sep 27, 2016 12:29 am View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 1402

Post Reply with quote
Getting close but still no there. Inserting snippet text is fixed, and the snippets that are executing code instead of inserting it are now working. Until something breaks and they suddenly aren't. I managed to narrow down the list to two of them (both triggered by alt+num and operating on selected text). An exception is thrown out of the blue and after that these are no longer willing to comply. I cannot reliably reproduce it but have seen in multiple times. I'll post the exception here next time it occurs.

EDIT: here it is.
Quote:

Exception: OnKeyPress(55,537395201)
Access violation at address 0000000008C3C421 in module 'SqlAssistPrefs64.dll'. Read of address 000000000C2E49DE
operating system : Windows 10 x64 build 14393
system language : English
system up time : 4 days 20 hours
program up time : 1 minute 21 seconds
processors : 4x Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz
physical memory : 2155/8097 MB (free/total)
free disk space : (C:) 73.44 GB
display mode : 1920x1080, 32 bit
process id : $20f4
allocated memory : 136.44 MB
largest free block : 131025.98 GB
executable : SqlEditor64.exe
current module : SqlAssistPrefs64.dll
module date/time : 2016-09-27 01:56
version : 9.0.151.0
callstack crc : $c0244f95, $804a7ee3, $1c1b28c1
exception number : 1
exception class : EAccessViolation
exception message : Access violation at address 0000000008C3C421 in module 'SqlAssistPrefs64.dll'. Read of address 000000000C2E49DE.

main thread ($bfc):
08c3c421 +7d1 SqlAssistPrefs64.dll SnipsUnit 1100 +97 GetCurrent
08c3d3e6 +ec6 SqlAssistPrefs64.dll SnipsUnit 1274 +170 TSnips.OnCheckKey
08c39e65 +1e5 SqlAssistPrefs64.dll SnipsUnit 689 +23 TSnips.CheckKey
08c3dfc7 +027 SqlAssistPrefs64.dll SnipsUnit 1427 +3 TSnipsManager.CheckKey
08ccfabf +24f SqlAssistPrefs64.dll TargetUnit 1433 +24 TTargetManager.OnKeyPress
08ccde2d +74d SqlAssistPrefs64.dll TargetUnit 1105 +60 TTargetManager.WndProc
08320ff6 +016 SqlAssistPrefs64.dll Subclass 111 +2 TSubclass.WndProcPrev
08696562 +062 SqlAssistPrefs64.dll PanDock 311 +8 TDockPan.PairWndProc
083213c7 +027 SqlAssistPrefs64.dll Subclass 173 +1 TSubProc.WndProc
08320c5e +0be SqlAssistPrefs64.dll Subclass 68 +6 SubclassWndProc

thread $86c:
004fff29 +49 SqlEditor64.exe madExcept 17280 +7 ThreadExceptFrame

thread $1e10:
08c0dda3 +53 SqlAssistPrefs64.dll SyntaxUnit 1696 +4 TSyntaxThread.Execute

thread $22cc:
085dc00e +2e SqlAssistPrefs64.dll VirtualTrees 6375 +4 TWorkerThread.Execute

thread $4d04:
08c0dda3 +53 SqlAssistPrefs64.dll SyntaxUnit 1696 +4 TSyntaxThread.Execute

thread $33d4:
08c0dda3 +53 SqlAssistPrefs64.dll SyntaxUnit 1696 +4 TSyntaxThread.Execute

thread $fe8:
08c0dda3 +53 SqlAssistPrefs64.dll SyntaxUnit 1696 +4 TSyntaxThread.Execute

cpu registers:
rax = 000000000c045c20
rbx = 0000000000000035
rcx = 000000000014f6e0
rdx = ffffffffffeb0f30
rsi = 000000000014f164
rdi = 000000000014f5f0
rip = 0000000008c3c421
rsp = 000000000014f0d0
rbp = 000000000014f0d0
r8 = 0000000000000000
r9 = 0000000000000006
r10 = 00000000000000e0
r11 = 0000000000000052
r12 = 00000000002b1796
r13 = 000000000000024b
r14 = 0000000000000000
r15 = 0000000000000000

disassembling:
[...]
08c3c40b mov rcx, [rbp+$38]
08c3c40f lea rcx, [rcx+rbp+$428]
08c3c417 mov rdx, rbp
08c3c41a neg rdx
08c3c41d movsxd rcx, dword ptr [rcx+rdx]
08c3c421 > cmp word ptr [rax+rcx*2-2], $27
08c3c427 jnz loc_8c3c44e
08c3c429 1101 lea rcx, [$8c3c51c]
08c3c430 mov rax, [rbp+$38]
08c3c434 lea rax, [rax+rbp+$488]
08c3c43c mov rdx, rbp
[...]


Tue Sep 27, 2016 8:07 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6513

Post Reply with quote
Thanks a ton! We have opened new ticket to investigate the new issue and the crash, SA#0029493
Wed Sep 28, 2016 2:10 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.