Community
Participate
Working Groups
There are lots of NPE and CCE exceptions in parser and bindings code when indexing Mozilla project. Precondition: Before indexing with Full indexer, get per file scanner info discovered for the project.
Thanks Vlad. Devin, pls investigate. Call Andrew or I in if you need any help.
Can you attach your build log or email me a copy for working with this PR?
I also just want to make sure that we're using the same code base. I'm assuming that you're using the Mozilla 1.7.5 (suite) found: http://www.mozilla.org/download-mozilla.html specifically: http://ftp.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla1.7.5/source/mozi lla-source-1.7.5.tar.gz Let me know if this is incorrect.
Created attachment 24038 [details] zipped build log I built mozilla on my Linux box and then substituted home directory paths with local project path (on Windows). I suggest you to do the same. The source version is the same as the one you are using.
I got the #Includes discovered fine in Linux (and that's what I'm working with now) although I can't get them to be discovered in Windows using the same steps. Linux path: /home/dsteffle/mozilla-1_7_5/mozilla Windows path: /cygdrive/c/mozilla-1_7_5/mozilla In your build output I replaced /cygdrive/d/vmir/Project/CDT/samples/mozilla with the paths above. Steps taken to discover #Includes: 1- create new Standard Make C++ Project pointing the to mozilla source path (above) -> turn indexer off for now to make things faster -> turn on per file scanner info 2- in Properties->C/C++ Make Project->Discovery Options, Browse... for the text file containing the build output 3- click Load and wait for it to finish (seems to do some things, but does not add any #Includes in Windows, in Linux #Includes are picked up around 70%) 4- click Apply 5- click OK I tried this with your build output and my build output as well with no luck in Windows. I even tried changing the path to things like /c/mozilla- 1_7_5/mozilla, C:\mozilla-1_7_5\mozilla, etc but I can't get them to work.
Vlad did some magic on my workspace to get the #Includes discovered in Windows and it's running well now... although it looks like the NPE/CCE are caused by different reasons in Windows. It's also interesting to note that in Linux the Index started with ~13000 files and Windows started at ~11000 files or so. Right now Linux is at 27% with 9646 files left to index while Windows is at 12% with 8970 files left to Index.
Is said "magic" something that a user could do? :-) We need to identify hangs/Out Of Memory cases so pls let me know if there are particular files that break.
I don't know exactly what Vlad did but I was under the impression that he was going to commit those changes last night. There seemed to be a hang with discovery when the Automatically Build Project setting was turned on.
Vlad : If there is a fix, there should be a bug describing the problem.
Created attachment 24087 [details] Summary of results when indexing Mozilla on Windows Here's the summary of my results.
Created attachment 24088 [details] List of the missing #includes that have Problem Markers on them.
Created attachment 24089 [details] Brief info about the NPE and CCE found. Note that the exceptions in Linux are different and occur more frequently when indexing mozilla. My Linux machine isn't done indexing yet as it is a much slower machine.
Thanks Devin, this is very informative. I'd be interested in seeing how fast a non-debug run of mozilla takes on Windows.
Note that Bog says the index count seems really low. This is probably because mozilla isn't built on my Windows machine. On my Linux machine mozilla is built and it creates a lot of source code in the object directory when it builds the project. I noticed that Linux indexes ~13000 files while Windows only indexes ~10000 files.
It took 23 minutes to index Mozilla on my Windows machine with a non-debug run.
How many files were actually indexed?
The count started at around 10300 files on the Windows machine. I'm assuming that only files that get indexed are added to that count (shown in the Progress Monitor). If there are files in that count that don't actually get indexed then how can I found out how many files got indexed?
Remember we don't index files that don't have build info but they are included in the big count. I think the 150,000 index entries is almost 1/10th of what you should be getting for all of mozilla. But I could be wrong. Bogdan is figure out how to provide the count.
There are 32,670 INFO problem markers with "File not indexed because it was not built". The progress monitor showed that there were 10,300 files being indexed.
OK, I added the indexed file count to the info dialog. Bring up the Indexer View + click on the "i" to see the number of indexed files.
Comparison: Windows: P4 Hyperthreading 3.0Ghz 1.5 GB RAM -Xmx512M non-debug run time: 23 minutes IEntry Results: 156,397 Total Indexed Files: 4,584 Initial Index Count: ~10,300 INFO Problem Markers (File not indexed): 32,670 Note: Mozilla project not built on Windows machine (missing object directory) Linux: P4 2.0Ghz 512 MB RAM -Xmx350M non-debug run time: ~2 hours IEntry Results: 268,668 Total Indexed Files: 5,659 Initial Index Count: ~13,000 INFO Problem Markers (File not indexed): 8,615 Note: Mozilla project built on Linux machine (contains object directory)
I have fixed some class cast exceptions in: CFunction::updateParameterBindings CVisitor::createBinding (~ line 843) CPPSemantics::getTargetType there are still more I'm sure
Created attachment 24112 [details] changes Vlad made to my workspace to discover #includes in Windows Vlad- can you explain what this patch does? This is the changes that Vlad made to my workspace to get Windows to discover paths. I also had to make sure that the "automatically build workspace" setting is turned off (Window->Preferences->Workspace uncheck Build automatically).
Comment on attachment 24112 [details] changes Vlad made to my workspace to discover #includes in Windows The patch is obsolete. The fix for 102015 solved the problem.
Andrew, what of the exceptions have you fixed, you haven't updated this defect but I know you've been working on it. Can we cleanup the list and perhaps individually PR what remains so we can target them for RC candidates?
There are currently no CCE or NPE when indexing Mozilla in Windows and Linux. Marking this as fixed.