Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ Developers corner » Parser error: Unterminated string
Parser error: Unterminated string [message #46953] Wed, 28 September 2016 09:09 Go to next message
NilaT is currently offline  NilaT
Messages: 70
Registered: November 2011
Location: Austria
Member
Hello,

since I updated to Win10 with MSC15 and the latest Upp, several errors have occured.
Most of them are solved, but one error is very annoying and can't be solved by myself, so please help me.

As soon as I put some breakpoints in my code and step through it, it sometimes randomly (not at all points, but if it occurs one time at a specific point it will always occurs there, so I can reproduce it), crashes with an "Parser error(1, 386): Unterminated string" error.

The numbers vary, but the result is always the same, TheIDE crashes and all my work is lost.
Please, any help is highly appreciated!

Thanks!

PS: I searched the forum and found something regarding CParser::ReadString, which leads me to CParser::ReadOneString and
if(chkend) {
  ThrowError("Unterminated string");
  return result;
}

But, I put a Breakpoint there and it hasn't stopped there, so I don't think that's the right direction.
I can now say that ReadOneString doesn't create the error, as I commented the ThrowError part out, but the result stays the same. The funny thing is, the string "unterminated string" cannot be found at any other point than this... Pls help me, I don't know what I should do, but not be able to debug a program sucks.

//edit2: Could it be an error at idewin.cpp?
catch(const CParser::Error& e) {
  Exclamation("Parser error " + e);
  LOG("!!!!! Parser error " + e);
}
  • Attachment: error.jpg
    (Size: 11.07KB, Downloaded 229 times)

[Updated on: Wed, 28 September 2016 09:38]

Report message to a moderator

Re: Parser error: Unterminated string [message #46954 is a reply to message #46953] Wed, 28 September 2016 11:27 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
NilaT wrote on Wed, 28 September 2016 09:09
Hello,

since I updated to Win10 with MSC15 and the latest Upp, several errors have occured.
Most of them are solved, but one error is very annoying and can't be solved by myself, so please help me.

As soon as I put some breakpoints in my code and step through it, it sometimes randomly (not at all points, but if it occurs one time at a specific point it will always occurs there, so I can reproduce it), crashes with an "Parser error(1, 386): Unterminated string" error.

The numbers vary, but the result is always the same, TheIDE crashes and all my work is lost.
Please, any help is highly appreciated!

Thanks!

PS: I searched the forum and found something regarding CParser::ReadString, which leads me to CParser::ReadOneString and
if(chkend) {
  ThrowError("Unterminated string");
  return result;
}

But, I put a Breakpoint there and it hasn't stopped there, so I don't think that's the right direction.
I can now say that ReadOneString doesn't create the error, as I commented the ThrowError part out, but the result stays the same. The funny thing is, the string "unterminated string" cannot be found at any other point than this... Pls help me, I don't know what I should do, but not be able to debug a program sucks.

//edit2: Could it be an error at idewin.cpp?
catch(const CParser::Error& e) {
  Exclamation("Parser error " + e);
  LOG("!!!!! Parser error " + e);
}


I remember fixing bug like that... Are you sure you have the latest trunk ide?
Re: Parser error: Unterminated string [message #46955 is a reply to message #46953] Wed, 28 September 2016 11:39 Go to previous messageGo to next message
NilaT is currently offline  NilaT
Messages: 70
Registered: November 2011
Location: Austria
Member
I have Version 9251 (64bit)
Compiled 12/01/2015 11:07:04

Is there an easy way for me to fix this?
Thanks!
Re: Parser error: Unterminated string [message #46956 is a reply to message #46955] Wed, 28 September 2016 19:21 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
NilaT wrote on Wed, 28 September 2016 11:39
I have Version 9251 (64bit)
Compiled 12/01/2015 11:07:04

Is there an easy way for me to fix this?
Thanks!


http://www.ultimatepp.org/www$uppweb$nightly$en-us.html
Re: Parser error: Unterminated string [message #46958 is a reply to message #46956] Thu, 29 September 2016 10:13 Go to previous messageGo to next message
NilaT is currently offline  NilaT
Messages: 70
Registered: November 2011
Location: Austria
Member
Okay, tried it with
Version 10249
(64 bit)(GCC)(C++11)
Compiled 09/29/2016 6:20:50

and seems to work in a first test.
Hope that this version has no other issues Wink

Thanks
Re: Parser error: Unterminated string [message #46960 is a reply to message #46958] Fri, 30 September 2016 06:56 Go to previous messageGo to next message
nlneilson is currently offline  nlneilson
Messages: 644
Registered: January 2010
Location: U.S. California. Mojave &...
Contributor
NilaT

I have used strings where the termination or 'the end' was necessary.

Have you tried having the nul character /0
In many instances it is automatically added 'or is just there'
by convention but my code often adds that to the end of a string.
It has worked for me using the U++ code going back several years.

[Updated on: Fri, 30 September 2016 07:03]

Report message to a moderator

Re: Parser error: Unterminated string [message #46961 is a reply to message #46960] Fri, 30 September 2016 08:25 Go to previous message
NilaT is currently offline  NilaT
Messages: 70
Registered: November 2011
Location: Austria
Member
Well, the problem is, we use several strings in our program, some cause there error, but most do not.
And for me it seems to be an Upp error, as the newer version not causes it.
But all good, error seems to be fixed. Maybe it was an issue only for this particular build... don't know.
Previous Topic: Possible solution of "icpp problem"
Next Topic: lambda troubles...
Goto Forum:
  


Current Time: Thu Mar 28 12:52:10 CET 2024

Total time taken to generate the page: 0.01979 seconds