Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2009-10

Linux and Threads

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Matt Shaffer

I'm really not quite sure what the problem is.

Here's a quick rundown:
1. I'm running Ubuntu 9.04
2. Lazarus .9.26
3. Using Andorra 2D

To be honest, I'm not sure if this is an andorra 2d specific problem (Andorra is an openGL engine for FPC if you didn't know), but as it works flawlessly under Windows and do to my observation below, I thought it might not be a problem with Andorra.

The error I'm getting is Run time Error 232 "SYSTEM_NOTHREADERROR". As threading sounds more like a FPC/Lazarus issue and not specific to andorra, I thought I'd try my luck here. Is there a unit I have to include to use threading? First thing that came to my mind was "cthreads" as I've seen that used before, but including that file only created a different error (I'm assuming, because cthreads is unix and unix != linux?)

Section of code where it has a problem:
constructor TAdParticleCalculationThread.Create(AParticleList:
TAdParticleList;
  AEffectSize: integer);
begin
  inherited Create(false); // Compiler auto highlights this line, for some
reason
  FParticleList := AParticleList;
  FParticleClass := nil;
  ResizeData(AEffectSize);
  FStartedCalculation := true;
end;

I'd love to actually be able to create some apps for linux ;) Game development seems especially hard, however. (PS: Nice job on .9.28 developers! Haven't had a chance (and don't want to risk) upgrading to the latest lazarus yet)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20091025/0cff8ce0/attachment.html>

Reply by email

Funky Beast
to Matt Shaffer
Matt Shaffer wrote 49 lines
I'm really not quite sure what the problem is. Here's a quick rundown: 1. I'm running Ubuntu 9.04 2. Lazarus .9.26 3. Using Andorra 2D To be honest, I'm not sure if this is an andorra 2d specific problem (Andorra is an openGL engine for FPC if you didn't know), but as it works flawlessly under Windows and do to my observation below, I thought it might not be a problem with Andorra. The error I'm getting is Run time Error 232 "SYSTEM_NOTHREADERROR". As threading sounds more like a FPC/Lazarus issue and not specific to andorra, I thought I'd try my luck here. Is there a unit I have to include to use threading? First thing that came to my mind was "cthreads" as I've seen that used before, but including that file only created a different error (I'm assuming, because cthreads is unix and unix != linux?) Section of code where it has a problem: constructor TAdParticleCalculationThread.Create(AParticleList: TAdParticleList; AEffectSize: integer); begin inherited Create(false); // Compiler auto highlights this line, for some reason FParticleList := AParticleList; FParticleClass := nil; ResizeData(AEffectSize); FStartedCalculation := true; end; I'd love to actually be able to create some apps for linux ;) Game development seems especially hard, however. (PS: Nice job on .9.28 developers! Haven't had a chance (and don't want to risk) upgrading to the latest lazarus yet) ------------------------------------------------------------------------ -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Hi,

Maybe you could read up here:
http://wiki.lazarus.freepascal.org/Multithreaded_Application_Tutorial#Units_needed_for_a_multi-threaded_application

HTH,
Funky Beast

Reply by email

Matt Shaffer
to Funky Beast

Good stuff! It's compiled and running happily now.

Funky Beast wrote 66 lines
Matt Shaffer wrote: > I'm really not quite sure what the problem is. > > Here's a quick rundown: > 1. I'm running Ubuntu 9.04 > 2. Lazarus .9.26 > 3. Using Andorra 2D > > To be honest, I'm not sure if this is an andorra 2d specific problem > (Andorra is an openGL engine for FPC if you didn't know), but as it > works flawlessly under Windows and do to my observation below, I thought > it might not be a problem with Andorra. > > The error I'm getting is Run time Error 232 "SYSTEM_NOTHREADERROR". As > threading sounds more like a FPC/Lazarus issue and not specific to > andorra, I thought I'd try my luck here. Is there a unit I have to > include to use threading? First thing that came to my mind was > "cthreads" as I've seen that used before, but including that file only > created a different error (I'm assuming, because cthreads is unix and > unix != linux?) > > Section of code where it has a problem: > constructor TAdParticleCalculationThread.Create(AParticleList: > TAdParticleList; > AEffectSize: integer); > begin > inherited Create(false); // Compiler auto highlights this line, for > some reason > > FParticleList := AParticleList; > FParticleClass := nil; > > ResizeData(AEffectSize); > > FStartedCalculation := true; > end; > > I'd love to actually be able to create some apps for linux ;) Game > development seems especially hard, however. (PS: Nice job on .9.28 > developers! Haven't had a chance (and don't want to risk) upgrading to > the latest lazarus yet) > > > ------------------------------------------------------------------------ > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus Hi, Maybe you could read up here: http://wiki.lazarus.freepascal.org/Multithreaded_Application_Tutorial#Units_needed_for_a_multi-threaded_application HTH, Funky Beast -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20091025/7a6bd49c/attachment.html>

Reply by email