Ticket #25 (closed defect: fixed)

Opened 2 months ago

Last modified 2 months ago

random::random/1 behaves differently if debugger is switched on.

Reported by: Parker Owned by: pmoura
Priority: major Milestone:
Component: compiler Version: 2.32.1
Keywords: Cc: zoubidoo@…

Description

When compiled with debugging off I get: ?- random::random(X). X = 0.0923009.

When compiled with set_logtalk_flag(debug,on) ?- random::random(X). fail.

Can anyone reproduce?

SWI-Prolog (Multi-threaded, 32 bits, Version 5.6.57)

Attachments

Change History

  Changed 2 months ago by pmoura

  • owner set to pmoura
  • status changed from new to assigned

  Changed 2 months ago by pmoura

  • status changed from assigned to closed
  • resolution set to worksforme

I cannot reproduce the results with the latest Logtalk development version:

?- set_logtalk_flag(debug,on).
true.

?- {library(random_loader)}.

+++ working on directory /Users/pmoura/logtalk/library/
<<< loading source file random_loader... 
>>> compiling source file random_loader in debug mode...
>>> random_loader source file compiled
<<< loading source file randomp... 
>>> compiling source file randomp in debug mode...
    compiling protocol randomp in debug mode... compiled
>>> randomp source file compiled
%  randomp.pl compiled 0.00 sec, 1,656 bytes
<<< randomp source file loaded
<<< loading source file random... 
>>> compiling source file random in debug mode...
    compiling object random in debug mode... compiled
>>> random source file compiled
%  random.pl compiled 0.01 sec, 23,624 bytes
<<< random source file loaded
% random_loader.pl compiled 0.02 sec, 40,116 bytes
<<< random_loader source file loaded

+++ working on directory /Users/pmoura/
(0 warnings)
true.

?- random::random(X).
X = 0.0923009.

I used the SWI-Prolog 5.6.58 32 bits version.

  Changed 2 months ago by Parker

The problem appears to be related to the time libraries.

?- set_logtalk_flag(debug,on).
true.

?- logtalk_load([library(random_loader),library(timep),library(time)]).

(0 warnings)
true.

?- random::random(X).
fail.

  Changed 2 months ago by Parker

  • status changed from closed to reopened
  • resolution deleted

Am re-opening. I think this has been closed too quickly.

  Changed 2 months ago by pmoura

Bug reports need enough information to reproduce a problem, otherwise they always be quickly closed as invalid or worksforme. Please follow the TracTicketing guidelines when creating a ticket.

The problem is not related to the time libraries. It can be reproduced by loading any other file after the random library while in debug mode.

follow-up: ↓ 7   Changed 2 months ago by Parker

The initial report was adequate to reproduce on my platform.

If you don't mind me saying, I think it is more important to collect information to find/invalidate the bug than to close the ticket quickly. The number of open tickets is not a measure of how good logtalk is!

If only "perfect" bug reports are welcome, users will be wary of reporting and that won't help the project.

Just a suggestion :-)

Cheers,

Z.

in reply to: ↑ 6   Changed 2 months ago by pmoura

  • status changed from reopened to closed
  • resolution set to fixed

Replying to Parker:

The initial report was adequate to reproduce on my platform.

But leaves others to guess which platform are you using and, more important, which queries are you typing that results in the problem you're reporting (specially if by following your problem description others are unable to reproduce the bug).

The problem is fixed in r4403. Thanks for the bug report.

  Changed 2 months ago by Parker

Thanks for the quick fix.

Add/Change #25 (random::random/1 behaves differently if debugger is switched on.)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.