Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
General
»
ERROR_TOO_MANY_SEMAPHORES
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
IRC channel
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
create system unit from s...
by
Laksen
[
Today
at 10:53:57 am]
how to get class and meth...
by
cdbc
[
Today
at 10:52:22 am]
Database standards OR Am ...
by
paweld
[
Today
at 10:38:35 am]
Who is Indy mattias?
by
JuhaManninen
[
Today
at 10:25:55 am]
[Solved] Find child contr...
by
Joanna
[
Today
at 09:53:43 am]
Step-into the field sette...
by
ginoo
[
Today
at 09:28:40 am]
FpDebug unexpected Assemb...
by
Marc
[
Today
at 08:46:38 am]
How to: create DLL file f...
by
KodeZwerg
[
Today
at 08:17:30 am]
Offical launch of the 1 B...
by
Handoko
[
Today
at 07:59:07 am]
Big Numbers Math
by
iLya2IK
[
Today
at 07:13:20 am]
Lazarus for Windows on aa...
by
dbannon
[
Today
at 07:02:55 am]
BUG REPORT: Unable to gen...
by
dbannon
[
Today
at 06:29:49 am]
what to do if my target M...
by
Laksen
[
Today
at 12:49:12 am]
For-in loop over constant...
by
ASerge
[
Today
at 12:36:09 am]
Converting a string/index...
by
TRon
[April 18, 2024, 11:56:37 pm]
exclude ALL packages from...
by
PascalDragon
[April 18, 2024, 11:33:29 pm]
Demoscene The Champs Crac...
by
KodeZwerg
[April 18, 2024, 11:29:50 pm]
Poll: Watches and Display...
by
440bx
[April 18, 2024, 10:55:14 pm]
Have anyone develop UEFI ...
by
PascalDragon
[April 18, 2024, 10:14:15 pm]
The weird Rewrite bug
by
PascalDragon
[April 18, 2024, 09:58:53 pm]
Assign (textfile) not com...
by
PascalDragon
[April 18, 2024, 09:51:50 pm]
Question for people who h...
by
PascalDragon
[April 18, 2024, 09:44:32 pm]
Linux Workspaces -- StayO...
by
AmatCoder
[April 18, 2024, 08:34:20 pm]
I just released a commerc...
by
Seenkao
[April 18, 2024, 07:57:21 pm]
Access violation when re-...
by
TRon
[April 18, 2024, 07:37:31 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: ERROR_TOO_MANY_SEMAPHORES (Read 7723 times)
dicas3d
Jr. Member
Posts: 81
ERROR_TOO_MANY_SEMAPHORES
«
on:
July 01, 2010, 08:00:28 am »
I need of know the causes of this bug.
The bug is ERROR_TOO_MANY_SEMAPHORES.
Here is the code:
Code: Pascal
[Select]
[+]
[-]
procedure
ler
;
begin
dir
:
=
c
+
'\carros.sgs'
;
system
.
Assign
(
carrosfile
,
dir
)
;
system
.
Reset
(
carrosfile
)
;
system
.
seek
(
carrosfile
,
0
)
;
read
(
carrosfile
,
tmpcarros
)
;
for
i
:
=
2
to
tmpcarros
.
total
do
begin
system
.
seek
(
carrosfile
,
i
-
1
)
;
read
(
carrosfile
,
carrosarray
[
i
-
1
]
)
;
end
;
system
.
Close
(
carrosfile
)
;
end
;
«
Last Edit: July 01, 2010, 08:02:14 am by dicas3d
»
Logged
Comunidade portuguesa Lazarus, Delphi, Lazarus e Pascal.
Lazarus Portugal no Youtube.
IRC online
ou #lazrusportugal em irc.ptnet.org
typo
Hero Member
Posts: 3051
Re: ERROR_TOO_MANY_SEMAPHORES
«
Reply #1 on:
July 01, 2010, 08:10:23 am »
It is a Windows message.
Logged
LazarusBrasil.Org
dicas3d
Jr. Member
Posts: 81
Re: ERROR_TOO_MANY_SEMAPHORES
«
Reply #2 on:
July 01, 2010, 08:18:48 am »
Yes I know it. But this is a method created by me to don't replicate the code if I understand well what you said.
But did you talk about the how i put the colour with colours. I try it on this link
http://www.portugal-a-programar.org/forum/index.php/topic,8185.0.html
. If you don't talk Portuguese is a tag CODE(with[ and ])
Logged
Comunidade portuguesa Lazarus, Delphi, Lazarus e Pascal.
Lazarus Portugal no Youtube.
IRC online
ou #lazrusportugal em irc.ptnet.org
typo
Hero Member
Posts: 3051
Re: ERROR_TOO_MANY_SEMAPHORES
«
Reply #3 on:
July 01, 2010, 08:59:14 am »
ERROR_TOO_MANY_SEMAPHORES is not a Lazarus message.
Logged
LazarusBrasil.Org
Leledumbo
Hero Member
Posts: 8757
Programming + Glam Metal + Tae Kwon Do = Me
Re: ERROR_TOO_MANY_SEMAPHORES
«
Reply #4 on:
July 01, 2010, 10:53:14 pm »
How do you get the error message? To the best of my knowledge neither lazarus nor FPC has that message, it's a Windows message indeed.
Logged
Follow this if you want me to answer:
http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F
http://pascalgeek.blogspot.com
https://bitbucket.org/leledumbo
https://github.com/leledumbo
Code first, think later - Natural programmer B)
JuhaManninen
Global Moderator
Hero Member
Posts: 4468
I like bugs.
Re: ERROR_TOO_MANY_SEMAPHORES
«
Reply #5 on:
July 01, 2010, 11:34:14 pm »
You can get that error when using threads and forgetting to define "UseCThreads".
Happens on Linux at least (I haven't run Lazarus on Windows yet).
dicas3d, does the program use threads?
Juha
Logged
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.
dicas3d
Jr. Member
Posts: 81
Re: ERROR_TOO_MANY_SEMAPHORES
«
Reply #6 on:
July 01, 2010, 11:58:38 pm »
The program don't use threads and now I discover the error. It happens because the read pass the end of file.
This is the correct code:
Code: Pascal
[Select]
[+]
[-]
procedure
ler
;
begin
dir
:
=
c
+
'\carros.sgs'
;
system
.
Assign
(
carrosfile
,
dir
)
;
system
.
Reset
(
carrosfile
)
;
read
(
carrosfile
,
tmpcarros
)
;
for
i
:
=
2
to
tmpcarros
.
total
-
1
do
begin
system
.
seek
(
carrosfile
,
i
-
1
)
;
read
(
carrosfile
,
carrosarray
[
i
-
1
]
)
;
end
;
system
.
Close
(
carrosfile
)
;
end
;
Logged
Comunidade portuguesa Lazarus, Delphi, Lazarus e Pascal.
Lazarus Portugal no Youtube.
IRC online
ou #lazrusportugal em irc.ptnet.org
dicas3d
Jr. Member
Posts: 81
Re: ERROR_TOO_MANY_SEMAPHORES
«
Reply #7 on:
July 02, 2010, 12:49:38 am »
I need to replace the condition of the cycle for another more suitable.
That read all lines of the file without write in the file the number of lines. What structure I need?
Logged
Comunidade portuguesa Lazarus, Delphi, Lazarus e Pascal.
Lazarus Portugal no Youtube.
IRC online
ou #lazrusportugal em irc.ptnet.org
typo
Hero Member
Posts: 3051
Re: ERROR_TOO_MANY_SEMAPHORES
«
Reply #8 on:
July 02, 2010, 01:05:50 am »
Code:
[Select]
while not Eof(file) do
Logged
LazarusBrasil.Org
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
General
»
ERROR_TOO_MANY_SEMAPHORES
TinyPortal
© 2005-2018