* * *

Author Topic: WinCE compiler bug ?  (Read 3087 times)

swierzbicki

  • Full Member
  • ***
  • Posts: 177
WinCE compiler bug ?
« on: April 30, 2014, 08:39:34 am »
Lazarus 1.6.2
fpc 3.0.0
wince/win32/win64
delphi berlin

Tomas Hajny

  • Moderator
  • New member
  • *****
  • Posts: 33
Re: WinCE compiler bug ?
« Reply #1 on: April 30, 2014, 09:39:01 am »
Hi,

There is an issue indeed, but it is not a compiler bug but rather a problem with the RTL. I'll leave the resolution to people working with WinCE, but it should be rather easy.

swierzbicki

  • Full Member
  • ***
  • Posts: 177
Re: WinCE compiler bug ?
« Reply #2 on: April 30, 2014, 11:23:18 am »
That's neat ! I'm looking forward your solution.
Thank you.
Lazarus 1.6.2
fpc 3.0.0
wince/win32/win64
delphi berlin

alex208210

  • Newbie
  • Posts: 2
Re: WinCE compiler bug ?
« Reply #3 on: December 25, 2014, 11:17:48 am »
I have a problem with bass.dll under wince 6. Lazarus 1.2.6 (fpc 2.6.4) + bass.pas (2.4.11) + bass.dll (2.4.11). Other versions bass.dll also have this problem. During playback of mp3 files, each time at a different time from 20 seconds to 5-10 minutes application crashes. Error text:
"Fatal error. The application has performed an illegal operation and will be closed. If the problem persists, contact the program manufacturer.
Exception 0xproject1.eхe "
X32 Windows does not have this problem

example: http://pbcdod.ru/basserror.zip

error - http://pbcdod.ru/scr1.jpg

the program code:

Code: [Select]
unit Unit1;

{$mode delphi}

interface

uses
  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls, StdCtrls, bass;

type

  { TForm1 }

  TForm1 = class(TForm)

    Button1: TButton;
    Button2: TButton;
    Button3: TButton;
    Label1: TLabel;
    Label2: TLabel;
    Timer1: TTimer;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
    procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    procedure FormCreate(Sender: TObject);
    procedure Timer1Timer(Sender: TObject);

  private
    { private declarations }
  public
    { public declarations }
  end;

var
  Form1: TForm1;
  track:integer;
  Channel: DWORD;

implementation

{$R *.lfm}

{ TForm1 }

procedure TForm1.FormCreate(Sender: TObject);
begin
    BASS_Init(-1, 44100, 0, nil, nil);
    track:=1;
end;

procedure TForm1.Timer1Timer(Sender: TObject);
var
TrackLen, TrackPos: Double;
ValPos: Double;
ValLen: Double;
begin
TrackPos:=BASS_ChannelBytes2Seconds(Channel, BASS_ChannelGetPosition(Channel,0));
TrackLen:=BASS_ChannelBytes2Seconds(Channel, BASS_ChannelGetLength(Channel,0));
ValPos:=TrackPos / (24 * 3600);
ValLen:=TrackLen / (24 * 3600);
Label1.Caption:=FormatDateTime('hh:mm:ss',ValPos);
Label2.Caption:=FormatDateTime('hh:mm:ss',ValLen);
if  BASS_ChannelIsActive(channel)=BASS_ACTIVE_STOPPED then begin  inc(track); if track>2 then track:=1; player; end;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
BASS_ChannelStop(Channel);
BASS_StreamFree(Channel);
Channel := BASS_StreamCreateFile(false, PChar(ExtractFilePath(ParamStr(0))+inttostr(track)+'.mp3'), 0, 0, 0 );
BASS_ChannelPlay(Channel, False);
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
 BASS_ChannelPause(Channel);
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
 BASS_ChannelStop(Channel);
end;

procedure TForm1.FormClose(Sender: TObject; var CloseAction: TCloseAction);
begin
  Bass_Stop();
  BASS_StreamFree(channel);
  Bass_Free;
end;

end.


Help solve the problem. How can I keep track of exactly where to wince goes wrong? Was anyone has a similar problem and how to solve it?

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus