Modding Help [Error] Exception caught loading asset: [Custom Race Mod] [FIXED]

Discussion in 'Starbound Modding' started by Erynn, Aug 3, 2016.

  1. Erynn

    Erynn Space Spelunker

    Hello, fellow fish-lovers,

    I'm new to modding. And when I say new, I mean legit new... I have never before modded anything, but after going over multiple tutorials and using some existing 1.0 race mods as an example, I decided to attempt at creating my own mod. A race mod, to be exact.
    Sadly, I must have made a mistake somewhere, but for the love of all that is good, I cannot find where.

    Below is my starbound.log file (or at least starting from the error all the way to where Starbound just gives up).

    Code:
    [01:33:46.866] [Error] Exception caught loading asset: /species/maximas.species, (AssetException) Could not read JSON asset /species/maximas.species
    [0] 7ff7abb91ee3 Star::captureStack
    [1] 7ff7abb90c6e Star::StarException::StarException
    [2] 7ff7abb90d58 Star::StarException::StarException
    [3] 7ff7abba1650 Star::AssetException::AssetException
    [4] 7ff7ac403071 `<lambda_80e152f0e8987fd28e54fe8e75d4e933>::operator()'::`1'::catch$25
    [5] 7ffe8abfc220 _C_specific_handler
    [6] 7ffe8abf29b2 _FrameUnwindFilter
    [7] 7ffe9c1a90e3 RtlCaptureContext
    [8] 7ff7abba39ed <lambda_80e152f0e8987fd28e54fe8e75d4e933>::operator()
    [9] 7ff7abb9b04f std::_Invoker_functor::_Call<<lambda_80e152f0e8987fd28e54fe8e75d4e933> & __ptr64>
    [10] 7ff7abb9eab6 std::invoke<<lambda_80e152f0e8987fd28e54fe8e75d4e933> & __ptr64>
    [11] 7ff7abb9c6e0 std::_Invoke_ret<std::shared_ptr<Star::Assets::AssetData>,<lambda_80e152f0e8987fd28e54fe8e75d4e933> & __ptr64>
    [12] 7ff7abba4ec6 std::_Func_impl<<lambda_80e152f0e8987fd28e54fe8e75d4e933>,std::allocator<int>,std::shared_ptr<Star::Assets::AssetData> >::_Do_call
    [13] 7ff7abeef6e7 std::_Func_class<std::shared_ptr<Star::DanceDatabase> >::operator()
    [14] 7ff7abbadf98 Star::Assets::processAssetData
    [15] 7ff7abbabe18 Star::Assets::loadJson
    [16] 7ff7abbab083 Star::Assets::loadAsset
    [17] 7ff7abba851f Star::Assets::doLoad
    [18] 7ff7abbb14dd Star::Assets::workerMain
    [19] 7ff7abb8e4e7 <lambda_acdb4815e022f76f36408ff78907d178>::operator()
    [20] 7ff7abb8ea0e Star::ThreadImpl::runThread
    [21] 7ffe995c8102 BaseThreadInitThunk
    [22] 7ffe9c15c5b4 RtlUserThreadStart
    Caused by: (JsonParsingException) Cannot parse json file: /species/maximas.species
    [0] 7ff7abb91ee3 Star::captureStack
    [1] 7ff7abb90c6e Star::StarException::StarException
    [2] 7ff7abb90d58 Star::StarException::StarException
    [3] 7ff7abba2430 Star::JsonParsingException::JsonParsingException
    [4] 7ff7ac4044c8 `Star::Assets::readJson'::`1'::catch$264
    [5] 7ffe8abfc220 _C_specific_handler
    [6] 7ffe8abf29b2 _FrameUnwindFilter
    [7] 7ffe9c1a90e3 RtlCaptureContext
    [8] 7ff7abbae59a Star::Assets::readJson
    [9] 7ff7abba39ed <lambda_80e152f0e8987fd28e54fe8e75d4e933>::operator()
    [10] 7ff7abb9b04f std::_Invoker_functor::_Call<<lambda_80e152f0e8987fd28e54fe8e75d4e933> & __ptr64>
    [11] 7ff7abb9eab6 std::invoke<<lambda_80e152f0e8987fd28e54fe8e75d4e933> & __ptr64>
    [12] 7ff7abb9c6e0 std::_Invoke_ret<std::shared_ptr<Star::Assets::AssetData>,<lambda_80e152f0e8987fd28e54fe8e75d4e933> & __ptr64>
    [13] 7ff7abba4ec6 std::_Func_impl<<lambda_80e152f0e8987fd28e54fe8e75d4e933>,std::allocator<int>,std::shared_ptr<Star::Assets::AssetData> >::_Do_call
    [14] 7ff7abeef6e7 std::_Func_class<std::shared_ptr<Star::DanceDatabase> >::operator()
    [15] 7ff7abbadf98 Star::Assets::processAssetData
    [16] 7ff7abbabe18 Star::Assets::loadJson
    [17] 7ff7abbab083 Star::Assets::loadAsset
    [18] 7ff7abba851f Star::Assets::doLoad
    [19] 7ff7abbb14dd Star::Assets::workerMain
    [20] 7ff7abb8e4e7 <lambda_acdb4815e022f76f36408ff78907d178>::operator()
    [21] 7ff7abb8ea0e Star::ThreadImpl::runThread
    [22] 7ffe995c8102 BaseThreadInitThunk
    [23] 7ffe9c15c5b4 RtlUserThreadStart
    Caused by: (JsonParsingException) Error parsing json: bad object, should be '}' or ',' at 9:2
    [0] 7ff7abb91ee3 Star::captureStack
    [1] 7ff7abb90c6e Star::StarException::StarException
    [2] 7ff7abb9e8cc Star::inputUtf8Json<char * __ptr64>
    [3] 7ff7abbae59a Star::Assets::readJson
    [4] 7ff7abba39ed <lambda_80e152f0e8987fd28e54fe8e75d4e933>::operator()
    [5] 7ff7abb9b04f std::_Invoker_functor::_Call<<lambda_80e152f0e8987fd28e54fe8e75d4e933> & __ptr64>
    [6] 7ff7abb9eab6 std::invoke<<lambda_80e152f0e8987fd28e54fe8e75d4e933> & __ptr64>
    [7] 7ff7abb9c6e0 std::_Invoke_ret<std::shared_ptr<Star::Assets::AssetData>,<lambda_80e152f0e8987fd28e54fe8e75d4e933> & __ptr64>
    [8] 7ff7abba4ec6 std::_Func_impl<<lambda_80e152f0e8987fd28e54fe8e75d4e933>,std::allocator<int>,std::shared_ptr<Star::Assets::AssetData> >::_Do_call
    [9] 7ff7abeef6e7 std::_Func_class<std::shared_ptr<Star::DanceDatabase> >::operator()
    [10] 7ff7abbadf98 Star::Assets::processAssetData
    [11] 7ff7abbabe18 Star::Assets::loadJson
    [12] 7ff7abbab083 Star::Assets::loadAsset
    [13] 7ff7abba851f Star::Assets::doLoad
    [14] 7ff7abbb14dd Star::Assets::workerMain
    [15] 7ff7abb8e4e7 <lambda_acdb4815e022f76f36408ff78907d178>::operator()
    [16] 7ff7abb8ea0e Star::ThreadImpl::runThread
    [17] 7ffe995c8102 BaseThreadInitThunk
    [18] 7ffe9c15c5b4 RtlUserThreadStart
    [01:33:46.883] [Info] Root: Loaded QuestTemplateDatabase in 0.0142398 seconds
    [01:33:46.885] [Info] Root: Loaded AiDatabase in 0.0012165 seconds
    [01:33:46.886] [Info] Root: Loaded TechDatabase in 0.000950899 seconds
    [01:33:46.890] [Info] Root: Loaded CodexDatabase in 0.00446446 seconds
    [01:33:46.944] [Info] Root: Loaded BehaviorDatabase in 0.0540176 seconds
    [01:33:46.947] [Info] Root: Loaded DanceDatabase in 0.00229154 seconds
    [01:33:46.953] [Info] Root: Loaded SpawnTypeDatabase in 0.00612508 seconds
    [01:33:46.957] [Info] Root: Loaded RadioMessageDatabase in 0.00392024 seconds
    [01:33:49.469] [Info] Root: Loaded ItemDatabase in 3.8695 seconds
    [01:33:49.490] [Error] Application: exception thrown, shutting down: (AssetException) Error loading asset /species/maximas.species
    [0] 7ff7abb91ee3 Star::captureStack
    [1] 7ff7abb90c6e Star::StarException::StarException
    [2] 7ff7abb9deca Star::AssetException::format<Star::AssetPath>
    [3] 7ff7abbaa3ab Star::Assets::getAsset
    [4] 7ff7abbaad9a Star::Assets::json
    [5] 7ff7abf30740 Star::SpeciesDatabase::SpeciesDatabase
    [6] 7ff7abeea585 std::make_shared<Star::SpeciesDatabase>
    [7] 7ff7abeeea49 <lambda_8ee82560cea9e20045920131ee30a659>::operator()
    [8] 7ff7abee08ff std::_Invoker_functor::_Call<<lambda_8ee82560cea9e20045920131ee30a659> & __ptr64>
    [9] 7ff7abee48e6 std::invoke<<lambda_8ee82560cea9e20045920131ee30a659> & __ptr64>
    [10] 7ff7abee2569 std::_Invoke_ret<std::shared_ptr<Star::SpeciesDatabase>,<lambda_8ee82560cea9e20045920131ee30a659> & __ptr64>
    [11] 7ff7abef1146 std::_Func_impl<<lambda_8ee82560cea9e20045920131ee30a659>,std::allocator<int>,std::shared_ptr<Star::SpeciesDatabase> >::_Do_call
    [12] 7ff7abeef6e7 std::_Func_class<std::shared_ptr<Star::DanceDatabase> >::operator()
    [13] 7ff7abee7c73 Star::Root::loadMemberFunction<Star::SpeciesDatabase>
    [14] 7ff7abee5409 Star::Root::loadMember<Star::SpeciesDatabase>
    [15] 7ff7abef8ac2 Star::Root::speciesDatabase
    [16] 7ff7abee0c30 std::_Invoker_pmf_pointer::_Call<std::shared_ptr<Star::DungeonDefinitions const > (__cdecl Star::Root::*)(void) __ptr64,Star::Root * __ptr64 & __ptr64>
    [17] 7ff7abee45f9 std::invoke<std::shared_ptr<Star::ItemDatabase const > (__cdecl Star::Root::*& __ptr64)(void) __ptr64,Star::Root * __ptr64 & __ptr64>
    [18] 7ff7abee1ffc std::_Invoke_ret<std::shared_ptr<Star::TerrainDatabase const > (__cdecl Star::Root::*& __ptr64)(void) __ptr64,Star::Root * __ptr64 & __ptr64>
    [19] 7ff7abee0cbe std::_Call_binder<std::_Unforced,0,std::shared_ptr<Star::Configuration> (__cdecl Star::Root::*)(void) __ptr64,std::tuple<Star::Root * __ptr64>,std::tuple<> >
    [20] 7ff7abee03ae std::_Binder<std::_Unforced,std::shared_ptr<Star::SpawnTypeDatabase const > (__cdecl Star::Root::*)(void) __ptr64,Star::Root * __ptr64 const>::operator()<>
    [21] 7ff7abef0ca2 std::_Func_impl<Star::SwallowReturn<std::_Binder<std::_Unforced,std::shared_ptr<Star::ImageMetadataDatabase const > (__cdecl Star::Root::*)(void) __ptr64,Star::Root * __ptr64 const> >,std::allocator<int>,void>::_Do_call
    [22] 7ff7abb88d3b <lambda_7b083dc4bdd496712d99e51bb49515b5>::operator()
    [23] 7ff7abb89ae2 Star::WorkerPool::WorkerThread::run
    [24] 7ff7abb8ea0e Star::ThreadImpl::runThread
    [25] 7ffe995c8102 BaseThreadInitThunk
    [26] 7ffe9c15c5b4 RtlUserThreadStart
    [01:33:49.490] [Info] Application: shutdown...
    [01:33:49.559] [Info] Root: Shutting down Root
    [01:33:49.954] [Info] Application: Destroying SDL Window
    [01:33:49.970] [Info] Application: stopped gracefully
    The file in question is my .species file, but after looking at the .species files of other race mods I just can't figure out what I've done wrong. Now, I may just be completely blind, and perhaps I should have started with a simple item mod, but I'm extremely curious as to what the problem is.

    If anyone could help me, I'd be eternally grateful to you. I've attached the file (keep in mind that it has been turned into a .txt file so that I could attach it here, and it is a .species file in the mod folder itself).

    Thank you in advance.
     

    Attached Files:

  2. Mackinz

    Mackinz The Waste of Time

    Code:
    Caused by: (JsonParsingException) Error parsing json: bad object, should be '}' or ',' at 9:2
    
    You either messed up line 8 or at the very beginning of line 9. Very straightforward error.
     
    Naddox likes this.
  3. Naddox

    Naddox Cosmic Narwhal

    To break this down for you, when it says at 9:2 or #:#, the first number(9) is the line number in your code. The second number(2) is the character counting from left to right on the line indicated. Usually when it says its 1 of the first few characters on a line, it's actually on the previous line where the error has occurred. My guess is you missed a comma on line 8.
     
    Inf_Wolf14 likes this.
  4. Erynn

    Erynn Space Spelunker

    Thank you both, I feel pretty dumb right now but at least now I know what those numbers are. I was looking for where the error was in the log, but I just couldn't find it. I must be getting blind. I've fixed that, but I had more errors too. However, thanks to your help I managed to fix those too.
    Again, thank you for taking the time to help a complete and utter newb like myself.
     
  5. Crazy8Rex

    Crazy8Rex Subatomic Cosmonaut

    I'm also trying to create a race mod. May I ask what files you have to include and edit for the mod?
    For example I know you need the species.config, player.config, etc...
     
  6. Erynn

    Erynn Space Spelunker

    The easiest way to do this is just taking an existing race mod or just look into your unpacked assets (if you've done that) and using that as a go-to example for how the folder needs to be put together.
    The .config files you need are; species.config, player.config, codex.config, charcreation.config, and quests.config and universe_server.config.

    You need a humanoid folder, which is basically where your sprites will be, like the body, head, etc... It should be humanoid/nameofrace
    You need a codex folder, quest folder, species folder, interface folder, etc.
    Your charcreation.config should be in /interface/windowconfig, your icons for the character creation should be in interface/title, and your ai suits (for when you're upgrading tech I think?) should be in interface/ai/suits
    In the species folder goes your species.config, as well as your namegen.config for both male or female or just one for both if you don't want one for each gender.
    Your codex.config.patch file will go in codex, and if you want any custom codexes for that just make a folder inside the codex folder with the codex files in it.
    Then player.config.patch and universe_server.config.patch should just be in the root folder of your mod.

    Won't go in too much detail on what to put in there, but those are the ones you should have and edit accordingly to your mod.

    Uhh, I think that's it in terms of important stuff, but yeah like I said the easiest way would just be to look at other mods for an example.
     
  7. Crazy8Rex

    Crazy8Rex Subatomic Cosmonaut

    Thanks a lot, that was really helpful. May I ask to see your player.config, and window.config files because those two I always get errors when patching.
    What I do not understand is that do I have to include the whole vanilla charcreation.config and just add my race? or Do I have to do something like this:

    Code:
    [
    {"op":"add","path":"/speciesOrdering/-","value":"saiyan"}
    ]
    I currently have that code, but it isn't working.
     
  8. Erynn

    Erynn Space Spelunker

    In my interface folder, I have three subfolders; ai, title and windowconfig.
    In ai I have another subfolder; suit with the suit for both male and female in it. In title I have female and male icon as well as the gender buttons.
    The windowconfig is the most important one here, and that's where my charcreation.config.patch file is, in it I simply have what you've put;
    Code:
    [ { "op" : "add", "path" : "/speciesOrdering/-", "value" : "maximas" } ]
    My player.config.patch file contains;
    Code:
    [
        { "op" : "add", "path" : "/species/-", "value" : "maximas" },
        { "op" : "add", "path" : "/defaultCodexes/maximas", "value" : [ "maximasprologue", "maximashistory1", "maximashistory2" ,"maximashistory3", "maximashistory4", "maximashistory5" ] }
    ]
    It might help to pull your starbound.log file up to see what the issue is, that way I could also try to help you if you still have issues.
     
  9. Crazy8Rex

    Crazy8Rex Subatomic Cosmonaut

    Yea thanks this is really helpful. Im at work at the moment, but when I get back I will test everything out.
     
  10. Erynn

    Erynn Space Spelunker

    Glad to help, hope you get it to work. :)
     
  11. Crazy8Rex

    Crazy8Rex Subatomic Cosmonaut

    Ok I truly believe I have done everything correctly. But I still get this error.

    http://pastebin.com/PGC6tkxn

    It says there is something wrong with the player.config
    Here is what my config looks like.

    Code:
    [
        { "op" : "add", "path" : "/species/-", "value" : "saiyan" },
        { "op" : "add", "path" : "/defaultCodexes/saiyan", "value" : [ "saiyanhistory1", "protectorate1", "protectorate2" ] }
    ]
     
  12. Erynn

    Erynn Space Spelunker

    Well the error is beamgun related. Have you got a mod installed that messes with your matter manipulator?
     
  13. Crazy8Rex

    Crazy8Rex Subatomic Cosmonaut

    No I just have the Xbawks Character Extender and my mod currently installed.
     
  14. Erynn

    Erynn Space Spelunker

    Then the only thing I can come up with is that there's something in your folders messing with the game. What else have you added?
     
  15. Crazy8Rex

    Crazy8Rex Subatomic Cosmonaut

    I PMed you.
     
  16. AtomicPegasus

    AtomicPegasus Scruffy Nerf-Herder

    I keep getting this error I can't figure out myself.

    [14:53:01.579] [Error] Application: exception thrown, shutting down: (JsonException) No such key in Json::get("bodyColor")
     
  17. Genevra

    Genevra Scruffy Nerf-Herder

    lol, this was a 6 yr old thread buuuuuuut

    without more context or a description of what you're trying to accomplish, no one can help.

    what is this in context to? are you making a mod? trying to load the game? what are you trying to accomplish? is this after installing a mod? did it just break?

    if you expect people to help you, please help them do so
     
  18. AtomicPegasus

    AtomicPegasus Scruffy Nerf-Herder

    sry. I guess I wasn't too specific, also, I got the game running a while ago. Now I have so many mods it fails to crash at all almost 97 percent of the time, I either install a mod and ctd, or it doesn't and I have all 800 of my mods working fine.
     

Share This Page