Giter Site home page Giter Site logo

Comments (13)

Gazoo101 avatar Gazoo101 commented on May 4, 2024 2

Confirmed that x86 and x64, and Debug / Release configurations all work in conjunction with the Cinder framework I'm building things in. Very much appreciate the prompt responses and help getting things up and running. I can't wait to leverage Dpp in my DJ/VJ application...!

from dpp.

braindigitalis avatar braindigitalis commented on May 4, 2024 1

we have prebuilt 32 bit binaries if you need them, check the artifacts in the actions here for win32 x86: https://github.com/brainboxdotcc/DPP/actions

note you'll need 32 bit copies of the dependencies too e.g. opus.dll and friends. you can find a copy in our premade template. you may want to use that by the way:

https://github.com/brainboxdotcc/windows-bot-template

using the template will save you a lot of hassle.

let me know if this helps!

from dpp.

braindigitalis avatar braindigitalis commented on May 4, 2024 1

another day another go!
Looks like it was allocating too big an FD set for the stack.
Try the 1.0.3 release please: https://github.com/brainboxdotcc/windows-bot-template/releases/tag/1.0.3

from dpp.

braindigitalis avatar braindigitalis commented on May 4, 2024 1

confirmed as working fine with win32 debug build using the windows-bot-template and the following test bot:

#include <dpp/dpp.h>
#include <iostream>

int main()
{
    dpp::cluster bot("...");

    bot.on_ready([&bot](const dpp::ready_t& event) {
        bot.log(dpp::ll_info, "Logged in as " + bot.me.username);
    });

    bot.on_message_create([&bot](const dpp::message_create_t& event) {
        if (event.msg->content == "!ping") {
            bot.message_create(dpp::message(event.msg->channel_id, "Pong!"));
        }
    });

    bot.on_log([](const dpp::log_t& event) {
        if (event.severity > dpp::ll_trace) {
            std::cout << dpp::utility::loglevel(event.severity) << ": " << event.message << "\n";
        }
    });

    bot.start(false); 

    return 0;
}

Output:

C:\Users\brain\source\repos\MyBot\Debug>MyBot.exe
INFO: Auto Shard: Bot requires 1 shard
DEBUG: Auto Shard: 992 of 1000 session starts remaining
DEBUG: Starting with 1 shards...
DEBUG: Connecting new session...
INFO: Shard 0/1 ready!
INFO: Logged in as D++ Test Bot
DEBUG: Shards started.

Working great:

image

If you're still having issues with running this version have you considered raising the stack size for your project? The default is only a meg, and i'm not sure what else you have running in your bot process...

from dpp.

SirObby avatar SirObby commented on May 4, 2024

Why do you need 32-bit windows? 32-bit CPUs haven't been manufactured for quite some time.

from dpp.

Gazoo101 avatar Gazoo101 commented on May 4, 2024

@SirObby - Good question. I don't 'require' 32-bit Windows, or the application to run in 32-bit as such. It's primarily a legacy matter. I plan to move to 64-bit eventually, just haven't gotten there yet.

@braindigitalis - This helped tremendously! After some wrangling between MT and MD builds which caused some heap corruption due to differing memory managers I now have Dpp starting in an application with my framework. However, for some reason Dpp doesn't seem to be as willing to connect when I run it in the framework-based application. I get the following output:

INFO: Auto Shard: Bot requires 1 shard
DEBUG: Auto Shard: 989 of 1000 session starts remaining
DEBUG: Starting with 1 shards...
DEBUG: Shards started.

But never the Logged in as <my bots name> print out, nor Shard 0/1 ready!. I don't get any error either. The framework I use (Cinder) sets up windows and OS environment handling mostly, so shouldn't prevent Dpp from doing its thing, but clearly something isn't quite right. Any ideas of where to start digging?

Update: A kind soul who also uses Cinder themselves are able to reproduce my issues with the 32-bit binaries. 64-bit work as intended for the kind soul... So yeah. Not a solution yet, but a narrowing of the problem at least...

from dpp.

braindigitalis avatar braindigitalis commented on May 4, 2024

this happens if you have not set FD_SETSIZE big enough for the socket descriptors you get when compiling the lib (basically on our side, FD_SETSIZE is set to 1024). does the framework you are adding it to do a lot of network or internet connectivity things?

from dpp.

braindigitalis avatar braindigitalis commented on May 4, 2024

just realised, were you using the release build of the template project? if so go grab it's 1.0.1 release I just made live and replace your dpp.dll and lib with the ones from that release. this'll fix it if that's the case. this was fixed days ago but the template bot wasn't re released with the fix, it was only in main branch.

from dpp.

Gazoo101 avatar Gazoo101 commented on May 4, 2024

The Framework (should) not do any network / internet stuff on start-up. It basically just acts as an intermediate layer between the OS and the C++ code enabling easier window handling and other typical application stuff.

I've been using the debug version thus far as I'm retooling my CMake back-end to allow for the planned 64-bit upgrade.

Just tested the 1.0.1 release (in both debug/release configurations) - same problem remains I'm afraid.

Once I've re-tooled my CMake stuff I can help confirm if the issue isn't present in the 64-bit variant for me.

from dpp.

braindigitalis avatar braindigitalis commented on May 4, 2024

Please give the 1.0.2 template release a try (released just now) :)

INFO: Auto Shard: Bot requires 1 shard
DEBUG: Auto Shard: 992 of 1000 session starts remaining
DEBUG: Starting with 1 shards...
DEBUG: Connecting new session...
INFO: Shard 0/1 ready!
INFO: Logged in as D++ Test Bot
DEBUG: Shards started.

from dpp.

Gazoo101 avatar Gazoo101 commented on May 4, 2024

I wish I could say it worked like a charm, but now I get a crash after calling bot.start() O_o

I made sure to replace both the lib and copy in all the dll's for the debug version.

Exception thrown at 0x0142B867 (dpp.dll) in SandBoxProject.exe: 0xC00000FD: Stack overflow (parameters: 0x00000000, 0x0B802000).
Unhandled exception at 0x0142B867 (dpp.dll) in SandBoxProject.exe: 0xC00000FD: Stack overflow (parameters: 0x00000000, 0x0B802000).

from dpp.

Arthapz avatar Arthapz commented on May 4, 2024

The stackoverflow issue is also present on Win64

from dpp.

Gazoo101 avatar Gazoo101 commented on May 4, 2024

Tested the latest version (1.0.3) in Win32 Debug and it worked! Thanks for the assistance and great work!

I'll confirm with the other versions when I finish retooling my CMake setup.

from dpp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.