Friday, July 25th 2008, 2:55am UTC+1

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Friday, May 2nd 2008, 1:32am

excessive use of signals and lots

Hello,

I am writing some neural network stuff.
I was thinking that it might be a good way to connect nodes in networks via "cables"(containing some function) with slot/signal connections at both ends.
This would be a good basis for random combinations/variations and stuff like that.
Initially, this seemed to work, but as I increased the number of connections slightly, the program just stopped and gave me a:

Process terminated with status -1073741819

I am now wondering, whether there is a limit of the signals and slots one can connect at a time. My program crashed when there were about 1000 slots connected.
However, up to slightly below 1000 (like 950), it seems to work completely effortlessly.
The other possibility is that I have some memory miss-management (googeling the above error indicates so). I am fairly new to C++.

However, the transition from "it works in a millisecond", to "it crashes" when increasing the number of connections by 5% puzzles me.

Has anyone got any experience with the excessive use (several hundred thousands would be nice) of slot/signal connections?

any help greatly appreciated,

t.
  • Go to the top of the page

stinos

Intermediate

2

Friday, May 2nd 2008, 11:05am

sounds like a memory/disk space problem to me.
run your progrum with some kind of bounds/leak checker (linux: valgrind, windows: _malloc_dbg etc, enable all rntime checks).
btw, signal/slot calls are about 20 (or was it 10?) times slower than normal function calls and lead to larger code size. so if speed or size matters, better write your own communication implementation
madinsjamania
  • Go to the top of the page

3

Saturday, May 3rd 2008, 2:21am

RE: excessive use of signals and lots

You would do much better writing callbacks that the signal slots.
  • Go to the top of the page

Rate this thread