Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Zakkle

Pages: [1]
1
Graphics / Re: Can't Save Large Images
« on: May 06, 2020, 05:05:44 pm »
I built a system with a large amount of RAM and GPU RAM specifically for manually creating these images.  Except, now I have resorted to trying to generate these images using a script, rather than dealing with all of the analog nature of this project.  My Photoshop, GIMP, Krita, etc. have been dealing with these image sizes just fine.  They have also been saving this exact image to files of about 125MB.  In RAM and GPU RAM is a different story, only because of all of the layers this project has generated, but nevertheless it's nowhere near a 1GB~2GB file output.

For large image files, I am willing to compromise and use a different file format, it's just baffling that SFML allows images of this size but will not save imges of this size without more specific error messages.

I mean, SFML creates an image that size, without error, and will .copy() thousands of files into that image, without error, but when it comes to saving images of that size, it throws a generic error.

I'm not particularly looking to ignore .png's rules, because none of the image editing programs have generated an output of much larger than 125MB.  I mean, I only mentioned my 25k*25k image problem but I have images that are 4~10 times larger than that which will save to .png in other image manipulators without an issue.

Just how in the world do I do this without splitting the image?  The entire purpose of this project is to piece it together into a single image from a bunch of other iamges.

2
Graphics / Re: Can't Save Large Images
« on: May 06, 2020, 04:35:38 pm »
Omfg...  this is killing me.  I wanted to use SFML to not have to reinvent the wheel (no stabs at SFML-- I plan to still use it for regular projects for years to begin).

Help me wrap my tiny mind around this.  If this is a known issue, why isn't SFML checking against this, having knowingly used STB?  (Again, not taking a stab against SFML, I'm just trying to understand things.)

I really need to make images this size, and I have many graphics editing programs that do this if I manually paste all 3,500 images into it.  The problem being, the entire point of this program was automation.

Am I doomed to be unable to any of this in SFML?  I keep doing research on OpenGL but I have a, uh... special problem that prevents me from remembering things from long enough to learn all the research I need to do.

3
Graphics / Re: sf::View - why is my minimap transparent
« on: May 06, 2020, 04:26:22 pm »
Without being able to see the whole code for the grid, worldCamera, and whatnot, I am going to go out on a limb and say the mini map is transparent because the main view is also transparent and doesn't have a default fill.  Whatever you were hoping to achieve without it being transparent, you could either fill the background of the main view or the mini map.

4
Graphics / Re: Can't Save Large Images
« on: May 06, 2020, 04:05:18 pm »
Ohhhh, wait.  I was under the impression I was building in 64-bit mode.  Is this a compiler flag issue?

[Edit]
I have tried 64-bit compiler tags, no dice.

5
Graphics / Re: Can't Save Large Images
« on: May 06, 2020, 03:46:56 pm »
Can we confirm this is an SFML limitation, though?

If you got both errors in the same test, then that means there's an issue with the image that was fed to the program, making it not load, and also resulting in the API not wanting to save a blank sf::Image object to file.  If you have an image, of whatever size, that would successfully load into the program before trying the save the image of that size, then it would be more accurate to the test.

All of my "map_image*.png" files are 32*16x32*12.  I have 10,000 images that are tiled with the images of this size, and out of all of those clusters of images, there is only one (the 25kx25k image) that is giving me issues.

What's really killing me is that I have been analyzing the code and I have implemented checks within my code to ensure I do not exceed the limits of the data types SFML uses for the sf::Image objects.

So why is this happening?

6
Graphics / Can't Save Large Images
« on: May 06, 2020, 02:04:08 pm »
Aight, so I am having an issue with a large image not saving.  Here is my test code:

Code: [Select]
sf::Image test;
test.create(32*16*52,32*12*60);
sf::Image mpone;
mpone.loadFromFile("map_image1.png");

test.copy(mpone,0,0);

test.saveToFile("test.png");

I keep getting the generic [Failed to save image "test.png"] error.

The thing is, I can load over 12,000 textures from small 32*32 .bmp files and assemble a 224*53,852px image then save it to file.  But then I can't load even a single small image into a (roughly) 25k*25k image.  My graphics card shouldn't be an issue, at all.

I have loaded over 20,000 textures, both big and small, into the graphics card.  But then I have also created a test project without all of those and just tried creating the blank image and adding one thing to it.  This results in failure, every time.

Even if we go with the GPU's limitations, it can produce/handle textures up to 32k*32k.  Besides, and this may sound a bit ignorant, but I am thinking that 12GB of GPU RAM should mean that it's not a GPU limitation (since the texture limitations are 32k*32k).

All this to say, can we get some sort of verbose debugging?  Can we get a bool return for the copy() command to see if that's it, at least?  I am kind of lost in the sauce and it's been bugging me for weeks because each test I conduct on this code takes no less than fifteen minutes to run my converter.  So what are my options for narrowing down why, exactly, this image save fails, since nothing I am doing is getting me anywhere close to an answer?[/code]

7
Window / Re: Multiple Windows, Multiple Threads
« on: December 03, 2019, 01:02:56 pm »
k, so this did fix it, after all:
main.cpp
#include <X11/Xlib.h>
...
main(...) {
    XInitThreads();
    ...
}
 
The reason it wasn't working for me, at first, is because when you link it using -lX11, it needs to be earlier in the list.

After much testing, all of my multithreading is working (100% of the time, not just hit and miss anymore).

[EDIT NOTE: Previous last edit was  "« Last Edit: December 03, 2019, 01:04:51 pm by Zakkle »" ]
[EDIT] I have abandoned the threads used by SFML because I have found an efficient way to use std::thread.  That said, I have nothing against SFML's threads, per se, but the only reason I was using them in my projects was because that was the only thing available in my project until std::thread was created, and then it took a long time for me to adapt to the standard.

8
Window / Multiple Windows, Multiple Threads
« on: December 02, 2019, 01:46:30 pm »
Aight, now before you get your pitchforks and torches out, all I'm trying to do, right now, is unblock the program.

This is basically how my program is setup:
main() -> Lobby (GTK) -> Login (GTK)
\/
Closes and returns to main()
\/
main() -> Main game window (SFML) -> Control panel (GTK) -> Tool window (GTK) + Pallet Window (SFML)

Now, I have not been able to get the control panel to open without blocking the SFML window, so I called the GTK window in a new thread. I can also get the secondary GTK window to open, as well as the SFML pallet window.

At this point, all events in the secondary windows are all working fine.  The issue comes in when clicking back on the main window.  I get crashes and random errors.

The real killer for me is that I thought I had this issue resolved, completely, because it was working flawlessly on all windows, no matter what I tested. 
Code: [Select]
Gdk-Message: Fatal IO error 0 (Success) on X server :1.
Code: [Select]
[xcb] Unknown sequence number while processing queue
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
xcb_io.c:260: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.
Code: [Select]
Failed to get the window attributes
Failed to query GLX version, limited to legacy context creation
[xcb] Extra reply data still left in queue
[xcb] This is most likely caused by a broken X extension library
[xcb] Aborting, sorry about that.
: xcb_io.c:580: _XReply: Assertion `!xcb_xlib_extra_reply_data_left' failed.
/.../codelite-exec.sh: line 3:  8166 Aborted                 (core dumped) ${command}

I've done some searching and people have suggested adding a call to XInitThreads() in the main() function, but that didn't do any good.

I've done experimentation with various things, such as using GTK's .show() instead of app->run(), I've used .setActive(true/false), I've used std::thread.detach(), but none of the combinations yielded any results other than crashing the program sooner, blocking the other windows, or causing everything to hang.

Any idea why it randomly works one time, but then I get four different outcomes of errors?

All I want is to be able to use all of my windows without any blocking.

9
Network / Re: Questions About Server Loops
« on: April 22, 2018, 10:29:29 pm »
It's an ORPG. I don't see why it should be avoided.

This project is specifically for adding multi-threading.

I'm aware of the design concepts.

I just want some discussion on how to handle dealing with hundreds of users connecting and sending packets. I don't need the listener to tie up the line, and I don't need the receiver to do all the work when another thread can do it without holding up the process.

I'm working with all of the connections being stored in one place, and all the threads using their data to determine where to send packets, and from whom the packets are coming.

What I need to know is, is this sufficient enough, in the long run, to avoid blocking the socket?

10
Network / Questions About Server Loops
« on: April 22, 2018, 03:39:46 pm »
I asked this, recently, on the IRC channel.

Please bare with me.  Understand, I can't think for shit, and I have to start the discussion from scratch, in terms I can understand.  Please state things naturally, as you naturally would, and with the understanding that I have searched the forums and Google for things related to this question.  I just need to ask specifics, in order to get the answer for which I am searching.

I have a problem.  I'm trying to use sfml-network.  I also have short-term memory loss.  I need someone willing to break out the crayons and spell things out for me, Barney style.  I've read manuals, I've passed Networking 101+ classes.  I just need some simple yes-or-no questions to be answered for a vet who can't remember how to tie his own shoes.  Is there a place for me?

I'm trying to use sfml-network to run five threads.  One accepts incoming connections.  One accepts incoming packets from already-connected sockets (clients).  One processes all logic for the server (unrelated to discussion, obviously), another sends all pending outgoing connections. The fifth thread will end all connections that haven't sent a heartbeat within the last x [time], or have been queued for logout.  Also unrelated, there is a sixth, seventh, and eighth thread for connecting to the database and doing everything pending in the database thread.

Anyway, the question is, this:

Is this sufficient for an incoming socket?
if (listener.listen(53000) != sf::Socket::Done)
  ? So, from here, the server inserts the socket into a vertex, ofc, and then loops for incoming packets in the next thread.

Also, is this sufficient for merely looping and accepting incoming packets from already-connected clients?

if (Socket.Receive(Packet) == sf::Socket::Done)
When the server receives a packet, it parses it, but is it sufficient to just loop the thread until the packet received is for an already-connected client?

Can the multiple threads keep looping and checking for the different things, on the server?  That is, incoming clients, client packets for those already connected, timeouts for for already connected?

Or, do I really need to make them all non-blocking and deal with the thousands of loops per second?

Pages: [1]
anything