Bug 6276 - Code parsing fails to work when a very long literal string is entered
Summary: Code parsing fails to work when a very long literal string is entered
Status: RESOLVED FIXED
Alias: None
Product: Compilers
Classification: Mono
Component: C# ()
Version: unspecified
Hardware: PC Linux
: Normal normal
Target Milestone: ---
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2012-07-25 10:47 UTC by Mathias
Modified: 2012-08-03 10:49 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Test class with long string which causes this error (4.04 KB, text/plain)
2012-07-25 10:47 UTC, Mathias
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Mathias 2012-07-25 10:47:27 UTC
Created attachment 2255 [details]
Test class with long string which causes this error

If I want to use a very long literal string in a code file code parsing stops to work. The symptoms are:

1. In the line above the text editor, instead of 
[classname] > [methodname]
, now 
[classname] > No selection
 is shown.

2. Code completion runs amoc (local variables are no longer found, not even basic keywords and variable types). For instance, if I want to write a foreach-loop "in" gets expanded to "indexer"

I wasn't able to find out the actual length of the string when this starts to happen, it also appears to depend on the other content of the file. But the file attached includes an example. Removing one character in the string makes everything work again.

My setup is: Linux, openSuse 12.1, 32 bit, monodevelop 3.0.3.4, mono 2.10.9
Comment 1 Mike Krüger 2012-07-26 03:18:04 UTC
@Marek: It's the consume_string method in the tokenizer. It throws a not implemented exception.

Why not solving that issue simply by storing the original string into a string builder in full ast mode ?
Comment 2 Marek Safar 2012-08-02 18:02:47 UTC
Fixed in master
Comment 3 Mathias 2012-08-03 04:38:54 UTC
Is that a fix in mono or in monodevelop?
Comment 4 Marek Safar 2012-08-03 10:44:27 UTC
it's fixed in master monodevelop
Comment 5 Mike Krüger 2012-08-03 10:49:12 UTC
just verified fixed with master of today.