Skip to content

APPCRASH after app exit if CorString.Trim() function used. #108

@melanysoft

Description

@melanysoft

I'm submitting a bug report

Library Version: 3.2.0

Please tell us about your environment:

Windows 10

Code being run in the ActiveX dll:

Public Function TrimForJSON(ByVal Text As String, Optional ByVal TrimChars As String) As String
        
        On Error GoTo errhndl

        If TrimChars = vbNullString Then TrimChars = " " & vbTab & vbCrLf & vbLf
        TrimForJSON = CorString.Trim(Text, TrimChars)
    
Exit Function

There is appcrash report in the EventViewer that I can send if you thing there may be anything usefull in it.

During start program calls TrimForJSON("{"appver":"245.23","dbver":"1929"}") and everything seems fine.
But when the app is terminated some time later it crashes instead of closing gracefully. If the line:

TrimForJSON = CorString.Trim(Text, TrimChars)

is replaced by:

TrimForJSON = Text

app closes quietly (no error, no crash).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions