Comments (18)
Ok, so that formatting was easier than expected.
Here are the sequences I've tried and their results. | indicated cursor position.
// Original example
if (something)
{|} // was auto-indented here
Enter => Error
if (something) {|}
Enter => Error
// # = any character
if (something) {#|}
Enter =>
if (something) {#
|
}
if (something) {|}
if (something) {}| // Move cursor anywhere
if (something) {|} // Move cursor back
Enter =>
if (something) {
|
}
from e.
Just tried this on my build; typed the first two lines of the original example above, then pressing '{' gave me an assert within the binary-only core library.
The last line I have source for is Document.cpp, line 310 "m_textData.GetTextPart() in Document::TextPart."
from e.
Could you try this with the latest master (build with wxwidgets 2.8.10)? I don't seem to be able to reproduce it here.
Are you writing the PHP code within a HTML document (with HTML as the selected syntax)?
from e.
I'm still crashing, built on Vista x64 with wxWidgets 2.8.10. It crashes in any programming language bundle (I'm using JavaScript), if (something) {} still crashes, deleting the right one and adding it again and pressing works. It only seems to be when it is autocompleting the curly braces.
from e.
My |ENTER| tags disappeared (I guess it thought it was an HTML element, silly me).
"[...] if (something) {|ENTER|}"
"[...] adding it again and pressing |ENTER| works"
from e.
Entering this on XP3 (32) w/ 2.8.10 still crashes e. New document, select PHP:
// Original example
if (something)
{
On typing the { I get an assertion failure.
from e.
Weird, I am still not able to reproduce it (I am on Vista (32)).
@adamv: Did the assert in the core library give any output?
from e.
I had it working for a second yesterday, but now I'm back with crashes again. It doesn't seem to be curly bracers only though, in at least JavaScript [] also breaks e with the same error message.
from e.
Could you give me the exact text of the error message? I would really like to track this down, but as I can't reproduce it on my setup, I will need as much info as possible from those of you who experience it.
from e.
c:\dev\ecore\cdatatext.cpp(90): assert "utf8_len(buffer[b] == len - b" failed in cDataText::GetTextPart().
call stack:
...
[06] Document::GetTextPart document.cpp:310
Styler_Syntax::DoSearch styler_syntax:464
Styler_Syntax::Insert styler_syntax:955
EditorCtrl::StylersInsert editorctrl.cpp:2860
and some more lines up through [20] GetDC.
from e.
http://www.flickr.com/photos/adamvandenberg/3531770585/
from e.
The assert indicates that the range of text requested by GetTextPart ends in the middle of an uncomplete utf-8 sequence. Since there is nothing above the ascii range in the sample, it seems like some garbage memory is at some point above getting written into the document. This could also be why I can't reproduce is (it may depend on memory layout).
It would be very helpful if you could step through EditorCtrl::InsertChar before the assert happens, and see what gets inserted. The problem seems to be associated with indentation changes, so it might be useful to keep an eye on the variable m_indent (which contains the current indentation unit).
Could you also tell me what your current indentation settings are?
from e.
I leave the debugging to adamv, I don't know what the hell I'm doing. :-) I actually thought about the indentation earlier, I'm using a custom "two spaces represents tab" and the document encoding's I'm using varies between ISO-8859-1 and UTF-8 (mainly UTF-8 though)
from e.
I'm set to Soft Tabs, 4, default (Windows 1252), CRLF
from e.
(Also, I have to set the new document to PHP before typing, or it doesn't repro.)
On line 2264 there's a doc.Insert(linestart=35, indent=string containing 4 spaces)
This returns an indent_len of 4
Line 2266: m_lines.Insert(linestart=35, indent_len=4)
Then I step into EditorCtrl::StylersInsert
Inside Styler_Syntax::Insert(pos=35, length=4)
docLen = 41
Get down to Styler_Syntax:DoSearch(start=35, end=41, limit=41)
Line 463, doc.GetTextPart(si.lineStart=35, si.lineEnd=42, si.line=empty vector
Get into Document::GetTextPart.
Calls m_textData.GetTextPart(start_pos=35, end_pos=41, buffptr = resized to 6 characters)
At that point I don't have source code, and the assertion happens.
from e.
Thanks to those of you who sent me further info. I have located the problem, and it is a bug in the metakit library. I should have a fix out shortly.
from e.
Awesome, looking forward to try it out!
from e.
Fixed bug in metakit that garbled insertions. Closed by 2d0178b
from e.
Related Issues (20)
- WebKit release build
- error: conflicting declaration ‘typedef struct _GSocket GSocket’ HOT 3
- /usr/bin/ld: cannot find -ltomcrypt (compiling on ubuntu 9.1) HOT 2
- Ubuntu make errors - Multiple definition of pcre, undefined references to wx functions etc. HOT 4
- get_externals_win.sh: line 38: mktemp: command not found HOT 2
- error while make HOT 2
- E will not compile on Ubuntu Lucid Lynx 10.04 HOT 6
- UndoHistory.cpp error HOT 2
- /usr/bin/ld: cannot find -lwxwebkit
- open the file, delete the file when the file is still on edit, then see what happen. HOT 2
- Linker error in tm_syntaxhandler.cpp (Ubuntu 10.10 64bit)
- segmentation fault HOT 5
- Error opening WebPreview HOT 2
- Fatal error when building on Ubuntu 10.10 HOT 1
- How to retrieve license? HOT 5
- Libcore HOT 2
- What happened to this editor? HOT 13
- Homepage down HOT 1
- Still maintained? HOT 2
- E
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from e.