Krzmbrzl / SQDev

The eclipse plugin for easy Arma development (SQF + more)
http://krzmbrzl.github.io/SQDev/
Other
10 stars 1 forks source link

NullPointerException while creating new Project #105

Closed TeaObvious closed 8 years ago

TeaObvious commented 8 years ago

Using Mars.2 on Linux there is a Bug which causes a NullPointerException in Plugin Version 0.6.1

I've no experience with developing eclipse Plugins so i have no glue if the information in the error.txt do help.

I've several other plugins installed like egit, but the problems seems to start at raven.sqdev.util.SQDevPreferenceUtil.getProfilesDocumentDirectory(SQDevPreferenceUtil.java:113)

Similar things happen if you try to change the preferences of SQDev.

TeaObvious commented 8 years ago

The Problems seems to occur if the Plugin does not find any Arma Profiles.

Krzmbrzl commented 8 years ago

Thanks for the report!

Are the profiles on Linux stored differently than on Windows (Documents/ArmA 3 - Other Profiles/... Or Documents/ArmA 3/...)? But you do have a profile on your Linux machine, don't you?

Is this exception thrown on editing ANY SQDev preference? Otherwise you could try to set the "ArmA Documents Directory" and see if that helps...

Krzmbrzl commented 8 years ago

Did you start the Plugin for the first time when this error occurred? If so I know where the problem is... The Plugin sets an empty string for the respective preference on Linux (as I don't know where the documents folder is located on Linux) and when the Plugin loads this empty string the error occurs...

TeaObvious commented 8 years ago

I started the Plugin for the first time (only found your plugin 15 minutes ago my report).

The error occurs when clicking on SQDev in Preferences, if i open the tree and click on Editor/Linking/Misc everything seems to work.

On Linux the Documents/Arma 3 stuff is located in $HOME/.local/share/bohemiainteractive/arma3/ (dunno how to evaluate the environment variable $HOME in java, $HOME is the same as /home/$USERNAME/ - at least on most machines so try using $HOME.)

Maybe you could add an option to set this Path in the Preferences, in case its different or there are some problems with the username.

here is the listing of this directory:

.local/share/bohemiainteractive/arma3/ .local/share/bohemiainteractive/arma3/eon.txt .local/share/bohemiainteractive/arma3/AppDataShared .local/share/bohemiainteractive/arma3/AppDataShared/Bohemia Interactive .local/share/bohemiainteractive/arma3/AppDataShared/Bohemia Interactive/Arma3 .local/share/bohemiainteractive/arma3/AppDataShared/Bohemia Interactive/Arma3/registration.log .local/share/bohemiainteractive/arma3/AppDataLocal .local/share/bohemiainteractive/arma3/AppDataLocal/Arma 3 .local/share/bohemiainteractive/arma3/AppDataLocal/Arma 3/MonetizedServersCache .local/share/bohemiainteractive/arma3/AppDataLocal/Arma 3/MonetizedServersCache/list.json .local/share/bohemiainteractive/arma3/AppDataLocal/Arma 3/SteamPreviewCache .local/share/bohemiainteractive/arma3/AppDataLocal/Arma 3/SteamPreviewCache/benchmark%20altis.altis.jpg .local/share/bohemiainteractive/arma3/AppDataLocal/Arma 3/Arma3Retail_DX11_2016-09-05_15-34-37.bidmp .local/share/bohemiainteractive/arma3/AppDataLocal/Arma 3/Arma3Retail_DX11_2016-09-14_21-49-13.rpt .local/share/bohemiainteractive/arma3/AppDataLocal/Arma 3/mpStatistics_5695.log .local/share/bohemiainteractive/arma3/AppDataLocal/Arma 3/Arma3Retail_DX11_2016-09-14_22-05-28.rpt .local/share/bohemiainteractive/arma3/AppDataLocal/Arma 3/Arma3Retail_DX11_2016-09-14_22-08-01.rpt .local/share/bohemiainteractive/arma3/AppDataLocal/Arma 3/Arma3Retail_DX11_2016-09-14_22-08-55.rpt
.local/share/bohemiainteractive/arma3/AppDataLocal/Arma 3/Arma3Retail_DX11_2016-09-14_22-10-28.rpt
.local/share/bohemiainteractive/arma3/AppDataLocal/Arma 3/Arma3Retail_DX11_2016-09-14_22-12-02.rpt .local/share/bohemiainteractive/arma3/AppDataLocal/Arma 3/Arma3Retail_DX11_2016-09-14_22-14-28.rpt .local/share/bohemiainteractive/arma3/AppDataLocal/Arma 3/Arma3Retail_DX11_2016-09-15_16-35-23.rpt .local/share/bohemiainteractive/arma3/AppDataLocal/Arma 3/Arma3Retail_DX11_2016-09-26_00-57-40.rpt .local/share/bohemiainteractive/arma3/AppDataLocal/Arma 3/Arma3Retail_DX11_2016-09-28_22-30-29.rpt .local/share/bohemiainteractive/arma3/GameDocuments .local/share/bohemiainteractive/arma3/GameDocuments/Arma 3 .local/share/bohemiainteractive/arma3/GameDocuments/Arma 3/Arma3.cfg .local/share/bohemiainteractive/arma3/GameDocuments/Arma 3/Player.Arma3Profile .local/share/bohemiainteractive/arma3/GameDocuments/Arma 3/Player.vars.Arma3Profile .local/share/bohemiainteractive/arma3/GameDocuments/Arma 3/missions .local/share/bohemiainteractive/arma3/GameDocuments/Arma 3/missions/test.Stratis .local/share/bohemiainteractive/arma3/GameDocuments/Arma 3/missions/test.Stratis/mission.sqm .local/share/bohemiainteractive/arma3/GameDocuments/Arma 3/missions/test2.sanjuanisl .local/share/bohemiainteractive/arma3/GameDocuments/Arma 3/missions/test2.sanjuanisl/mission.sqm .local/share/bohemiainteractive/arma3/GameDocuments/Arma 3/missions/test2.sanjuanisl/Description.ext .local/share/bohemiainteractive/arma3/GameDocuments/Arma 3/missions/animation.sanjuanisl .local/share/bohemiainteractive/arma3/GameDocuments/Arma 3/missions/animation.sanjuanisl/mission.sqm .local/share/bohemiainteractive/arma3/GameDocuments/Arma 3/missions/animation.sanjuanisl/initintro.sqs .local/share/bohemiainteractive/arma3/GameDocuments/Arma 3/missions/animation.sanjuanisl/init.sqf .local/share/bohemiainteractive/arma3/GameDocuments/Arma 3/missions/testmission.7z .local/share/bohemiainteractive/arma3/GameDocuments/Arma 3/Saved .local/share/bohemiainteractive/arma3/GameDocuments/Arma 3/Saved/A3 .local/share/bohemiainteractive/arma3/GameDocuments/Arma 3/Saved/A3/Missions_F_Bootcamp .local/share/bohemiainteractive/arma3/GameDocuments/Arma 3/Saved/A3/Missions_F_Bootcamp/Scenarios .local/share/bohemiainteractive/arma3/GameDocuments/Arma 3/Saved/A3/Missions_F_Bootcamp/Scenarios/Arsenal.VR .local/share/bohemiainteractive/arma3/GameDocuments/Arma 3/Saved/A3/Missions_F_Bootcamp/Scenarios/VR.VR .local/share/bohemiainteractive/arma3/GameDocuments/Arma 3/Saved/A3/missions_f .local/share/bohemiainteractive/arma3/GameDocuments/Arma 3/Saved/A3/missions_f/showcases .local/share/bohemiainteractive/arma3/GameDocuments/Arma 3/Saved/A3/missions_f/showcases/showcase_helicopters.stratis .local/share/bohemiainteractive/arma3/GameDocuments/Arma 3/Saved/A3/missions_f/showcases/showcase_helicopters.stratis/weapons.cfg .local/share/bohemiainteractive/arma3/GameDocuments/Arma 3/Saved/steam .local/share/bohemiainteractive/arma3/GameDocuments/Arma 3/Saved/steam/meta .local/share/bohemiainteractive/arma3/GameDocuments/Arma 3/Saved/steam/meta/subscribedContent.list .local/share/bohemiainteractive/arma3/GameDocuments/Arma 3/Saved/steam/meta/publishedContent.list .local/share/bohemiainteractive/arma3/GameDocuments/Arma 3/Saved/steam/meta/cacheItems.map .local/share/bohemiainteractive/arma3/GameDocuments/Arma 3/Saved/steam/benchmark%20altis.altis .local/share/bohemiainteractive/arma3/GameDocuments/Arma 3/Saved/steam/benchmark%20altis.altis/benchmark%20altis.altis.pbo .local/share/bohemiainteractive/arma3/GameDocuments/Arma 3/Saved/steam/benchmark%20altis.altis/weapons.cfg .local/share/bohemiainteractive/arma3/GameDocuments/Arma 3/UserSaved .local/share/bohemiainteractive/arma3/GameDocuments/Arma 3/UserSaved/missions .local/share/bohemiainteractive/arma3/GameDocuments/Arma 3/UserSaved/missions/test.Stratis .local/share/bohemiainteractive/arma3/GameDocuments/Arma 3/UserSaved/missions/test.Stratis/continue.Arma3Save .local/share/bohemiainteractive/arma3/GameDocuments/Arma 3/UserSaved/missions/tempMissionSP.sanjuanisl .local/share/bohemiainteractive/arma3/GameDocuments/Arma 3/UserSaved/missions/test2.sanjuanisl .local/share/bohemiainteractive/arma3/GameDocuments/Arma 3/UserSaved/missions/animation.sanjuanisl .local/share/bohemiainteractive/arma3/GameDocuments/Arma 3/UserSaved/missions/testmission.7z .local/share/bohemiainteractive/arma3/GameDocuments/Arma 3/UserSaved/missions/tempMissionSP.VR .local/share/bohemiainteractive/arma3/GameDocuments/Arma 3/stats.Arma3.json .local/share/bohemiainteractive/arma3/GameDocuments/Arma 3/compositions .local/share/bohemiainteractive/arma3/GameDocuments/Arma 3/Player.3den.Arma3Profile .local/share/bohemiainteractive/arma3/EonRegistry.xml .local/share/bohemiainteractive/arma3/eONprecompiledShaders.dat

Krzmbrzl commented 8 years ago

Actually there is a preference for this but the problem is that the respective preference page accesses the value of the corresponding preference during creation which causes the error.

I should be able to fix this quite easily. But as I already started the work on the 0.7.0 release I can't give you a stable patch-version... But in the next couple of days I will build a Dev-Version of the Plugin that will contain a fix for that along with some other changes (of which I can't yet guarantee that they will work as they are still WIP).

TeaObvious commented 8 years ago

Sounds good, will test the dev build as soon as it got released and give feedback :)

Krzmbrzl commented 8 years ago

May I ask you to join my SQDev discord server ( https://discord.gg/J474S) in the meantime? I'd have some more questions that I don't think have directly something to do with this crash...