About Store Forum Documentation Contact
Donations:
327$/mo



Post Reply 
[Code Editor] Crash on Build After Switching Projects
Author Message
Driklyn Offline
Member

Post: #1
[Code Editor] Crash on Build After Switching Projects
If you start Code Editor with a previously opened project being automatically loaded, then directly load another project and press F7 to build, the editor crashes.

To get around this, I have to load the new project, close the editor and reopen it so the new project is automatically loaded. After doing this it doesn't crash when building.
11-25-2011 07:50 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: [Code Editor] Crash on Build After Switching Projects
Hi, I've tested this using sample projects from SDK\Esenthel Script and I don't have this problem (Editor.exe)
loaded projects using Shift+F3, builded using F7
switched between many projects a few times and no problem.

do you have the problem also on projects from SDK? or do they need to be your own projects?
11-25-2011 01:00 PM
Find all posts by this user Quote this message in a reply
Driklyn Offline
Member

Post: #3
RE: [Code Editor] Crash on Build After Switching Projects
Okay, did some more testing and I've found the specific circumstances that makes the editor crash.

I created a new application in one of my projects and attempted to add Google's V8 JavaScript Engine to it as a library in the application's properties, however, I could not get it to build because it says:

Error: invalid "static" keyword for global variables/functions.

I remember this being a limitation of Code Editor so I decided to use Visual Studio instead, which is fine.

This is where the problem comes in.

The application using the V8 library is one of several applications I have in a single project. Turns out, if I switch from the V8 application (doesn't matter if it's the "checked" application upon starting Code Editor) and then switch to a another application within the same project (or if I load a completely different project), the editor crashes upon build.

This occurs in all versions of Editor and is not a random crash, it occurs every time.

I thought perhaps the crash had to specifically deal with the static keyword error, so I tried adding a static global variable and function to a different application before then switching to another application, but the crash does not occur when building.

So, my guess is that you need to include a library which gives you the static keyword error, such as V8, for the crash to occur.
11-26-2011 01:29 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: [Code Editor] Crash on Build After Switching Projects
So I need to have project with:
-application that has static keyword for global variable
-some other application
switch from app with static keyword to other and build it?

I've tested it but no crash.

Can you attach compressed project files (I need the v8 application, and a simple minimum application that can reproduce the error, it doesn't need to be your full project, at least the minimum version that causes the crash).
11-27-2011 03:54 PM
Find all posts by this user Quote this message in a reply
Driklyn Offline
Member

Post: #5
RE: [Code Editor] Crash on Build After Switching Projects
Discovered even more about this crash. I have included a zip file containing the contents of everything you need. It has 3 projects: one which causes the crash, one which doesn't, and another that compiles successfully.

http://dl.dropbox.com/u/1032339/v8-lib.zip

When you unzip the file, place /include, /src, v8.dll, and v8.lib in C:/v8-lib on your hard drive.

Place the contents of _place_contents_in_Loading_World_folder in EsenthelEngineSDK/Tutorials - Esenthel Script/Loading World.

The first application includes the V8 library, whereas the second does not.

--------------------

Differences between the 3 projects:

I didn't realize I was including the headers from the wrong folder (from /src instead of /include of the V8 library) when I first tried using Code Editor before switching to Visual Studio. The only way I can reproduce the crash is by using the headers from /src. This is the only difference between the (crash) and (no crash) projects.

I discovered how to successfully include the library: you have to include the header files using relative paths instead of full paths in order to eliminate the "static keyword" error. (This is a bug, no?) This is the only difference between the (no crash) and (compiles) projects.

--------------------

If you load the (crash) project into Code Editor, then switch from the first application to the second and press Build, it will crash. Now, this project uses the wrong headers (from /src instead of /include, as I said earlier). I suppose this has to do with why it is crashing..? I know they're the wrong header files, but still, I don't believe it should cause a crash.
11-27-2011 11:51 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #6
RE: [Code Editor] Crash on Build After Switching Projects
Thanks for detailed explanation and attached files, and sorry for late reply!
I am investigating this now
12-08-2011 01:59 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #7
RE: [Code Editor] Crash on Build After Switching Projects
okey, after many days of hard work I've improved code editor parser to deal correctly with the headers
12-12-2011 09:22 PM
Find all posts by this user Quote this message in a reply
Driklyn Offline
Member

Post: #8
RE: [Code Editor] Crash on Build After Switching Projects
Very cool, nice job and dedication..

Code Editor no longer crashes, however, I still must use relative paths when including the headers, absolute paths still gives me the static keyword error; at least, this is the case with the V8 library.
12-12-2011 11:50 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #9
RE: [Code Editor] Crash on Build After Switching Projects
Hi, please start Autoupdate, I've uploaded some other fixes.
12-13-2011 12:55 AM
Find all posts by this user Quote this message in a reply
Driklyn Offline
Member

Post: #10
RE: [Code Editor] Crash on Build After Switching Projects
Great! Both absolute and relative paths are working now.. Thanks.
12-13-2011 01:20 AM
Find all posts by this user Quote this message in a reply
Post Reply